mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
SPU/PPU/Debugger: Ensure ascending stack frames (#13833)
* PPU/Debugger: Ensure ascending stack frames * SPU/Debugger: Ensure descending stack frame pointers
This commit is contained in:
parent
58140e1d3a
commit
db7f84f9f8
2 changed files with 22 additions and 2 deletions
|
|
@ -1290,7 +1290,7 @@ std::vector<std::pair<u32, u32>> ppu_thread::dump_callstack_list() const
|
|||
for (
|
||||
u64 sp = r1;
|
||||
sp % 0x10 == 0u && sp >= stack_min && sp <= stack_max - ppu_stack_start_offset;
|
||||
sp = *vm::get_super_ptr<u64>(static_cast<u32>(sp)), first = false
|
||||
first = false
|
||||
)
|
||||
{
|
||||
u64 addr = *vm::get_super_ptr<u64>(static_cast<u32>(sp + 16));
|
||||
|
|
@ -1328,6 +1328,16 @@ std::vector<std::pair<u32, u32>> ppu_thread::dump_callstack_list() const
|
|||
|
||||
// TODO: function addresses too
|
||||
call_stack_list.emplace_back(static_cast<u32>(addr), static_cast<u32>(sp));
|
||||
|
||||
const u64 temp_sp = *vm::get_super_ptr<u64>(static_cast<u32>(sp));
|
||||
|
||||
if (temp_sp <= sp)
|
||||
{
|
||||
// Ensure inequality and that the old stack pointer is higher than current
|
||||
break;
|
||||
}
|
||||
|
||||
sp = temp_sp;
|
||||
}
|
||||
|
||||
return call_stack_list;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue