mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Debugger: Implement SPU breakpoints
This commit is contained in:
parent
ec6d6adebc
commit
ccb2724fc4
10 changed files with 136 additions and 32 deletions
|
|
@ -23,7 +23,7 @@ constexpr auto qstr = QString::fromStdString;
|
|||
debugger_list::debugger_list(QWidget* parent, std::shared_ptr<gui_settings> gui_settings, breakpoint_handler* handler)
|
||||
: QListWidget(parent)
|
||||
, m_gui_settings(std::move(gui_settings))
|
||||
, m_breakpoint_handler(handler)
|
||||
, m_ppu_breakpoint_handler(handler)
|
||||
{
|
||||
setWindowTitle(tr("ASM"));
|
||||
|
||||
|
|
@ -54,9 +54,21 @@ u32 debugger_list::GetCenteredAddress(u32 address) const
|
|||
|
||||
void debugger_list::ShowAddress(u32 addr, bool select_addr, bool force)
|
||||
{
|
||||
auto IsBreakpoint = [this](u32 pc)
|
||||
const decltype(spu_thread::local_breakpoints)* spu_bps_list;
|
||||
|
||||
if (m_cpu && m_cpu->id_type() == 2)
|
||||
{
|
||||
return m_cpu && m_cpu->id_type() == 1 && m_breakpoint_handler->HasBreakpoint(pc);
|
||||
spu_bps_list = &static_cast<spu_thread*>(m_cpu)->local_breakpoints;
|
||||
}
|
||||
|
||||
auto IsBreakpoint = [&](u32 pc)
|
||||
{
|
||||
switch (m_cpu ? m_cpu->id_type() : 0)
|
||||
{
|
||||
case 1: return m_ppu_breakpoint_handler->HasBreakpoint(pc);
|
||||
case 2: return (*spu_bps_list)[pc / 4].load();
|
||||
default: return false;
|
||||
}
|
||||
};
|
||||
|
||||
bool center_pc = m_gui_settings->GetValue(gui::d_centerPC).toBool();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue