uml: dump core on panic
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>
This commit is contained in:
parent
990c55871b
commit
63843c265f
|
@ -279,6 +279,7 @@ extern int raw(int fd);
|
||||||
extern void setup_machinename(char *machine_out);
|
extern void setup_machinename(char *machine_out);
|
||||||
extern void setup_hostinfo(char *buf, int len);
|
extern void setup_hostinfo(char *buf, int len);
|
||||||
extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
|
extern int setjmp_wrapper(void (*proc)(void *, void *), ...);
|
||||||
|
extern void os_dump_core(void);
|
||||||
|
|
||||||
/* time.c */
|
/* time.c */
|
||||||
#define BILLION (1000 * 1000 * 1000)
|
#define BILLION (1000 * 1000 * 1000)
|
||||||
|
|
|
@ -474,7 +474,7 @@ static int panic_exit(struct notifier_block *self, unsigned long unused1,
|
||||||
show_regs(&(current->thread.regs));
|
show_regs(&(current->thread.regs));
|
||||||
bust_spinlocks(0);
|
bust_spinlocks(0);
|
||||||
uml_exitcode = 1;
|
uml_exitcode = 1;
|
||||||
machine_halt();
|
os_dump_core();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -119,3 +119,9 @@ int setjmp_wrapper(void (*proc)(void *, void *), ...)
|
||||||
va_end(args);
|
va_end(args);
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void os_dump_core(void)
|
||||||
|
{
|
||||||
|
signal(SIGSEGV, SIG_DFL);
|
||||||
|
abort();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue