From owner-cvs-sys Mon Mar 4 04:10:13 1996 Return-Path: owner-cvs-sys Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id EAA25714 for cvs-sys-outgoing; Mon, 4 Mar 1996 04:10:13 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id EAA25707 Mon, 4 Mar 1996 04:10:08 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id XAA11681; Mon, 4 Mar 1996 23:04:30 +1100 Date: Mon, 4 Mar 1996 23:04:30 +1100 From: Bruce Evans Message-Id: <199603041204.XAA11681@godzilla.zeta.org.au> To: j@uriah.heep.sax.de, peter@jhome.dialix.com Subject: Re: cvs commit: src/sys/i386/conf LINT src/sys/kern subr_prf.c Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, gpalmer@freefall.freebsd.org Sender: owner-cvs-sys@FreeBSD.ORG Precedence: bulk >>> Add a new option: DDB_UNATTENDED. Stops machine dropping into DDB >>>... >>I would have loved to see a sysctl variable for this instead. This >>... >I agree.. It is amazingly simple to add sysctl variables after PHK's upgrade >of the sysctl code. It's now as simple as adding two (or three) lines to the >code.. One #include, an int variable and a SYSCTL_INT(.. OID_AUTO..) line. It's almost as simple as echo "set ddb_unattended = 1" | gdb -k -w /kernel /dev/mem :-). Only variables that need a procdedure to set dependent variables can't be handled using gdb. Using a single variable to control debugger entries is actually not simple. Debugger() is called from 18 modules and you don't want to have to change all of these and all future callers to test the variable and decide what to do. The variable should probably be tested in Debugger() (panic if it is set), but then you need a separate entry point(s) to force ordinary entry to ddb from the console(s). Similarly for other entries to ddb (for stray trace traps, breakpoints, and other exceptions). Similarly if cons_unavail is set. Bruce