*BSD News Article 46588


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!howland.reston.ans.net!nntp.crl.com!decwrl!svc.portal.com!news1.best.com!blob.best.net!not-for-mail
From: dillon@best.com (Matt Dillon)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: debug kernel suggestion
Date: 8 Jul 1995 22:13:51 -0700
Organization: Best Internet Communications, Inc. (info@best.com)
Lines: 24
Distribution: best
Message-ID: <3tnoif$3s7@blob.best.net>
NNTP-Posting-Host: blob.best.net

    This is an easy suggestion to implement....  since most root
    partitions must be small in order to not hit the BIOS limitation
    when the bootloader loads /kernel, having a full debug kernel
    in / is not always an option.

    If your root partition isn't big enough to hold the 5-6 MB debug
    kernel, but you want to be able to gdb -k .... core dumps with
    full debugging info, the solution is simple:

    (1) build a full debug kernel
    (2) cp kernel kernel.debug
    (3) strip -d kernel
    (4) make install

    That is, you can install a kernel binary which is the stripped version
    of the full debug kernel binary... the -d option only strips out
    debug info, NOT the symbols, so you wind up with around a 900K
    or so /kernel yet can still gdb using the non-stripped version
    of the kernel, i.e. 'gdb -k kernel.debug vmcore.xx' or something
    along those lines.

						-Matt