From df4085061701aae6ae8ac6b7499347dab2b09ced Mon Sep 17 00:00:00 2001 From: Kingcom Date: Mon, 2 Dec 2013 10:42:20 +0100 Subject: [PATCH] Automatically pause core when changing breakpoints --- Core/Debugger/Breakpoints.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Core/Debugger/Breakpoints.cpp b/Core/Debugger/Breakpoints.cpp index 48826a095c..fa416b8c3e 100644 --- a/Core/Debugger/Breakpoints.cpp +++ b/Core/Debugger/Breakpoints.cpp @@ -324,13 +324,24 @@ const std::vector CBreakPoints::GetBreakpoints() void CBreakPoints::Update(u32 addr) { - if (MIPSComp::jit && Core_IsInactive()) + if (MIPSComp::jit) { + bool resume = false; + if (Core_IsStepping() == false) + { + Core_EnableStepping(true); + Core_WaitInactive(); + resume = true; + } + // In case this is a delay slot, clear the previous instruction too. if (addr != 0) MIPSComp::jit->ClearCacheAt(addr - 4, 8); else MIPSComp::jit->ClearCache(); + + if (resume) + Core_EnableStepping(false); } // Redraw in order to show the breakpoint.