From owner-freebsd-hackers Tue Apr 6 15:56:28 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id EF893156C1; Tue, 6 Apr 1999 15:56:20 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id IAA10824; Wed, 7 Apr 1999 08:24:18 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id IAA12662; Wed, 7 Apr 1999 08:24:16 +0930 (CST) Message-ID: <19990407082416.H2142@lemis.com> Date: Wed, 7 Apr 1999 08:24:16 +0930 From: Greg Lehey To: Archie Cobbs , Christopher Michaels Cc: gjb@comkey.com.au, questions@FreeBSD.ORG, hackers@FreeBSD.ORG Subject: Re: Debug kernel by default (was: System size with -g) References: <6C37EE640B78D2118D2F00A0C90FCB441A5FF9@site2s1> <199904061757.KAA73737@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199904061757.KAA73737@bubba.whistle.com>; from Archie Cobbs on Tue, Apr 06, 1999 at 10:57:37AM -0700 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 6 April 1999 at 10:57:37 -0700, Archie Cobbs wrote: > Christopher Michaels writes: >> Maybe I'm a little out of the loop, but as a general user I feel I should >> voice my opinions (questions). >> >> I understand the up-sides of a debug kernel (although I wouldn't mind some >> clarification), but what are the down sides? >> - The kernel is larger, correct? Is this just file size or does it take up >> significantly more memory as well? > > You would install two kernels: /kernel and /kernel.debug. You don't need to install the kernel.debug on the root file system. The obvious place to put it is in /var/crash. > The first one is a normal kernel (but no debugging info) and this is > the one you run. So no more memory is used (except on your > disk). The second you only need as a debug reference for the first > when you get a core dump. To make it clear, you build the kernel.debug. To get the kernel without debugging symbols, you use `strip -g'. 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. Greg -- See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message