summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authoraldelaro5 <aldelaro5@gmail.com>2016-09-11 22:46:12 -0400
committeraldelaro5 <aldelaro5@gmail.com>2016-09-11 22:46:12 -0400
commitf689b1e6b5acec0070268bdbd8b563f0fcb8bfda (patch)
treea3867fc212e0548c1ccda466414b73b109e6cffb /Source/Core
parent18030ebfb40eb4190663a501be93767453ca0950 (diff)
Switch the CPU state to CPU_STEPPING before single stepping after unpausing
This fix a double break bug when hitting a memcheck and hitting play on the same instruction it broke to earlier. The state is put back to CPU_RUNNING after.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/CPU.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp
index 5a17e5b01e..01445006e8 100644
--- a/Source/Core/Core/HW/CPU.cpp
+++ b/Source/Core/Core/HW/CPU.cpp
@@ -92,10 +92,12 @@ void Run()
if (PowerPC::breakpoints.IsAddressBreakPoint(PC))
#endif
{
+ s_state = CPU_STEPPING;
PowerPC::CoreMode old_mode = PowerPC::GetMode();
PowerPC::SetMode(PowerPC::MODE_INTERPRETER);
PowerPC::SingleStep();
PowerPC::SetMode(old_mode);
+ s_state = CPU_RUNNING;
}
}