diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp index 32ced9f6ac..5e62cb428f 100644 --- a/Source/Core/Core/HW/CPU.cpp +++ b/Source/Core/Core/HW/CPU.cpp @@ -15,6 +15,10 @@ #include "Core/PowerPC/PowerPC.h" #include "VideoCommon/Fifo.h" +#ifdef USE_GDBSTUB +#include "Core/PowerPC/GDBStub.h" +#endif + namespace CPU { // CPU Thread execution state. @@ -131,6 +135,15 @@ void Run() // Wait for step command. s_state_cpu_cvar.wait(state_lock, [&state_lock] { ExecutePendingJobs(state_lock); +#ifdef USE_GDBSTUB + state_lock.unlock(); + if (gdb_active() && gdb_hasControl()) + { + gdb_signal(GDB_SIGTRAP); + gdb_handle_exception(true); + } + state_lock.lock(); +#endif return s_state_cpu_step_instruction || !IsStepping(); }); if (!IsStepping()) diff --git a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp index 029a8f35d7..8487fd1c30 100644 --- a/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp +++ b/Source/Core/Core/PowerPC/Interpreter/Interpreter.cpp @@ -152,16 +152,6 @@ int Interpreter::SingleStepInner() return PPCTables::GetOpInfo(m_prev_inst)->numCycles; } -#ifdef USE_GDBSTUB - if (gdb_active() && gdb_bp_x(PC)) - { - Host_UpdateDisasmDialog(); - - gdb_signal(GDB_SIGTRAP); - gdb_handle_exception(true); - } -#endif - NPC = PC + sizeof(UGeckoInstruction); m_prev_inst.hex = PowerPC::Read_Opcode(PC);