arm64: Improve unhandled exception traces
PATCH 1/1 arm64: Improve unhandled exception traces
Put the stack trace at the bottom, rather than mixing it with register dumps, and also start the trace from the current PC.
Signed-off-by Andrew Jones <[email protected]>
--- lib/arm64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/arm64/processor.c +1 -1
@@ -130,9 +130,9 @@ static void bad_exception(enum vector v, struct pt_regs *regs,printf ("Vector: %d (%s)\n" , v, vector_names[v]);printf ("ESR_EL1: %8s%08x, ec=%#x (%s)\n" ,"" , esr, ec, ec_names[ec]);printf ("FAR_EL1: %016lx (%svalid)\n" , far, far_valid ?"" :"not " ); -dump_stack ();printf ("Exception frame registers:\n" );show_regs (regs); +dump_frame_stack ((void *)regs->pc, (void *)regs->regs[29 ]);abort (); }
Signature · 1 line
2.43.0
Quoted 26 lines · Andrew Jones
Put the stack trace at the bottom, rather than mixing it with register dumps, and also start the trace from the current PC.
Signed-off-by Andrew Jones <[email protected]>--- lib/arm64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/arm64/processor.c +1
-1@@ -130,9 +130,9 @@ static void bad_exception(enum vector v, struct pt_regs *regs,printf ("Vector: %d (%s)\n" , v, vector_names[v]);printf ("ESR_EL1: %8s%08x, ec=%#x (%s)\n" ,"" , esr, ec, ec_names[ec]);printf ("FAR_EL1: %016lx (%svalid)\n" , far, far_valid ?"" :"not " ); -dump_stack ();printf ("Exception frame registers:\n" );show_regs (regs); +dump_frame_stack ((void *)regs->pc, (void *)regs->regs[29 ]);abort (); }Signature · 1 line
2.43.0
Merged.
Thanks,
drew