Re: General debug/kernel question

From: Robert Watson <rwatson_at_freebsd.org>
Date: Sun, 16 Nov 2003 21:30:48 -0500 (EST)
On Mon, 17 Nov 2003, Harald Schmalzbauer wrote:

> I always thought that building a kernel with debug symbols would
> increase the kernel size dramatically. But if I understand things right
> the additioal "symbols" (code snippets?) are not in the kernel but in a
> different file which makes the kernel the same size like without
> debug=-g. Is there any reason to not build it with debug=-g?  Also I
> thought debug kernels suffer from reduced performance. I also have DDB
> in my kernel and don't _feel_ any difference. So again, is there any
> reason not to put DDB into the kernel? 

The kernel installed in /boot is stripped of debugging symbols during
installkernel, which helps with the space problem -- du kernel.debug
sometime, and you'll see why this is particularly necessary :-).  DDB
relies on the linking symbols presenting in the kernel for module loading
to generate stack traces.  The full debugging kernel is used for offline
debugging of core dumps, serial debugging, etc with gdb.  The usual reason
not to put DDB in a kernel is that the user doesn't know what to do with
it, or because it causes panics to halt as opposed to reboot.  The
DDB_UNATTENDED option can help with that though.  Another thing to keep in
mind is that if you're using X11 on the console, it prevent you from
seeing DDB output unless you're using a serial console, so X11 will simply
appear to hang...

Robert N M Watson             FreeBSD Core Team, TrustedBSD Projects
robert_at_fledge.watson.org      Network Associates Laboratories
Received on Sun Nov 16 2003 - 17:32:51 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:29 UTC