From 981941d4060eac90f2a4487b0b968ccccc1aa9aa Mon Sep 17 00:00:00 2001 From: msmith Date: Mon, 28 Dec 1998 23:03:00 +0000 Subject: 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 --- sys/kern/kern_shutdown.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/kern_shutdown.c') 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, ""); -- cgit v1.1