From f425de392c8a94a7046726faf33cc662668d100c Mon Sep 17 00:00:00 2001 From: linsmod Date: Sun, 2 Aug 2026 08:14:03 +0800 Subject: [PATCH] Handle STATUS_WX86_BREAKPOINT and STATUS_WX86_SINGLE_STEP in DebugLoop When aidbg (x64) debugs a 32-bit target under WoW64, software breakpoints (int3) surface as STATUS_WX86_BREAKPOINT (0x4000001f) instead of STATUS_BREAKPOINT (0x80000003), and the step-over single step as STATUS_WX86_SINGLE_STEP (0x4000001e). Route both to the existing breakpoint/single-step handling so breakpoints are consumed and restored correctly; otherwise continue re-stops on the same address forever. --- TitanEngine/TitanEngine.Debugger.DebugLoop.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp index 9f92bd0..3fd4fba 100644 --- a/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp +++ b/TitanEngine/TitanEngine.Debugger.DebugLoop.cpp @@ -591,6 +591,7 @@ __declspec(dllexport) void TITCALL DebugLoop() switch((LONG)DBGEvent.u.Exception.ExceptionRecord.ExceptionCode) { case STATUS_BREAKPOINT: + case STATUS_WX86_BREAKPOINT: { bool bFoundBreakPoint = false; BreakPointDetail FoundBreakPoint; @@ -736,6 +737,7 @@ __declspec(dllexport) void TITCALL DebugLoop() break; case STATUS_SINGLE_STEP: + case STATUS_WX86_SINGLE_STEP: { if(IsDbgReplyLaterSupported) {