Date: Thu, 22 Feb 2007 23:35:42 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: freebsd-questions@freebsd.org Subject: Re: How to build program with debug symbols Message-ID: <20070222213541.GB1781@kobe.laptop> In-Reply-To: <20070222160325.8AE0.GERARD@seibercom.net> References: <20070222160325.8AE0.GERARD@seibercom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-02-22 16:03, Gerard <gerard@seibercom.net> wrote: > FreeBSD-6.2 > I need to know how to build a program with debugging symbols. The > problem I am having is that claws-mail-2.7.2 continually crashes but > does not display any debug symbols. I talked with the claws-mail > people, and they advised me to build a version with debug symbols > since the output I supplied them was useless without it. Their > suggestion was that I build from a tarball and use the proper Ąconfig˘ > flags to get debug symbols included in the program. The problem is > that I would rather not mess with that scenario, but rather use the > port version instead. The port version does have an option to build a > debug version, but apparently, the symbols are stripped out when the > program is installed. > > The port maintainer suggested that I use this is the Makefile: > > "STRIP= #empty" > > However, he is not even sure if it will work. I just want to find out > what the best way to go about this is so that I can get this problem > resolved. I think it's much better to avoid tweaking ${STRIP} and set DEBUG_FLAGS instead. You have to make sure that at least the claws-mail-2.7.2 port is *rebuilt* from source. The following should work fine: # cd /usr/ports/mail/claws-mail # make deinstall # env DEBUG_FLAGS='-ggdb' make install The STRIP variable is explicitly set to an empty value when DEBUG_FLAGS is defined, so you get both a debugging *and* non-stripped binary by setting DEBUG_FLAGS. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070222213541.GB1781>