Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Mar 2003 16:25:53 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        taxman <taxman@ACD.NET>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: How to produce debugging symbols?
Message-ID:  <20030326222553.GA38860@dan.emsphone.com>
In-Reply-To: <200303261710.11281.taxman@acd.net>
References:  <20030326200449.GB967@bsdsi.homeunix.com> <20030326201149.GE31787@dan.emsphone.com> <200303261710.11281.taxman@acd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Mar 26), taxman said:
> On Wednesday 26 March 2003 03:11 pm, Dan Nelson wrote:
> > If it's your program, recompile and link with the -g commandline
> > switch added.  If it's a base FreeBSD program (or port), edit the
> > Makefile and add a line reading "DEBUG_FLAGS=-g" (this will compile
> > with -g and also no strip the debugging symbols when the binary
> > gets installed).
> 
> Does this work for the kernel?  I'd read that the kernel strips
> symbols anyway.  If i put makeoptions DEBUG=-g in my kernel config
> (as shown in LINT) will I still get the symbols?  Thats for 4.x, what
> about 5.0 is that different?

It still works in 5.0.  What ends up happenning is a debugging kernel
gets built as kernel.debug, but the stripped version is still installed
into /boot/kernel/ (most likely to conserve space on /).  When you
panic and coredump, copy kernel.debug out of the source tree into
/var/crash and use that to debug.

-- 
	Dan Nelson
	dnelson@allantgroup.com



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