riscv: Log missing registers in dump_regs()
If we panic we dump the registers for debugging. This is very useful, but it missed several registers (ra, sp, gp and tp). Log these as well. Especially the return address value is extremely useful. Sponsored by: Axiado
This commit is contained in:
parent
e54b7cd007
commit
d53a2816c7
@ -147,6 +147,11 @@ dump_regs(struct trapframe *frame)
|
||||
for (i = 0; i < n; i++)
|
||||
printf("a[%d] == 0x%016lx\n", i, frame->tf_a[i]);
|
||||
|
||||
printf("ra == 0x%016lx\n", frame->tf_ra);
|
||||
printf("sp == 0x%016lx\n", frame->tf_sp);
|
||||
printf("gp == 0x%016lx\n", frame->tf_gp);
|
||||
printf("tp == 0x%016lx\n", frame->tf_tp);
|
||||
|
||||
printf("sepc == 0x%016lx\n", frame->tf_sepc);
|
||||
printf("sstatus == 0x%016lx\n", frame->tf_sstatus);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user