mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
Fix tiny race in PPU breakpoints (#9731)
If the PPU has just being paused by the debugger, before it entered the breakpoint handler, the PPU would continue onto the next instruction skipping the breakpoint but then being paused on it instead.
This commit is contained in:
parent
5063eefa96
commit
fad89f1c3b
@ -21,7 +21,6 @@
|
||||
#include "lv2/sys_overlay.h"
|
||||
#include "lv2/sys_process.h"
|
||||
#include "lv2/sys_memory.h"
|
||||
#include "Emu/GDB.h"
|
||||
|
||||
#ifdef LLVM_AVAILABLE
|
||||
#ifdef _MSC_VER
|
||||
@ -454,12 +453,10 @@ extern void ppu_register_function_at(u32 addr, u32 size, ppu_function_t ptr)
|
||||
// Breakpoint entry point
|
||||
static bool ppu_break(ppu_thread& ppu, ppu_opcode_t op)
|
||||
{
|
||||
// Pause and wait if necessary
|
||||
bool status = ppu.state.test_and_set(cpu_flag::dbg_pause);
|
||||
|
||||
g_fxo->get<gdb_server>()->pause_from(&ppu);
|
||||
|
||||
if (!status && ppu.check_state())
|
||||
// Pause
|
||||
ppu.state += cpu_flag::dbg_pause;
|
||||
|
||||
if (ppu.check_state())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user