print panic message before trapping to debugger
PATCH 1/1 print panic message before trapping to debugger
I've found it useful to display the panic message *before* dropping into the debugger. Once there it may be very difficult to find the original message, and often a debugger isn't even needed if you can see what panicked.
Signed-off-by Hollis Blanchard <[email protected]>
# HG changeset patch
# User hollisb@basalt
# Node ID c6267fda4f4c899dbf0f23191a658d7f18ca7c3c # Parent 686cd624618cead274ea9850f0997d41c6134283 print panic message before trapping to debugger
xen/drivers/char/console.c +2 -2
@@ -683,8 +683,6 @@ void panic(const char *fmt, ...) (void )vsnprintf (buf,sizeof (buf), fmt, args);va_end (args); -debugger_trap_immediate (); -/* Spit out multiline message in one go. */ spin_lock_irqsave (&lock, flags);printk ("\n****************************************\n" );
@@ -694,6 +692,8 @@ void panic(const char *fmt, ...)printk ("Reboot in five seconds...\n" );spin_unlock_irqrestore (&lock, flags); +debugger_trap_immediate (); +watchdog_disable ();mdelay (5000 );machine_restart (0 );
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center