Author: kp
Date: Wed Jul 1 19:11:02 2020
New Revision: 362851
URL: https://svnweb.freebsd.org/changeset/base/362851
Log:
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
Modified:
head/sys/riscv/riscv/trap.c
Modified: head/sys/riscv/riscv/trap.c
==============================================================================
--- head/sys/riscv/riscv/trap.c Wed Jul 1 18:10:37 2020 (r362850)
+++ head/sys/riscv/riscv/trap.c Wed Jul 1 19:11:02 2020 (r362851)
@@ -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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"