Code dump for more exceptions, more instructions

This commit is contained in:
marcan 2009-03-06 05:23:55 +01:00 committed by bushing
parent 00f369a6d4
commit 5b14f07ea2

View File

@ -76,10 +76,6 @@ void exc_handler(u32 type, u32 spsr, u32 *regs)
gecko_printf("DACR: %08x\n", get_dacr());
switch (type) {
case 1: // undefined instruction
gecko_printf("Undefined instruction @ %08x:\n%08x %08x *%08x* %08x %08x\n",
pc, read32(pc-8), read32(pc-4), read32(pc), read32(pc+4), read32(pc+8));
break;
case 3: // INSTR ABORT
case 4: // DATA ABORT
if(type == 3)
@ -95,5 +91,11 @@ void exc_handler(u32 type, u32 spsr, u32 *regs)
default: break;
}
if(type != 3) {
gecko_printf("Code dump:\n");
gecko_printf("%08x: %08x %08x %08x %08x\n", pc-16, read32(pc-16), read32(pc-12), read32(pc-8), read32(pc-4));
gecko_printf("%08x: *%08x %08x %08x %08x\n", pc, read32(pc), read32(pc+4), read32(pc+8), read32(pc+12));
gecko_printf("%08x: %08x %08x %08x %08x\n", pc+16, read32(pc+16), read32(pc+20), read32(pc+24), read32(pc+28));
}
panic2(0, PANIC_EXCEPTION);
}