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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=362851
@ -147,6 +147,11 @@ dump_regs(struct trapframe *frame)
|
|||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
printf("a[%d] == 0x%016lx\n", i, frame->tf_a[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("sepc == 0x%016lx\n", frame->tf_sepc);
|
||||||
printf("sstatus == 0x%016lx\n", frame->tf_sstatus);
|
printf("sstatus == 0x%016lx\n", frame->tf_sstatus);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user