Avoid an infinite loop on bad stack walk.

If the address is wrong, it'll re-trigger debug mode, which will re-walk
the stack, which will continue ad infinitum.
This commit is contained in:
Unknown W. Brackets 2014-01-18 09:58:48 -08:00
parent 2347498667
commit 648c0f6685

View File

@ -102,7 +102,7 @@ namespace MIPSStackWalk {
frame.entry = pc;
frame.stackSize = -_IMM16;
if (ra_offset != -1) {
if (ra_offset != -1 && Memory::IsValidAddress(frame.sp + ra_offset)) {
ra = Memory::Read_U32(frame.sp + ra_offset);
}
return true;