mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 12:19:21 +01:00
Code dump for more exceptions, more instructions
This commit is contained in:
parent
00f369a6d4
commit
5b14f07ea2
10
exception.c
10
exception.c
@ -76,10 +76,6 @@ void exc_handler(u32 type, u32 spsr, u32 *regs)
|
|||||||
gecko_printf("DACR: %08x\n", get_dacr());
|
gecko_printf("DACR: %08x\n", get_dacr());
|
||||||
|
|
||||||
switch (type) {
|
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 3: // INSTR ABORT
|
||||||
case 4: // DATA ABORT
|
case 4: // DATA ABORT
|
||||||
if(type == 3)
|
if(type == 3)
|
||||||
@ -95,5 +91,11 @@ void exc_handler(u32 type, u32 spsr, u32 *regs)
|
|||||||
default: break;
|
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);
|
panic2(0, PANIC_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user