diff --git a/Release/TitanEngine.dll b/Release/TitanEngine.dll index 79be460..ddafeb2 100644 Binary files a/Release/TitanEngine.dll and b/Release/TitanEngine.dll differ diff --git a/Release/TitanEngine.exp b/Release/TitanEngine.exp index f993fd1..cb94db9 100644 Binary files a/Release/TitanEngine.exp and b/Release/TitanEngine.exp differ diff --git a/Release/TitanEngine.lib b/Release/TitanEngine.lib index a25169e..fec1e8e 100644 Binary files a/Release/TitanEngine.lib and b/Release/TitanEngine.lib differ diff --git a/TitanEngine/TitanEngine.cpp b/TitanEngine/TitanEngine.cpp index a67559c..054402e 100644 --- a/TitanEngine/TitanEngine.cpp +++ b/TitanEngine/TitanEngine.cpp @@ -17386,10 +17386,17 @@ __declspec(dllexport) void DebugLoop() myDBGContext.EFlags = myDBGContext.EFlags ^ 0x100; } SetThreadContext(hActiveThread, &myDBGContext); - myCustomBreakPoint = (fCustomBreakPoint)(DebugRegister0.DrxCallBack); + myCustomHandler = (fCustomHandler)(DebugRegister0.DrxCallBack); __try { - myCustomBreakPoint(); + ULONG_PTR addr=(ULONG_PTR)DBGEvent.u.Exception.ExceptionRecord.ExceptionAddress; + if(myDBGContext.Dr6 & 0x1) +#if defined(_WIN64) + addr=(ULONG_PTR)myDBGContext.Rip; +#else + addr=(ULONG_PTR)myDBGContext.Eip; +#endif + myCustomHandler((void*)addr); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -17417,10 +17424,17 @@ __declspec(dllexport) void DebugLoop() myDBGContext.EFlags = myDBGContext.EFlags ^ 0x100; } SetThreadContext(hActiveThread, &myDBGContext); - myCustomBreakPoint = (fCustomBreakPoint)(DebugRegister1.DrxCallBack); + myCustomHandler = (fCustomHandler)(DebugRegister1.DrxCallBack); __try { - myCustomBreakPoint(); + ULONG_PTR addr=(ULONG_PTR)DBGEvent.u.Exception.ExceptionRecord.ExceptionAddress; + if(myDBGContext.Dr6 & 0x2) +#if defined(_WIN64) + addr=(ULONG_PTR)myDBGContext.Rip; +#else + addr=(ULONG_PTR)myDBGContext.Eip; +#endif + myCustomHandler((void*)addr); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -17447,10 +17461,17 @@ __declspec(dllexport) void DebugLoop() myDBGContext.EFlags = myDBGContext.EFlags ^ 0x100; } SetThreadContext(hActiveThread, &myDBGContext); - myCustomBreakPoint = (fCustomBreakPoint)(DebugRegister2.DrxCallBack); + myCustomHandler = (fCustomHandler)(DebugRegister2.DrxCallBack); __try { - myCustomBreakPoint(); + ULONG_PTR addr=(ULONG_PTR)DBGEvent.u.Exception.ExceptionRecord.ExceptionAddress; + if(myDBGContext.Dr6 & 0x4) +#if defined(_WIN64) + addr=(ULONG_PTR)myDBGContext.Rip; +#else + addr=(ULONG_PTR)myDBGContext.Eip; +#endif + myCustomHandler((void*)addr); } __except(EXCEPTION_EXECUTE_HANDLER) { @@ -17477,10 +17498,17 @@ __declspec(dllexport) void DebugLoop() myDBGContext.EFlags = myDBGContext.EFlags ^ 0x100; } SetThreadContext(hActiveThread, &myDBGContext); - myCustomBreakPoint = (fCustomBreakPoint)(DebugRegister3.DrxCallBack); + myCustomHandler = (fCustomHandler)(DebugRegister3.DrxCallBack); __try { - myCustomBreakPoint(); + ULONG_PTR addr=(ULONG_PTR)DBGEvent.u.Exception.ExceptionRecord.ExceptionAddress; + if(myDBGContext.Dr6 & 0x8) +#if defined(_WIN64) + addr=(ULONG_PTR)myDBGContext.Rip; +#else + addr=(ULONG_PTR)myDBGContext.Eip; +#endif + myCustomHandler((void*)addr); } __except(EXCEPTION_EXECUTE_HANDLER) { diff --git a/x64/Release/TitanEngine.dll b/x64/Release/TitanEngine.dll index b702da0..e1b67dc 100644 Binary files a/x64/Release/TitanEngine.dll and b/x64/Release/TitanEngine.dll differ diff --git a/x64/Release/TitanEngine.exp b/x64/Release/TitanEngine.exp index 6491b5e..ec3c301 100644 Binary files a/x64/Release/TitanEngine.exp and b/x64/Release/TitanEngine.exp differ diff --git a/x64/Release/TitanEngine.lib b/x64/Release/TitanEngine.lib index 62b8b4f..b48f669 100644 Binary files a/x64/Release/TitanEngine.lib and b/x64/Release/TitanEngine.lib differ