Date: Wed, 26 Mar 2003 17:10:11 -0500 From: taxman <taxman@acd.net> To: Dan Nelson <dnelson@allantgroup.com>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: How to produce debugging symbols? Message-ID: <200303261710.11281.taxman@acd.net> In-Reply-To: <20030326201149.GE31787@dan.emsphone.com> References: <20030326200449.GB967@bsdsi.homeunix.com> <20030326201149.GE31787@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 26 March 2003 03:11 pm, Dan Nelson wrote: > In the last episode (Mar 26), Martin Moeller said: > > I have a rather general question on debugging. I'm experiencing some > > problems with some programs on FreeBSD 5.0. Because I'm quite a unix > > newbie, I can only write to some mailinglists to ask if somebody > > knows what to do. > > > > But I would like to take a few steps to solve my problems on my own. > > I read something about gdb and kernel debugging, but find that > > somehow disturbing. So I would like to ask a very *stupid* newbie > > question: > > > > I can run a program within gdb, but I don't see the program's source > > code. I assume this is meant with debug symbols? How can I compile a > > program with those debug symbols? > > 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? Thanks, Tim
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303261710.11281.taxman>