backtrace() and the console log (was Re: cvs commit:
src/sys/alpha...)
Nate Lawson
nate at root.org
Tue Jan 20 20:33:11 PST 2004
On Wed, 21 Jan 2004, Ian Dowse wrote:
> In message <20040120144505.ccsc4kog4c88sgww at www.sweetdreamsracing.biz>, Kenneth
> Culver writes:
> >Quoting Nate Lawson <nate at root.org>:
> >> * Fix backtrace() so the output goes to the console log. Right now, we
> >> get output that needs to be hand-transcribed or use a serial console.
> >
> >This is also very useful for when FreeBSD crashes when X is running. If X is
> >running, the only option is a serial console, as you can't see the crash to
> >transcribe it otherwise, and most people don't have the spare computer to use
> >as a serial console.
>
> I've been using the following patch for a while to get backtrace()
> to output to the kernel message buffer. Sending all ddb output via
> printf might be undesirable for some cases, but I guess having it
> configurable with a `debug.ddb_use_printf' sysctl that defaults to
> the old behaviour would be ok?
Can't you just check that you aren't in DDB before printing to the message
buf?
Like this:
if (boothowto & RB_KDB) {
normal behavior to console via cnputc()
} else {
print to message buf instead
}
-Nate
More information about the cvs-src
mailing list