how to find where a port came from and rebuild with debug symbols

2013-08-24 Thread Gary Aitken
If I have a core file that implicates a library:
  #0  0x00080525cab0 in wxWindow::DoSetSize () from 
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
and 
#16 0x0008056bf720 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?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to find where a port came from and rebuild with debug symbols

2013-08-24 Thread ill...@gmail.com
On 24 August 2013 12:05, Gary Aitken vagab...@blackfoot.net wrote:
 If I have a core file that implicates a library:
   #0  0x00080525cab0 in wxWindow::DoSetSize () from 
 /usr/local/lib/libwx_gtk2u_core-2.8.so.0
 and
 #16 0x0008056bf720 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.

-- 
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: how to find where a port came from and rebuild with debug symbols

2013-08-24 Thread Warren Block

On Sat, 24 Aug 2013, ill...@gmail.com wrote:


On 24 August 2013 12:05, Gary Aitken vagab...@blackfoot.net wrote:

If I have a core file that implicates a library:
  #0  0x00080525cab0 in wxWindow::DoSetSize () from 
/usr/local/lib/libwx_gtk2u_core-2.8.so.0
and
#16 0x0008056bf720 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?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org