Hollis Blanchard
2006-Mar-14 21:12 UTC
[Xen-devel] [patch] 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 <hollisb@us.ibm.com> # HG changeset patch # User hollisb@basalt # Node ID c6267fda4f4c899dbf0f23191a658d7f18ca7c3c # Parent 686cd624618cead274ea9850f0997d41c6134283 print panic message before trapping to debugger diff -r 686cd624618c -r c6267fda4f4c xen/drivers/char/console.c --- a/xen/drivers/char/console.c Tue Mar 14 14:56:55 2006 -0600 +++ b/xen/drivers/char/console.c Tue Mar 14 15:02:27 2006 -0600 @@ -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); -- Hollis Blanchard IBM Linux Technology Center _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel