From owner-freebsd-questions Tue Apr 6 17:52:58 1999 Delivered-To: freebsd-questions@freebsd.org Received: from gizmo.internode.com.au (gizmo.internode.com.au [192.83.231.115]) by hub.freebsd.org (Postfix) with ESMTP id 2351B15749; Tue, 6 Apr 1999 17:52:48 -0700 (PDT) (envelope-from newton@gizmo.internode.com.au) Received: (from newton@localhost) by gizmo.internode.com.au (8.9.3/8.9.3) id KAA16506; Wed, 7 Apr 1999 10:18:30 +0930 (CST) (envelope-from newton) From: Mark Newton Message-Id: <199904070048.KAA16506@gizmo.internode.com.au> Subject: Re: Debug kernel by default (was: System size with -g) To: grog@lemis.com (Greg Lehey) Date: Wed, 7 Apr 1999 10:18:30 +0930 (CST) Cc: archie@whistle.com, ChrisMic@clientlogic.com, gjb@comkey.com.au, questions@FreeBSD.ORG, hackers@FreeBSD.ORG In-Reply-To: <19990407082416.H2142@lemis.com> from "Greg Lehey" at Apr 7, 99 08:24:16 am X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey wrote: > You don't need to install the kernel.debug on the root file system. > The obvious place to put it is in /var/crash. Not so sure about that: If you have half a dozen crash dumps in /var/crash all from different kernels, how do you work out which one matches the debug kernel you happen to have there too? Pity we can't trust the system's state at crash time. It should be possible to boot from a debug kernel in / without reading the symbol table, and copy its symbol table into the crash dump at the time the system panics. Core dumps could then be, for all intents and purposes, self-contained. Perhaps savecore could do that. Maybe "make install" in /sys/compile/WHATEVER needs to copy two kernels: One of them is the normal one which ends up in /, and put a debug kernel into /var/crash like you suggest; make savecore copy the symbol table from /var/crash/kernel.debug into crash dumps so that the problem I pointed to in my first paragraph above doesn't happen. > 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. Load the symbols when you drop into ddb for the first time. CTRL-ALT-ESC can bring up the spinner for a moment... Anther idea - Is there any reason why symbol table data can't be in a KLD that's built at kernel build time and left in /sys/compile/WHATEVER? - mark ---- Mark Newton Email: newton@internode.com.au Network Engineer Desk: +61-8-82232999 Internode Mobile: +61-416-202-223 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message