From owner-freebsd-current@FreeBSD.ORG Sun Nov 16 18:32:51 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF04D16A4CF for ; Sun, 16 Nov 2003 18:32:51 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8242B43FEA for ; Sun, 16 Nov 2003 18:32:50 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.9p2/8.12.9) with ESMTP id hAH2UmMg055315; Sun, 16 Nov 2003 21:30:48 -0500 (EST) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)hAH2UmjV055312; Sun, 16 Nov 2003 21:30:48 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 16 Nov 2003 21:30:48 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Harald Schmalzbauer In-Reply-To: <200311170243.18436@harrymail> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: current@freebsd.org Subject: Re: General debug/kernel question X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Nov 2003 02:32:52 -0000 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