Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Apr 1999 08:24:16 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Archie Cobbs <archie@whistle.com>, Christopher Michaels <ChrisMic@clientlogic.com>
Cc:        gjb@comkey.com.au, questions@FreeBSD.ORG, hackers@FreeBSD.ORG
Subject:   Re: Debug kernel by default (was: System size with -g)
Message-ID:  <19990407082416.H2142@lemis.com>
In-Reply-To: <199904061757.KAA73737@bubba.whistle.com>; from Archie Cobbs on Tue, Apr 06, 1999 at 10:57:37AM -0700
References:  <6C37EE640B78D2118D2F00A0C90FCB441A5FF9@site2s1> <199904061757.KAA73737@bubba.whistle.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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-questions" in the body of the message




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