This page explains how to make debugging symbols available for gdb/bug-buddy so that when an application crashes and you get a stack trace it will be much more useful for developers. This usually involves installing debug packages or sometimes recompiling with special flags. After following your distro's instructions for making the symbols available, see GettingTraces (or GettingTraces/Details) for further information on how to get a new stack trace to submit.

Please see the section of the operating system you are running:

Debian

Check for the presence of a -dbg package for the source package you're investigating. For example, if you're looking into a gnome-applets crash, install gnome-applets-dbg.

If the crash happens in a GNOME library, for example in libgnomeui, here you might want to install libgnomeui-dbg. However, the rule also applies to non-GNOME libs; for example, Epiphany is built against xulrunner, so you should install libxul0d-dbg as well. You can also install debugging symbols for most GNOME libraries in a single run by installing the gnome-dbg metapackage.

If there's no debug package for your package, you should rebuild the package with debugging symbols. This is easy and documented in the Debian wiki: http://wiki.debian.org/HowToGetABacktrace

Fedora

Debuginfo packages can be obtained either by using the yum application or manually from fedora ftp. Please also see the Fedora wiki for the easiest way how to obtain and install debuginfo packages.

If you haven't applied any updates, you can get the debuginfo packages you need from http://download.fedora.redhat.com/pub/fedora/linux/releases/<version>/Everything/<arch>/debug/, replacing <version> with the appropriate version of Fedora (7, 8, etc.) and <arch> with the appropriate architecture (i386 for most users, x86_64 for users with 64 bit machines, etc.). If you are running an older Fedora version (6 or earlier), the packages are available at http://download.fedora.redhat.com/pub/fedora/linux/core/<version>/<arch>/debug/. Note that there are also debuginfo packages for Gnome 1.x apps; users will almost always want the 2.x versions (e.g. glib2, gtk2, gnome-vfs2, etc.).

If you have applied updates from Fedora, you'll need to get the corresponding debuginfo packages instead from http://download.fedora.redhat.com/pub/fedora/linux/updates/<version>/<arch>/debug/, replacing <version> with the appropriate version of Fedora (7, 8, etc.). If you are running an older Fedora version (6 or earlier), the packages are available at http://download.fedora.redhat.com/pub/fedora/linux/core/updates/<version>/<arch>/debug/. To determine whether you've applied updates for a specific program, check the version number of your program (Under "Help -> About" in the menu) and compare to the version number of the debuginfo rpm. (Alternatively, you can open up a terminal and type 'rpm -q <package-name>').

Fedora Core 6 and prior

You can also get debuginfo packages using yum. You have to edit the fedora-core.repo and fedora-updates.repo file /etc/yum.repos.d to enable this. In these files there is a section like [core-debuginfo] that initially contains "enabled=0". Just change this to "enabled=1", and then you can use yum like "yum install gtk2-debuginfo" to install debuginfo packages.

Fedora 7 and later

Similarly to Fedora Core 6 and prior, edit the /etc/yum.repos.d/fedora.repo file, look for the "fedora-debuginfo" section, and change "enabled=0" to "enabled=1". Edit also /etc/yum.repos.d/fedora-updates.repo, look for the "updates-debuginfo" section, and change "enabled=0" to "enabled=1". You can then install the debuginfo packages by either using the yum command directory, or by using the "Add/Remove Software" item inside the Applications menu (reachable from within the GNOME panel, typically at the upper left corner of the desktop).

Gentoo

Gentoo users usually build packages from source with compiler optimizations that make it impossible to obtain a useful stack trace. In order to enable debugging symbols in Gentoo, you need to do the following:

Also, do not worry about the "slowdown" caused by these settings. The real executables do not include the debugging information themselves, but the splitdebug option stores them separately under /usr/lib/debug. After these settings have been set, then just recompile your application and see if the application displays its debug information.

For more information, see also Gentoo's own documentation on how to get meaningful backtraces: http://www.gentoo.org/proj/en/qa/backtraces.xml

SUSE

debuginfo packages for versions of SUSE 9.3 and older can be found at ftp://ftp.suse.com/pub/suse/i386/<version>/suse/i586/ Versions 10.2, 10.3, and 11.0 can be found at http://download.opensuse.org/distribution/<SL-version>/inst-source/suse/i586/. Versions >=11.1 should look in http://download.opensuse.org/debug/distribution/<SL-version>/repo/oss/.

Install the appropriate ones for the program that has crashed and re-report the bug. (x86_64 users can replace i586 with x86_64 to find their debug packages) Users of openSUSE Factory need to access the debug repository found at http://download.opensuse.org/factory/repo/debug/

Ubuntu Edgy (6.10)

you can get -dbgsym packages (for all the packages which have been rebuilt since the service is running) from the "deb http://people.ubuntu.com/~pitti/ddebs edgy main universe" apt archive (you can add it from the software-properties UI - see https://help.ubuntu.com/community/Repositories/Ubuntu for how to do this - or to the apt sources.list directly). The packages are name package-dbgsym where "package" is the name of the package you want to install (gnome-panel-dbgsym for gnome-panel by example). Those packages contain debug symbols only, you need to keep the normal package installed

Ubuntu (except Edgy)

The lib packages often have a -dbg variant (ie: libglib2.0-0-dbg), you just need to install them as gdb/bug-buddy will automatically pick up the debugging information the next time it runs. You probably want to install libglib2.0-0-dbg, libgtk2.0-0-dbg, and libgnomevfs2-0-dbg in addition to debug packages specific for the application or library that is crashing.

Ubuntu has dbg packages only for some desktop applications (ie: gnome-panel-dbg, nautilus-dbg, ...). You can search for debug packages by issuing apt-cache search <packagename> | grep "dbg" in a terminal. (If anyone has a source for the other dbg packages for recent Ubuntu versions, like dapper, please paste it here.) Some unordered additional dbg packaged for Ubuntu Dapper can currently be found here: http://people.ubuntu.com/~seb128/debug-pkgs/ and http://people.ubuntu.com/~seb128/debug/

To build a debug package yourself (from source), you can use DEB_BUILD_OPTIONS="nostrip noopt". See the Debian Wiki for details on how to do so on Debian or consult the Ubuntu Wiki pages.

Mandriva

debug packages are currently available for Mandriva Linux 2007.0 and cooker distributions, on ftp mirrors. You can add the debug_main and debug_contrib urpmi sources by visiting the following website:

http://easyurpmi.zarb.org/

Once it is done, just use urpmi <main-package-name>-debug to install relevant debug packages (ie packages for tested application as well as dynamic libraries used by the application).

More explanations are available at http://wiki.mandriva.com/en/Development/Howto/Software_Crash

FreeBSD

To our knowledge, there are no debug packages available. You need to recompile from source. Before doing so, you must include the following line in the /etc/make.conf file:

WITH_DEBUG=

Foresight

Every package has a ":debuginfo" trove. To install these do:

sudo conary update <main-package-name>:debuginfo --sync-to-parents

as a start do:

sudo conary update glib:debuginfo gtk:debuginfo gnome-vfs:debuginfo --sync-to-parents

GettingTraces/DistroSpecificInstructions (last edited 2009-03-09 16:43:07 by TomParker)