From a4c7293d289acca8bbb5d09ecd090a2995f47082 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 3 Sep 2023 19:49:34 +1000 Subject: [PATCH] CPU: Fix breakpoints/single stepping --- src/core/cpu_core.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/cpu_core.cpp b/src/core/cpu_core.cpp index 4102aa33c..4dcf742f7 100644 --- a/src/core/cpu_core.cpp +++ b/src/core/cpu_core.cpp @@ -2075,6 +2075,8 @@ ALWAYS_INLINE_RELEASE static bool BreakpointCheck() Host::ReportFormattedDebuggerMessage("Hit breakpoint %u at 0x%08X.", bp.number, pc); i++; } + + ExitExecution(); } } @@ -2208,6 +2210,8 @@ void Execute() void SingleStep() { + s_single_step = true; + s_single_step_done = false; if (fastjmp_set(&s_jmp_buf) == 0) ExecuteDebug(); Host::ReportFormattedDebuggerMessage("Stepped to 0x%08X.", g_state.pc);