DBG: improve the skipInt3Stepping feature to work for long int3 instructions
This commit is contained in:
parent
49f5780935
commit
418541e46e
|
|
@ -19,12 +19,13 @@
|
|||
|
||||
static bool skipInt3Stepping(int argc, char* argv[])
|
||||
{
|
||||
if(!bSkipInt3Stepping || dbgisrunning())
|
||||
if(!bSkipInt3Stepping || dbgisrunning() || getLastExceptionInfo().ExceptionRecord.ExceptionCode != EXCEPTION_BREAKPOINT)
|
||||
return false;
|
||||
duint cip = GetContextDataEx(hActiveThread, UE_CIP);
|
||||
unsigned char ch;
|
||||
MemRead(cip, &ch, sizeof(ch));
|
||||
if(ch == 0xCC && getLastExceptionInfo().ExceptionRecord.ExceptionCode == EXCEPTION_BREAKPOINT)
|
||||
unsigned char data[MAX_DISASM_BUFFER];
|
||||
MemRead(cip, data, sizeof(data));
|
||||
Zydis zydis;
|
||||
if(zydis.Disassemble(cip, data) && zydis.IsInt3())
|
||||
{
|
||||
//Don't allow skipping of multiple consecutive INT3 instructions
|
||||
getLastExceptionInfo().ExceptionRecord.ExceptionCode = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue