When scanning or relocating, check replacements.

Just to make sure we don't wrongly detect the length or unresolve a var
wrong etc.
This commit is contained in:
Unknown W. Brackets committed 2014-06-23 08:18:56 -07:00
1 parent e2664c7ec2
commit ec94498342
5 files changed
+17 -17

No files matched your search

+2 -2
View File
@@ -67,7 +67,7 @@ namespace MIPSStackWalk {
// It ought to be pretty close.
u32 stop = pc - 32 * 4;
for (; Memory::IsValidAddress(pc) && pc >= stop; pc -= 4) {
MIPSOpcode op = Memory::Read_Instruction(pc);
MIPSOpcode op = Memory::Read_Instruction(pc, true);
// We're looking for a "mov fp, sp" close by a "addiu sp, sp, -N".
if (IsMovRegsInstr(op) && _RD == MIPS_REG_FP && (_RS == MIPS_REG_SP || _RT == MIPS_REG_SP)) {
@@ -83,7 +83,7 @@ namespace MIPSStackWalk {
int ra_offset = -1;
u32 stop = entry == INVALIDTARGET ? 0 : entry;
for (u32 pc = frame.pc; Memory::IsValidAddress(pc) && pc >= stop; pc -= 4) {
MIPSOpcode op = Memory::Read_Instruction(pc);
MIPSOpcode op = Memory::Read_Instruction(pc, true);
// Here's where they store the ra address.
if (IsSWInstr(op) && _RT == MIPS_REG_RA && _RS == MIPS_REG_SP) {