From b331ec96a36a0c8bc70c45aa4b3c610342a734b4 Mon Sep 17 00:00:00 2001 From: skidau Date: Thu, 16 Oct 2014 01:29:05 +1100 Subject: [PATCH] Made the "continue", "stepover" and "stepout" functions work when the PC is at a breakpoint --- Source/Core/Core/HW/CPU.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp index 12787dbde1..6164817194 100644 --- a/Source/Core/Core/HW/CPU.cpp +++ b/Source/Core/Core/HW/CPU.cpp @@ -117,6 +117,15 @@ void CCPU::EnableStepping(const bool _bStepping) } else { + // SingleStep so that the "continue", "step over" and "step out" debugger functions + // work when the PC is at a breakpoint at the beginning of the block + if (PowerPC::breakpoints.IsAddressBreakPoint(PC) && PowerPC::GetMode() != PowerPC::MODE_INTERPRETER) + { + PowerPC::CoreMode oldMode = PowerPC::GetMode(); + PowerPC::SetMode(PowerPC::MODE_INTERPRETER); + PowerPC::SingleStep(); + PowerPC::SetMode(oldMode); + } PowerPC::Start(); m_StepEvent.Set(); g_video_backend->EmuStateChange(EMUSTATE_CHANGE_PLAY);