Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 1999 10:18:30 +0930 (CST)
From:      Mark Newton <newton@internode.com.au>
To:        grog@lemis.com (Greg Lehey)
Cc:        archie@whistle.com, ChrisMic@clientlogic.com, gjb@comkey.com.au, questions@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Debug kernel by default (was: System size with -g)
Message-ID:  <199904070048.KAA16506@gizmo.internode.com.au>
In-Reply-To: <19990407082416.H2142@lemis.com> from "Greg Lehey" at Apr 7, 99 08:24:16 am

next in thread | previous in thread | raw e-mail | index | archive | help
Greg Lehey wrote:

 > You don't need to install the kernel.debug on the root file system.
 > The obvious place to put it is in /var/crash.
 
Not so sure about that:  If you have half a dozen crash dumps in 
/var/crash all from different kernels, how do you work out which
one matches the debug kernel you happen to have there too?

Pity we can't trust the system's state at crash time.  It should
be possible to boot from a debug kernel in / without reading the
symbol table, and copy its symbol table into the crash dump at the
time the system panics.  Core dumps could then be, for all intents and
purposes, self-contained.

Perhaps savecore could do that.

Maybe "make install" in /sys/compile/WHATEVER needs to copy two
kernels:  One of them is the normal one which ends up in /, and
put a debug kernel into /var/crash like you suggest;  make savecore
copy the symbol table from /var/crash/kernel.debug into crash dumps
so that the problem I pointed to in my first paragraph above doesn't
happen.

 > A number of other people have observed that the current boot loader
 > doesn't load the symbols anyway, so you could install /kernel.debug
 > only and still run normally.  I consider this a deficiency in the boot
 > loader, since it should be possible to load the symbols.  Of course,
 > an alternative solution would be to install /kernel.debug and leave it
 > until boot time to decide whether to load the symbols.  That would
 > have the great advantage that you wouldn't get any mismatch between
 > the two kernels.
 
Load the symbols when you drop into ddb for the first time.  CTRL-ALT-ESC
can bring up the spinner for a moment...

Anther idea - Is there any reason why symbol table data can't be in a
KLD that's built at kernel build time and left in /sys/compile/WHATEVER?

   - mark

----
Mark Newton                             Email:  newton@internode.com.au
Network Engineer                        Desk:   +61-8-82232999
Internode                               Mobile: +61-416-202-223


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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