Date: Sun, 16 Nov 2003 21:30:48 -0500 (EST) From: Robert Watson <rwatson@freebsd.org> To: Harald Schmalzbauer <h@schmalzbauer.de> Cc: current@freebsd.org Subject: Re: General debug/kernel question Message-ID: <Pine.NEB.3.96L.1031116212605.25438k-100000@fledge.watson.org> In-Reply-To: <200311170243.18436@harrymail>
next in thread | previous in thread | raw e-mail | index | archive | help
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@fledge.watson.org Network Associates Laboratories
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1031116212605.25438k-100000>