mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 22:19:02 +00:00
Debugger: rewrite GetPc()
This commit is contained in:
parent
af8c661a64
commit
427cf91447
6 changed files with 35 additions and 54 deletions
|
|
@ -809,6 +809,28 @@ std::string cpu_thread::get_name() const
|
|||
}
|
||||
}
|
||||
|
||||
u32 cpu_thread::get_pc() const
|
||||
{
|
||||
const u32* pc = nullptr;
|
||||
|
||||
switch (id_type())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
pc = &static_cast<const ppu_thread*>(this)->cia;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
pc = &static_cast<const spu_thread*>(this)->pc;
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
|
||||
return pc ? atomic_storage<u32>::load(*pc) : UINT32_MAX;
|
||||
}
|
||||
|
||||
std::string cpu_thread::dump_all() const
|
||||
{
|
||||
return {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue