saimaa: vec trap dumps banked LR/SPSR for fault PC
This commit is contained in:
+10
-1
@@ -108,9 +108,18 @@ static uint64_t saimaa_vec_read(void *opaque, hwaddr off, unsigned size)
|
||||
ARMCPU *cpu = ARM_CPU(current_cpu);
|
||||
uint64_t pc = cpu ? cpu->env.regs[15] : 0;
|
||||
int th = cpu ? cpu->env.thumb : 0;
|
||||
fprintf(stderr, "saimaa-vec: %s off=0x%x pc=0x%lx\n",
|
||||
fprintf(stderr, "saimaa-vec: %s off=0x%x pc=0x%lx",
|
||||
size == 2 ? "fetch?" : "read",
|
||||
(unsigned)off, (unsigned long)pc - (th ? 4 : 8));
|
||||
if (cpu) {
|
||||
int b;
|
||||
fprintf(stderr, " lr14=0x%x spsr=0x%x banks14=",
|
||||
cpu->env.regs[14], cpu->env.spsr);
|
||||
for (b = 0; b < 8; b++) {
|
||||
fprintf(stderr, "%x,", cpu->env.banked_r14[b]);
|
||||
}
|
||||
}
|
||||
fprintf(stderr, "\n");
|
||||
saimaa_vec_n++;
|
||||
}
|
||||
/* BKPT at exception vectors: data/prefetch abort fetch traps to gdb */
|
||||
|
||||
Reference in New Issue
Block a user