[C++-sig] Howto debug boost::python under redhat/fedora linux

Neal D. Becker ndbecker2 at verizon.net
Tue Sep 14 14:45:26 CEST 2004


This information might be good to add to the docs.

Under Redhat/Fedora Linux, binaries are normally stripped of debugging
symbols.  This means that running 'gdb /usr/bin/python' will not be very
useful.

The debugging symbols are shipped as a seperate package.  You need to
install: (e.g.) python-debuginfo.

If you are using yum, you can add this to your yum.conf:
[debug]
name=debug
baseurl=http://mirror.linux.duke.edu/pub/fedora/linux/core/$releasever/$basearch/debug/

Now to use it do the following:

1. gdb /usr/bin/python
2. sym /usr/lib/debug/usr/bin/python.debug
3. cd <whereever>, start your program.
4. After the desired shared library is loaded by python send an interrupt to
the process and gdb will wake up, allowing you to set a breakpoint in your
shared module.








More information about the Cplusplus-sig mailing list