From: Gerd Knorr <kraxel@bytesex.org>
To: Jeff Dike <jdike@addtoit.com>,
uml devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [uml-devel] [patch] dump core on panics
Date: Wed, 10 Mar 2004 14:32:19 +0100 [thread overview]
Message-ID: <20040310133219.GC30984@bytesex.org> (raw)
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
reply other threads:[~2004-03-10 14:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040310133219.GC30984@bytesex.org \
--to=kraxel@bytesex.org \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox