From owner-freebsd-questions@FreeBSD.ORG Sat Aug 24 16:05:23 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 308AFC6C for ; Sat, 24 Aug 2013 16:05:23 +0000 (UTC) (envelope-from vagabond@blackfoot.net) Received: from nightmare.dreamchaser.org (nightmare.dreamchaser.org [12.32.44.142]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E2D802587 for ; Sat, 24 Aug 2013 16:05:22 +0000 (UTC) Received: from breakaway.dreamchaser.org (breakaway.dreamchaser.org. [12.32.36.73]) by nightmare.dreamchaser.org (8.13.6/8.13.6) with ESMTP id r7OG58cg093888 for ; Sat, 24 Aug 2013 10:05:09 -0600 (MDT) (envelope-from vagabond@blackfoot.net) Message-ID: <5218D9B4.1060003@blackfoot.net> Date: Sat, 24 Aug 2013 10:05:08 -0600 From: Gary Aitken User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130730 Thunderbird/17.0.7 MIME-Version: 1.0 To: FreeBSD Mailing List Subject: how to find where a port came from and rebuild with debug symbols Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (nightmare.dreamchaser.org [12.32.36.65]); Sat, 24 Aug 2013 10:05:09 -0600 (MDT) 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 16:05:23 -0000 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? $ nm -a /usr/local/lib/libwx_gtk2u_core-2.8.so.0 nm: /usr/local/lib/libwx_gtk2u_core-2.8.so.0: no symbols Clearly I'm doing something wrong there... So I try guessing: pkg_info pkg_info | grep gtk2 linux-f10-gtk2-2.14.7_4 GTK+ library, version 2.X (Linux Fedora 10) webkit-gtk2-1.8.3_2 An opensource browser engine wxgtk2-common-2.8.12_2 The wxWidgets GUI toolkit (common files) wxgtk2-unicode-2.8.12_2 The wxWidgets GUI toolkit (Unicode) more guessing: locate wxgtk2-common /var/db/pkg/wxgtk2-common-2.8.12_2 /var/db/pkg/wxgtk2-common-2.8.12_2/+COMMENT /var/db/pkg/wxgtk2-common-2.8.12_2/+CONTENTS /var/db/pkg/wxgtk2-common-2.8.12_2/+DESC /var/db/pkg/wxgtk2-common-2.8.12_2/+MTREE_DIRS /var/db/pkg/wxgtk2-common-2.8.12_2/+REQUIRED_BY /var/db/pkg/wxgtk2-common-2.8.12_2/distfiles After grousing around I find drwxr-xr-x 4 root wheel 512 Aug 24 09:38 x11-toolkits/wxgtk28 drwxr-xr-x 2 root wheel 512 Aug 8 10:51 x11-toolkits/wxgtk28-common drwxr-xr-x 2 root wheel 512 Feb 17 2013 x11-toolkets/wxgtk28-contrib drwxr-xr-x 2 root wheel 512 Feb 17 2013 x11-toolkits/wxgtk28-contrib-common drwxr-xr-x 2 root wheel 512 Aug 8 10:51 x11-toolkits/wxgtk28-unicode drwxr-xr-x 2 root wheel 512 Feb 17 2013 x11-toolkits/wxgtk28-unicode-contrib After doing a make of x11-toolkits/wxgtk28 I find a bunch of lib*.so in ../work/wxGTK-2.8.12/lib and doing nm on them I discover what I want is in libwx_gtk2_aui-2.8.so libwx_gtk2_core-2.8.so However, neither of these exists in /usr/local/lib; only a bunch of other libux things. So.. ldd /usr/local/bin/hugin | grep libwx libwx_baseu-2.8.so.0 => /usr/local/lib/libwx_baseu-2.8.so.0 (0x804d07000) libwx_gtk2u_core-2.8.so.0 => /usr/local/lib/libwx_gtk2u_core-2.8.so.0 (0x80506d000) libwx_gtk2u_aui-2.8.so.0 => /usr/local/lib/libwx_gtk2u_aui-2.8.so.0 (0x80568e000) libwx_gtk2u_xrc-2.8.so.0 => /usr/local/lib/libwx_gtk2u_xrc-2.8.so.0 (0x805904000) libwx_gtk2u_html-2.8.so.0 => /usr/local/lib/libwx_gtk2u_html-2.8.so.0 (0x805ba6000) libwx_baseu_xml-2.8.so.0 => /usr/local/lib/libwx_baseu_xml-2.8.so.0 (0x805e65000) libwx_gtk2u_adv-2.8.so.0 => /usr/local/lib/libwx_gtk2u_adv-2.8.so.0 (0x80606f000) libwx_gtk2u_gl-2.8.so.0 => /usr/local/lib/libwx_gtk2u_gl-2.8.so.0 (0x806356000) libwx_baseu_net-2.8.so.0 => /usr/local/lib/libwx_baseu_net-2.8.so.0 (0x806564000) help? And, assuming I find the right port, how do I rebuild / install it with symbols left in?