diff --git a/TitanEngine/TitanEngine.Breakpoints.cpp b/TitanEngine/TitanEngine.Breakpoints.cpp index 4a76cd4..712b68d 100644 --- a/TitanEngine/TitanEngine.Breakpoints.cpp +++ b/TitanEngine/TitanEngine.Breakpoints.cpp @@ -5,6 +5,7 @@ #include "Global.Engine.h" #include "Global.Engine.Threading.h" #include "Global.Engine.Importer.h" +#include "Global.Threader.h" static long engineDefaultBreakPointType = UE_BREAKPOINT_INT3; static BYTE UD2BreakPoint[2] = {0x0F, 0x0B}; @@ -605,8 +606,11 @@ __declspec(dllexport) bool TITCALL SetHardwareBreakPoint(ULONG_PTR bpxAddress, D dr7.HWBP_SIZE[hwbpIndex]=hwbpSize; dr7.HWBP_TYPE[hwbpIndex]=hwbpType; - SetContextData(UE_DR7, dr7uint(&dr7)); //NOTE: MUST SET THIS FIRST FOR X64! - SetContextData(IndexOfRegister, (ULONG_PTR)bpxAddress); + for(int i=0; ichCreateThread != NULL) { @@ -1381,6 +1397,8 @@ __declspec(dllexport) void TITCALL DebugLoop() { break; } + if(!ThreaderGetThreadInfo(0, DBGEvent.dwThreadId)) //switch thread + DBGEvent.dwThreadId=dbgProcessInformation.dwThreadId; } if(!SecondChance) //debugger didn't close with a second chance exception (normal exit)