From owner-freebsd-questions@FreeBSD.ORG Sat Aug 24 18:39:05 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C19A168C for ; Sat, 24 Aug 2013 18:39:05 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 71B5E2CE7 for ; Sat, 24 Aug 2013 18:39:05 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.7/8.14.7) with ESMTP id r7OIcogB042588; Sat, 24 Aug 2013 12:38:50 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.7/8.14.7/Submit) with ESMTP id r7OIcoZh042585; Sat, 24 Aug 2013 12:38:50 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Sat, 24 Aug 2013 12:38:50 -0600 (MDT) From: Warren Block To: "illoai@gmail.com" Subject: Re: how to find where a port came from and rebuild with debug symbols In-Reply-To: Message-ID: References: <5218D9B4.1060003@blackfoot.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Sat, 24 Aug 2013 12:38:50 -0600 (MDT) Cc: Gary Aitken , FreeBSD Mailing List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Aug 2013 18:39:05 -0000 On Sat, 24 Aug 2013, illoai@gmail.com wrote: > On 24 August 2013 12:05, Gary Aitken wrote: >> If I have a core file that implicates a library: >> #0 0x000000080525cab0 in wxWindow::DoSetSize () from /usr/local/lib/libwx_gtk2u_core-2.8.so.0 >> and >> #16 0x00000008056bf720 in wxAuiManager::Update () from /usr/local/lib/libwx_gtk2u_aui-2.8.so.0 >> >> and I want to find out which port these came from so I can rebuild it >> with debug symbols, how do I do that? > > As to the first look at pkg-which(8): > % pkg which /usr/local/lib/libwx_gtk2_aui-2.8.so.0 > /usr/local/lib/libwx_gtk2_aui-2.8.so.0 was installed by package wxgtk2-2.8.12_2 > % pkg which -o /usr/local/lib/libwx_gtk2_aui-2.8.so.0 > /usr/local/lib/libwx_gtk2_aui-2.8.so.0 was installed by package > x11-toolkits/wxgtk28 > (the -q flag makes it all lovely & terse) > > As to the second: > I don't know, some ports have an option to build with debug symbols, but if not > you might have to edit some Makefiles, or worse. Can't you just add WITH_DEBUG=yes to the make command or make.conf?