mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 17:58:37 +12:00
Fix spu_thread::dump_callstack_list regression
TODO: Fix in PPU [properly!]
This commit is contained in:
parent
17d8f2884e
commit
b68cfbf794
1 changed files with 10 additions and 22 deletions
|
@ -1211,26 +1211,7 @@ std::vector<std::pair<u32, u32>> spu_thread::dump_callstack_list() const
|
||||||
return !addr || !is_exec_code(addr, ls);
|
return !addr || !is_exec_code(addr, ls);
|
||||||
};
|
};
|
||||||
|
|
||||||
if (is_invalid(lr))
|
if (first && lr._u32[3] != gpr0._u32[3] && !is_invalid(gpr0))
|
||||||
{
|
|
||||||
if (first)
|
|
||||||
{
|
|
||||||
// Function hasn't saved LR, could be because it's a leaf function
|
|
||||||
// Use LR directly instead
|
|
||||||
lr = gpr0;
|
|
||||||
|
|
||||||
if (is_invalid(lr))
|
|
||||||
{
|
|
||||||
// Skip it, workaround
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (first && lr._u32[3] != gpr0._u32[3] && !is_invalid(gpr0))
|
|
||||||
{
|
{
|
||||||
// Detect functions with no stack or before LR has been stored
|
// Detect functions with no stack or before LR has been stored
|
||||||
std::vector<bool> passed(SPU_LS_SIZE / 4);
|
std::vector<bool> passed(SPU_LS_SIZE / 4);
|
||||||
|
@ -1319,8 +1300,15 @@ std::vector<std::pair<u32, u32>> spu_thread::dump_callstack_list() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: function addresses too
|
if (!is_invalid(lr))
|
||||||
call_stack_list.emplace_back(lr._u32[3], sp);
|
{
|
||||||
|
// TODO: function addresses too
|
||||||
|
call_stack_list.emplace_back(lr._u32[3], sp);
|
||||||
|
}
|
||||||
|
else if (!first)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
const u32 temp_sp = _ref<u32>(sp);
|
const u32 temp_sp = _ref<u32>(sp);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue