From owner-freebsd-questions@FreeBSD.ORG Fri Jun 3 11:09:04 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E54016A41F for ; Fri, 3 Jun 2005 11:09:04 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from aiolos.otenet.gr (aiolos.otenet.gr [195.170.0.23]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD60443D49 for ; Fri, 3 Jun 2005 11:09:01 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from kane.otenet.gr (kane.otenet.gr [195.170.0.27]) by aiolos.otenet.gr (8.13.4/8.13.4/Debian-1) with ESMTP id j53B90pg018492; Fri, 3 Jun 2005 14:09:00 +0300 Received: from orion.daedalusnetworks.priv (aris.bedc.ondsl.gr [62.103.39.226]) by kane.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j53B6nPe013736; Fri, 3 Jun 2005 14:06:50 +0300 Received: from orion.daedalusnetworks.priv (orion [127.0.0.1]) by orion.daedalusnetworks.priv (8.13.3/8.13.3) with ESMTP id j53B8xiY011638; Fri, 3 Jun 2005 14:08:59 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by orion.daedalusnetworks.priv (8.13.3/8.13.3/Submit) id j53B8wgx011637; Fri, 3 Jun 2005 14:08:58 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Fri, 3 Jun 2005 14:08:58 +0300 From: Giorgos Keramidas To: fandino Message-ID: <20050603110858.GA11519@orion.daedalusnetworks.priv> References: <42A02F3F.1060202@ng.fadesa.es> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42A02F3F.1060202@ng.fadesa.es> Cc: freebsd-questions@freebsd.org Subject: Re: debugging system libraries X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jun 2005 11:09:04 -0000 On 2005-06-03 12:21, fandino 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