From b8395280d3fb90dc166bdad940c2d2404834104a Mon Sep 17 00:00:00 2001 From: aldelaro5 Date: Fri, 1 Oct 2021 01:33:40 -0400 Subject: [PATCH] GDBStub: Correctly inform the CPU thread if we are stepping --- Source/Core/Core/HW/CPU.cpp | 3 +++ Source/Core/Core/PowerPC/GDBStub.cpp | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/HW/CPU.cpp b/Source/Core/Core/HW/CPU.cpp index 5e62cb428f..3e09340046 100644 --- a/Source/Core/Core/HW/CPU.cpp +++ b/Source/Core/Core/HW/CPU.cpp @@ -141,6 +141,9 @@ void Run() { gdb_signal(GDB_SIGTRAP); gdb_handle_exception(true); + // If we are still going to step, emulate the fact we just sent a step command + if (gdb_hasControl()) + s_state_cpu_step_instruction = true; } state_lock.lock(); #endif diff --git a/Source/Core/Core/PowerPC/GDBStub.cpp b/Source/Core/Core/PowerPC/GDBStub.cpp index 5752e53217..f588696276 100644 --- a/Source/Core/Core/PowerPC/GDBStub.cpp +++ b/Source/Core/Core/PowerPC/GDBStub.cpp @@ -573,14 +573,6 @@ void gdb_break() static void gdb_step() { - Common::Event sync_event; - - PowerPC::CoreMode old_mode = PowerPC::GetMode(); - PowerPC::SetMode(PowerPC::CoreMode::Interpreter); - PowerPC::breakpoints.ClearAllTemporary(); - CPU::StepOpcode(&sync_event); - sync_event.WaitFor(std::chrono::milliseconds(20)); - PowerPC::SetMode(old_mode); send_signal = 1; }