Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Mar 1996 23:04:30 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        j@uriah.heep.sax.de, peter@jhome.dialix.com
Cc:        CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sys@freefall.freebsd.org, gpalmer@freefall.freebsd.org
Subject:   Re: cvs commit: src/sys/i386/conf LINT src/sys/kern subr_prf.c
Message-ID:  <199603041204.XAA11681@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>>   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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603041204.XAA11681>