uml: dump core on panic
authorJeff Dike <jdike@addtoit.com>
Sun, 6 May 2007 21:51:39 +0000 (14:51 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 7 May 2007 19:13:03 +0000 (12:13 -0700)
Dump core after a panic.  This will provide better debugging information than
is currently available.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/include/os.h
arch/um/kernel/um_arch.c
arch/um/os-Linux/util.c

index b463170a5308474228174ab0bfc51c71f2d8bf00..901804db3c35195938db403bdcadc693f72e496d 100644 (file)
@@ -279,6 +279,7 @@ extern int raw(int fd);
 extern void setup_machinename(char *machine_out);
 extern void setup_hostinfo(char *buf, int len);
 extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
+extern void os_dump_core(void);
 
 /* time.c */
 #define BILLION (1000 * 1000 * 1000)
index 9bf31533a8fd9fb38cdfac1a8ae2e1cb0366c93a..1cf954a47fd7719c83e818e53428f9de027ed99a 100644 (file)
@@ -474,7 +474,7 @@ static int panic_exit(struct notifier_block *self, unsigned long unused1,
        show_regs(&(current->thread.regs));
        bust_spinlocks(0);
        uml_exitcode = 1;
-       machine_halt();
+       os_dump_core();
        return 0;
 }
 
index 48bc4927b996b129fc00b07ad8b4a4e3e24f53b8..c307a89ed2598cef9a0c619cc8576e353115aa54 100644 (file)
@@ -119,3 +119,9 @@ int setjmp_wrapper(void (*proc)(void *, void *), ...)
        va_end(args);
        return n;
 }
+
+void os_dump_core(void)
+{
+       signal(SIGSEGV, SIG_DFL);
+       abort();
+}