cvs commit: src/sys/i386/i386 trap.c src/sys/amd64/amd64 trap.c
Marcel Moolenaar
marcel at xcllnt.net
Wed Jun 29 20:48:06 GMT 2005
On Wed, Jun 29, 2005 at 07:31:59PM +0100, Robert Watson wrote:
>
> On Wed, 29 Jun 2005, Stephan Uphoff wrote:
>
> >The last thing I want to do is to totally dismantle the current kdb_trap
> >or sprinkle MI code all over the different architecture directories. The
> >console stuff definitely belongs in the MI part. However for readability
> >I would rather have:
>
> Something I'd like very much to see, unrelated to the above points, is
> responsibility for printing the "panic" message move from panic() to the
> KDB code. Right now, we frequently take an interrupt during that printf()
> on a slow serial console, resulting in great unhappiness (wedged panic
> calls, secondary panics, etc). KDB runs in a nicely contained environment
> capable of (relatively) safe printing in the context of kernel collapse.
> The trick is handling the non-KDB compiled case, which can probably be
> done through a KDB replacement stub that contains enough code to halt
> things -- disable interrupts, IPI, etc, without the full debugger
> implementation.
KDB is non-optional code, so this can be done without problems or
stubs:
muffin(FreeBSD/ia32)% grep subr_kdb *
files:kern/subr_kdb.c standard
The KDB option is used to control the inclusion of debugging code.
For example: serial drivers can conditionally act upon the detection
of a line break or the alternate break character sequence and jump
to the debugger. This is made conditional upon at least KDB.
Without option KDB serial drivers would not treat a line break
specially or compile-in code that detects the alternate break
sequence.
--
Marcel Moolenaar USPA: A-39004 marcel at xcllnt.net
More information about the cvs-src
mailing list