GDBStub: move the stalling logic to CPU::Run
This commit is contained in:
parent
e3b978cf20
commit
994847f09c
|
@ -15,6 +15,10 @@
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
#include "VideoCommon/Fifo.h"
|
#include "VideoCommon/Fifo.h"
|
||||||
|
|
||||||
|
#ifdef USE_GDBSTUB
|
||||||
|
#include "Core/PowerPC/GDBStub.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace CPU
|
namespace CPU
|
||||||
{
|
{
|
||||||
// CPU Thread execution state.
|
// CPU Thread execution state.
|
||||||
|
@ -131,6 +135,15 @@ void Run()
|
||||||
// Wait for step command.
|
// Wait for step command.
|
||||||
s_state_cpu_cvar.wait(state_lock, [&state_lock] {
|
s_state_cpu_cvar.wait(state_lock, [&state_lock] {
|
||||||
ExecutePendingJobs(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();
|
return s_state_cpu_step_instruction || !IsStepping();
|
||||||
});
|
});
|
||||||
if (!IsStepping())
|
if (!IsStepping())
|
||||||
|
|
|
@ -152,16 +152,6 @@ int Interpreter::SingleStepInner()
|
||||||
return PPCTables::GetOpInfo(m_prev_inst)->numCycles;
|
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);
|
NPC = PC + sizeof(UGeckoInstruction);
|
||||||
m_prev_inst.hex = PowerPC::Read_Opcode(PC);
|
m_prev_inst.hex = PowerPC::Read_Opcode(PC);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue