From owner-freebsd-questions@FreeBSD.ORG Thu Feb 22 21:36:38 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3475716A402 for ; Thu, 22 Feb 2007 21:36:38 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id A2E7513C4B7 for ; Thu, 22 Feb 2007 21:36:37 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (host5.bedc.ondsl.gr [62.103.39.229]) (authenticated bits=128) by igloo.linux.gr (8.13.8/8.13.8/Debian-3) with ESMTP id l1MLa0ME015060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 22 Feb 2007 23:36:07 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.13.8/8.13.8) with ESMTP id l1MLZgsg001931 for ; Thu, 22 Feb 2007 23:35:54 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.13.8/8.13.8/Submit) id l1MLZgQS001930 for freebsd-questions@freebsd.org; Thu, 22 Feb 2007 23:35:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Thu, 22 Feb 2007 23:35:42 +0200 From: Giorgos Keramidas To: freebsd-questions@freebsd.org Message-ID: <20070222213541.GB1781@kobe.laptop> References: <20070222160325.8AE0.GERARD@seibercom.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-7 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20070222160325.8AE0.GERARD@seibercom.net> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.497, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.70, BAYES_00 -2.60, DNS_FROM_RFC_ABUSE 0.20) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Subject: Re: How to build program with debug symbols 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: Thu, 22 Feb 2007 21:36:38 -0000 On 2007-02-22 16:03, Gerard 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