* [uml-devel] [patch] dump core on panics
@ 2004-03-10 13:32 Gerd Knorr
0 siblings, 0 replies; only message in thread
From: Gerd Knorr @ 2004-03-10 13:32 UTC (permalink / raw)
To: Jeff Dike, uml devel
Hi,
New debugging feature: make the uml kernel dump core on panic
when booted with "core=1".
Gerd
Index: linux-um-2.6.4-rc3/kernel/panic.c
===================================================================
--- linux-um-2.6.4-rc3.orig/kernel/panic.c 2004-03-10 09:21:29.172468194 +0100
+++ linux-um-2.6.4-rc3/kernel/panic.c 2004-03-10 11:52:31.646327958 +0100
@@ -37,6 +37,17 @@ static int __init panic_setup(char *str)
}
__setup("panic=", panic_setup);
+#ifdef __arch_um__
+extern void abort(void);
+static int dump_core = 0;
+static int __init dump_core_setup(char *str)
+{
+ dump_core = simple_strtoul(str, NULL, 0);
+ return 1;
+}
+__setup("core=", dump_core_setup);
+#endif
+
/**
* panic - halt the system
* @fmt: The text string to print
@@ -60,6 +71,10 @@ NORET_TYPE void panic(const char * fmt,
vsnprintf(buf, sizeof(buf), fmt, args);
va_end(args);
printk(KERN_EMERG "Kernel panic: %s\n",buf);
+#ifdef __arch_um__
+ if (dump_core)
+ abort();
+#endif
if (in_interrupt())
printk(KERN_EMERG "In interrupt handler - not syncing\n");
else if (!current->pid)
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-03-10 14:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-10 13:32 [uml-devel] [patch] dump core on panics Gerd Knorr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox