Date: Fri, 3 Jun 2005 14:08:58 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: fandino <fandino@ng.fadesa.es> Cc: freebsd-questions@freebsd.org Subject: Re: debugging system libraries Message-ID: <20050603110858.GA11519@orion.daedalusnetworks.priv> In-Reply-To: <42A02F3F.1060202@ng.fadesa.es> References: <42A02F3F.1060202@ng.fadesa.es>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-06-03 12:21, fandino <fandino@ng.fadesa.es> wrote: > Hello, > > I run an application which segsfaults in the libpthread library and I > wonder if it could be possible enable debuging info in this libraries. > > By now I added "-g" to the list the global compile flags but the symbols > are stripped by the installation script. > > how could I get system libraries with symbols? > > thank you. > > (gdb) bt > #0 0x282ec31b in pthread_testcancel () from /usr/lib/libpthread.so.1 > #1 0x282e4902 in pthread_mutexattr_init () from /usr/lib/libpthread.so.1 > #2 0x00000000 in ?? () The best way to build something with debugging support is to set DEBUG_FLAGS in the environment (or make.conf): # cd /usr/src/lib/libedit # make cleandir # make cleandir # make obj # env DEBUG_FLAGS='-g' make all install Setting DEBUG_FLAGS adds the value of DEBUG_FLAGS to any existing CFLAGS and disables symbol stripping, all at the same time. Look at bsd.lib.mk under /usr/share/mk for the way DEBUG_FLAGS works. - Giorgos
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050603110858.GA11519>