diff options
author | msmith <msmith@FreeBSD.org> | 1998-12-28 23:03:00 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-12-28 23:03:00 +0000 |
commit | 981941d4060eac90f2a4487b0b968ccccc1aa9aa (patch) | |
tree | 01bd1afc7e6da245f5ace02fd85aaa4a9d0ff2cb /sys/kern/kern_shutdown.c | |
parent | 448471aa29ad0e51620b7b82116fd6d0b5453c3b (diff) | |
download | FreeBSD-src-981941d4060eac90f2a4487b0b968ccccc1aa9aa.zip FreeBSD-src-981941d4060eac90f2a4487b0b968ccccc1aa9aa.tar.gz |
Improved DDB_UNATTENDED behaviour. From the submitter:
There's something that's been bugging me for a while, so I decided to fix it.
FreeBSD now will DTRT WRT DDB and DDB_UNATTENDED (!debugger_on_panic), at least
in my opinion. The behavior change is such that:
1. Nothing changes when debugger_on_panic != 0.
2. When DDB_UNATTENDED (!debugger_on_panic), if a panic occurs, the
machine will reboot. Also, if a trap occurs, the machine will
panic and reboot, unlike how it broke to DDB before. HOWEVER,
a trap inside DDB will not cause a panic, allowing full use
of DDB without having to worry about the machine being stuck
at a DDB prompt if something goes wrong during the day.
Patches for this behavior follow my signature, and it would
be a boon to anyone (like me) who uses DDB_UNATTENDED, but
actually wants the machine to panic on a trap (otherwise,
what's the use, if the machine causes a fatal trap rather than
a true panic, of debugger_on_panic?). The changes cause no
adverse behavior, but do involve two symbols becoming global
Submitted by: Brian Feldman <green@unixhelp.org>
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r-- | sys/kern/kern_shutdown.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 3a2c650..4d6db41 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 - * $Id: kern_shutdown.c,v 1.42 1998/11/13 22:40:37 msmith Exp $ + * $Id: kern_shutdown.c,v 1.43 1998/12/04 22:54:51 archie Exp $ */ #include "opt_ddb.h" @@ -80,9 +80,9 @@ #ifdef DDB #ifdef DDB_UNATTENDED -static int debugger_on_panic = 0; +int debugger_on_panic = 0; #else -static int debugger_on_panic = 1; +int debugger_on_panic = 1; #endif SYSCTL_INT(_debug, OID_AUTO, debugger_on_panic, CTLFLAG_RW, &debugger_on_panic, 0, ""); |