mirror of https://github.com/x64dbg/TitanEngine
Hardware Breakpoint : Fixed a bug where when HW BP is hit and the user deletes the HW BP then resumes the execution, the Trap Flag is still set which make titanengine think the debuggee throwed a SINGLE_STEP Exception.
BP : Fixed a bug where setting a HW BP and a SW BP (could be any combination e.g SW BP then a HW BP) on same address, then removing one of the two BP when program hits the BP will remove all BPs set on that address.
This commit is contained in:
parent
51208e22f3
commit
92f5d48c85
|
|
@ -594,7 +594,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
EngineCloseHandle(hActiveThread);
|
||||
}
|
||||
}
|
||||
else if(ResetHwBPX) //restore hardware breakpoint
|
||||
if(ResetHwBPX) //restore hardware breakpoint
|
||||
{
|
||||
ResetHwBPX = false;
|
||||
SetHardwareBreakPoint(DebugRegisterX.DrxBreakAddress, DebugRegisterXId, DebugRegisterX.DrxBreakPointType, DebugRegisterX.DrxBreakPointSize, (LPVOID)DebugRegisterX.DrxCallBack);
|
||||
|
|
@ -613,7 +613,7 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
}
|
||||
}
|
||||
}
|
||||
else if(ResetMemBPX) //restore memory breakpoint
|
||||
if(ResetMemBPX) //restore memory breakpoint
|
||||
{
|
||||
ResetMemBPX = false;
|
||||
VirtualQueryEx(dbgProcessInformation.hProcess, (LPCVOID)ResetMemBPXAddress, &MemInfo, sizeof MEMORY_BASIC_INFORMATION);
|
||||
|
|
@ -658,6 +658,12 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
DeleteHardwareBreakPoint(UE_DR0);
|
||||
ResetHwBPX = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetThreadContext(hActiveThread, &myDBGContext);
|
||||
myDBGContext.EFlags &= ~(1 << 8);
|
||||
SetThreadContext(hActiveThread, &myDBGContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -680,6 +686,12 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
DeleteHardwareBreakPoint(UE_DR1);
|
||||
ResetHwBPX = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetThreadContext(hActiveThread, &myDBGContext);
|
||||
myDBGContext.EFlags &= ~(1 << 8);
|
||||
SetThreadContext(hActiveThread, &myDBGContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -702,6 +714,12 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
DeleteHardwareBreakPoint(UE_DR2);
|
||||
ResetHwBPX = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetThreadContext(hActiveThread, &myDBGContext);
|
||||
myDBGContext.EFlags &= ~(1 << 8);
|
||||
SetThreadContext(hActiveThread, &myDBGContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -724,6 +742,12 @@ __declspec(dllexport) void TITCALL DebugLoop()
|
|||
DeleteHardwareBreakPoint(UE_DR3);
|
||||
ResetHwBPX = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetThreadContext(hActiveThread, &myDBGContext);
|
||||
myDBGContext.EFlags &= ~(1 << 8);
|
||||
SetThreadContext(hActiveThread, &myDBGContext);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue