diff options
author | phk <phk@FreeBSD.org> | 1996-03-23 11:31:16 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1996-03-23 11:31:16 +0000 |
commit | d821d192551b56cfa172ffd1e388bd00e26c6c41 (patch) | |
tree | d023f1fedebef062a925c1014a4c2e570478c76f /sys/kern/subr_prf.c | |
parent | d574d3da98ecad99f4079ff9a88dbd6b12e72dd8 (diff) | |
download | FreeBSD-src-d821d192551b56cfa172ffd1e388bd00e26c6c41.zip FreeBSD-src-d821d192551b56cfa172ffd1e388bd00e26c6c41.tar.gz |
Remove all traces of KADB
add sysctl
debug.debugger_on_panic: 1
if DDB or KGDB is defined.
Requested by: davidg
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r-- | sys/kern/subr_prf.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index d1d396a..eb43356 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)subr_prf.c 8.3 (Berkeley) 1/21/94 - * $Id: subr_prf.c,v 1.29 1996/01/29 03:18:05 gibbs Exp $ + * $Id: subr_prf.c,v 1.30 1996/02/28 21:42:15 gpalmer Exp $ */ #include "opt_ddb.h" @@ -51,6 +51,8 @@ #include <sys/tprintf.h> #include <sys/syslog.h> #include <sys/malloc.h> +#include <sys/kernel.h> +#include <sys/sysctl.h> #include <machine/cons.h> /* @@ -59,10 +61,16 @@ */ #include <machine/stdarg.h> -#ifdef KADB -#include <machine/kdbparam.h> +#if defined(DDB) || defined (KGDB) +#ifdef DDB_UNATTENDED + static int debugger_on_panic = 0; +#else + static int debugger_on_panic = 1; #endif +SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW, + &debugger_on_panic, 0, ""); +#endif #define TOCONS 0x01 #define TOTTY 0x02 @@ -112,18 +120,14 @@ panic(const char *fmt, ...) va_end(ap); printf("\n"); + if (debugger_on_panic) { #ifdef KGDB - kgdb_panic(); -#endif -#ifdef KADB - if (boothowto & RB_KDB) - kdbpanic(); + kgdb_panic(); #endif #ifdef DDB -#ifndef DDB_UNATTENDED - Debugger ("panic"); -#endif + Debugger ("panic"); #endif + } boot(bootopt); } |