From d4265de1e4e0282db73f0177034986f1cd3ca7d0 Mon Sep 17 00:00:00 2001 From: "mr.exodia" Date: Mon, 3 Mar 2014 23:29:12 +0100 Subject: [PATCH] - repaired hardware breakpoints again --- TitanEngine/Global.Engine.cpp | 1 - TitanEngine/TitanEngine.Debugger.DebugLoop.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/TitanEngine/Global.Engine.cpp b/TitanEngine/Global.Engine.cpp index 0499be2..d842f68 100644 --- a/TitanEngine/Global.Engine.cpp +++ b/TitanEngine/Global.Engine.cpp @@ -59,7 +59,6 @@ void EngineInit() bool EngineIsThereFreeHardwareBreakSlot(LPDWORD FreeRegister) { - if(DebugRegister[0].DrxEnabled == false) { if(FreeRegister != NULL) diff --git a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp index 1c2df32..ef49aa9 100644 --- a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp +++ b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp @@ -967,6 +967,7 @@ __declspec(dllexport) void TITCALL DebugLoop() { hActiveThread = OpenThread(THREAD_GET_CONTEXT|THREAD_SET_CONTEXT|THREAD_QUERY_INFORMATION, false, DBGEvent.dwThreadId); myDBGContext.ContextFlags = CONTEXT_DEBUG_REGISTERS; + GetThreadContext(hActiveThread, &myDBGContext); if((ULONG_PTR)DBGEvent.u.Exception.ExceptionRecord.ExceptionAddress == myDBGContext.Dr0 || (myDBGContext.Dr6 & 0x1)) { if(DebugRegister[0].DrxEnabled)