DBG: add breakpointexceptionaddress variable
This commit is contained in:
parent
8616ff67a2
commit
7c0d122ee4
|
@ -791,26 +791,33 @@ static void cbGenericBreakpoint(BP_TYPE bptype, void* ExceptionAddress = nullptr
|
|||
BREAKPOINT* bpPtr = nullptr;
|
||||
//NOTE: this locking is very tricky, make sure you understand it before modifying anything
|
||||
EXCLUSIVE_ACQUIRE(LockBreakpoints);
|
||||
duint breakpointExceptionAddress = 0;
|
||||
switch(bptype)
|
||||
{
|
||||
case BPNORMAL:
|
||||
bpPtr = BpInfoFromAddr(BPNORMAL, CIP);
|
||||
breakpointExceptionAddress = CIP;
|
||||
break;
|
||||
case BPHARDWARE:
|
||||
bpPtr = BpInfoFromAddr(BPHARDWARE, duint(ExceptionAddress));
|
||||
breakpointExceptionAddress = duint(ExceptionAddress);
|
||||
break;
|
||||
case BPMEMORY:
|
||||
bpPtr = BpInfoFromAddr(BPMEMORY, MemFindBaseAddr(duint(ExceptionAddress), nullptr, true));
|
||||
breakpointExceptionAddress = duint(ExceptionAddress);
|
||||
break;
|
||||
case BPDLL:
|
||||
bpPtr = BpInfoFromAddr(BPDLL, BpGetDLLBpAddr(reinterpret_cast<const char*>(ExceptionAddress)));
|
||||
breakpointExceptionAddress = 0; //makes no sense
|
||||
break;
|
||||
case BPEXCEPTION:
|
||||
bpPtr = BpInfoFromAddr(BPEXCEPTION, ((EXCEPTION_DEBUG_INFO*)ExceptionAddress)->ExceptionRecord.ExceptionCode);
|
||||
breakpointExceptionAddress = (duint)((EXCEPTION_DEBUG_INFO*)ExceptionAddress)->ExceptionRecord.ExceptionAddress;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
varset("$breakpointexceptionaddress", breakpointExceptionAddress, true);
|
||||
if(!(bpPtr && bpPtr->enabled)) //invalid / disabled breakpoint hit (most likely a bug)
|
||||
{
|
||||
if(bptype != BPDLL || !BpUpdateDllPath(reinterpret_cast<const char*>(ExceptionAddress), &bpPtr))
|
||||
|
|
|
@ -82,6 +82,7 @@ void varinit()
|
|||
varnew("$breakpointcounter", 0, VAR_READONLY);
|
||||
varnew("$breakpointcondition", 0, VAR_SYSTEM);
|
||||
varnew("$breakpointlogcondition", 0, VAR_READONLY);
|
||||
varnew("$breakpointexceptionaddress", 0, VAR_READONLY);
|
||||
|
||||
// Tracing variables
|
||||
varnew("$tracecounter", 0, VAR_READONLY);
|
||||
|
|
|
@ -3285,7 +3285,6 @@ void RegistersView::setRegister(REGISTER_NAME reg, duint value)
|
|||
if(mFlags.contains(reg))
|
||||
wRegName = "_" + wRegName;
|
||||
|
||||
|
||||
// we change the value (so highlight it)
|
||||
mRegisterUpdates.insert(reg);
|
||||
// tell everything the compiler
|
||||
|
|
Loading…
Reference in New Issue