mirror of https://github.com/x64dbg/TitanEngine
Also implement #14 for UD2 breakpoints
This commit is contained in:
parent
b862c2b36f
commit
490ce02fb3
|
|
@ -1317,6 +1317,16 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
||||||
ResetBPXAddressTo = NULL;
|
ResetBPXAddressTo = NULL;
|
||||||
ResetBPX = false;
|
ResetBPX = false;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// if the current instruction pushes the flags, erase the trap flag from the stack after its execution
|
||||||
|
ULONG_PTR ueCurrentPosition = FoundBreakPoint.BreakPointAddress;
|
||||||
|
unsigned char instr[16];
|
||||||
|
MemoryReadSafe(dbgProcessInformation.hProcess, (void*)ueCurrentPosition, instr, sizeof(instr), 0);
|
||||||
|
char* DisassembledString = (char*)StaticDisassembleEx(ueCurrentPosition, (LPVOID)instr);
|
||||||
|
if(strstr(DisassembledString, "PUSHF"))
|
||||||
|
PushfBPX = true;
|
||||||
|
}
|
||||||
|
|
||||||
//execute callback
|
//execute callback
|
||||||
myCustomBreakPoint = (fCustomBreakPoint)((LPVOID)FoundBreakPoint.ExecuteCallBack);
|
myCustomBreakPoint = (fCustomBreakPoint)((LPVOID)FoundBreakPoint.ExecuteCallBack);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue