mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 08:21:29 +12:00
Debugger: Implement SPU breakpoints
This commit is contained in:
parent
ec6d6adebc
commit
ccb2724fc4
10 changed files with 136 additions and 32 deletions
|
@ -1503,10 +1503,30 @@ void spu_thread::cpu_work()
|
|||
|
||||
const u32 old_iter_count = cpu_work_iteration_count++;
|
||||
|
||||
const auto timeout = +g_cfg.core.mfc_transfers_timeout;
|
||||
|
||||
bool work_left = false;
|
||||
|
||||
if (has_active_local_bps)
|
||||
{
|
||||
if (local_breakpoints[pc / 4])
|
||||
{
|
||||
// Ignore repeatations until a different instruction is issued
|
||||
if (pc != current_bp_pc)
|
||||
{
|
||||
// Breakpoint hit
|
||||
state += cpu_flag::dbg_pause;
|
||||
}
|
||||
}
|
||||
|
||||
current_bp_pc = pc;
|
||||
work_left = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
current_bp_pc = umax;
|
||||
}
|
||||
|
||||
const auto timeout = +g_cfg.core.mfc_transfers_timeout;
|
||||
|
||||
if (u32 shuffle_count = g_cfg.core.mfc_transfers_shuffling)
|
||||
{
|
||||
// If either MFC size exceeds limit or timeout has been reached execute pending MFC commands
|
||||
|
@ -1544,7 +1564,19 @@ void spu_thread::cpu_work()
|
|||
|
||||
if (!work_left)
|
||||
{
|
||||
state -= cpu_flag::pending;
|
||||
// No more pending work
|
||||
state.atomic_op([](bs_t<cpu_flag>& flags)
|
||||
{
|
||||
if (flags & cpu_flag::pending_recheck)
|
||||
{
|
||||
// Do not really remove ::pending because external thread may have pushed more pending work
|
||||
flags -= cpu_flag::pending_recheck;
|
||||
}
|
||||
else
|
||||
{
|
||||
flags -= cpu_flag::pending;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (gen_interrupt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue