From: Jeff Dike <jdike@addtoit.com>
To: Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: [PATCH 3/4] UML - Dump core on panic
Date: Wed, 11 Apr 2007 12:01:26 -0400 [thread overview]
Message-ID: <20070411160126.GA6329@c2.user-mode-linux.org> (raw)
Dump core after a panic. This will provide better debugging
information than is currently available.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
--
arch/um/include/os.h | 1 +
arch/um/kernel/um_arch.c | 2 +-
arch/um/os-Linux/util.c | 6 ++++++
3 files changed, 8 insertions(+), 1 deletion(-)
Index: linux-2.6.21-mm/arch/um/include/os.h
===================================================================
--- linux-2.6.21-mm.orig/arch/um/include/os.h 2007-04-06 10:36:33.000000000 -0400
+++ linux-2.6.21-mm/arch/um/include/os.h 2007-04-06 10:38:54.000000000 -0400
@@ -281,6 +281,7 @@ extern void setup_machinename(char *mach
extern void setup_hostinfo(char *buf, int len);
extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
extern void os_log_info(char *fmt, va_list ap);
+extern void os_dump_core(void);
/* time.c */
#define BILLION (1000 * 1000 * 1000)
Index: linux-2.6.21-mm/arch/um/kernel/um_arch.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/kernel/um_arch.c 2007-04-06 10:37:48.000000000 -0400
+++ linux-2.6.21-mm/arch/um/kernel/um_arch.c 2007-04-06 10:38:05.000000000 -0400
@@ -474,7 +474,7 @@ static int panic_exit(struct notifier_bl
show_regs(&(current->thread.regs));
bust_spinlocks(0);
uml_exitcode = 1;
- machine_halt();
+ os_dump_core();
return 0;
}
Index: linux-2.6.21-mm/arch/um/os-Linux/util.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/os-Linux/util.c 2007-04-05 13:25:28.000000000 -0400
+++ linux-2.6.21-mm/arch/um/os-Linux/util.c 2007-04-06 10:57:55.000000000 -0400
@@ -148,3 +148,9 @@ void os_log_info(char *fmt, va_list ap)
vsnprintf(&logging_buf[len], sizeof(logging_buf) - len, fmt, ap);
write(logging_fd, logging_buf, strlen(logging_buf));
}
+
+void os_dump_core(void)
+{
+ signal(SIGSEGV, SIG_DFL);
+ abort();
+}
reply other threads:[~2007-04-11 16:06 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=20070411160126.GA6329@c2.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--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