mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-08 16:01:42 +12: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
|
@ -1182,7 +1182,7 @@ std::vector<std::pair<u32, u32>> spu_thread::dump_callstack_list() const
|
|||
const v128 gpr0 = gpr[0];
|
||||
|
||||
// Declare first 128-bytes as invalid for stack (common values such as 0 do not make sense here)
|
||||
for (u32 sp = gpr[1]._u32[3]; (sp & 0xF) == 0u && sp >= 0x80u && sp <= 0x3FFE0u; sp = _ref<u32>(sp), first = false)
|
||||
for (u32 sp = gpr[1]._u32[3]; (sp & 0xF) == 0u && sp >= 0x80u && sp <= 0x3FFE0u; first = false)
|
||||
{
|
||||
v128 lr = _ref<v128>(sp + 16);
|
||||
|
||||
|
@ -1310,6 +1310,16 @@ std::vector<std::pair<u32, u32>> spu_thread::dump_callstack_list() const
|
|||
|
||||
// TODO: function addresses too
|
||||
call_stack_list.emplace_back(lr._u32[3], sp);
|
||||
|
||||
const u32 temp_sp = _ref<u32>(sp);
|
||||
|
||||
if (temp_sp <= sp)
|
||||
{
|
||||
// Ensure ascending stack frame pointers
|
||||
break;
|
||||
}
|
||||
|
||||
sp = temp_sp;
|
||||
}
|
||||
|
||||
return call_stack_list;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue