Debugging Symbols - splitdebug

From Sabayon Wiki
Jump to: navigation, search

Packages are, by default, installed without debugging symbols in Sabayon. This saves space, specially for users that are not developers and are not interested in debugging applications. But for those of us who are developers, finding the debug symbols of Entropy packages can come in handy. To do so, change the value of the splitdebug variable to enable in /etc/entropy/client.conf

# Enable the installation of debug files
# Also known as "splitdebug" support
# Valid parameters: disable, enable, true, false, disabled, enabled, 0, 1
# Default parameter if unset: disable
splitdebug = enable
# HOW SPLITDEBUG WORKS with Entropy
# Once you enable the "splitdebug" feature
# you just need to (re)install packages in order to
# get /usr/lib/debug metadata files installed. That's it.
# You can safely remove /usr/lib/debug without affecting
# Operating System functionality, at any time.

After modifying this, next time you installa package, you will also get debug symbols installed inside /usr/lib/debug. For example, if you run equo install networkmanager you will get the following debugging files:

>>  ### /usr/lib/debug
>>  ### /usr/lib/debug/usr
>>  ### /usr/lib/debug/usr/bin
>>  ### /usr/lib/debug/usr/bin/nm-online.debug
>>  ### /usr/lib/debug/usr/bin/nm-tool.debug
>>  ### /usr/lib/debug/usr/bin/nmcli.debug
>>  ### /usr/lib/debug/usr/lib
>>  ### /usr/lib/debug/usr/lib/NetworkManager
>>  ### /usr/lib/debug/usr/lib/NetworkManager/libnm-settings-plugin-ifnet.so.debug
>>  ### /usr/lib/debug/usr/lib/libnm-glib-vpn.so.1.1.0.debug
>>  ### /usr/lib/debug/usr/lib/libnm-glib.so.4.2.0.debug
>>  ### /usr/lib/debug/usr/lib/libnm-util.so.2.1.0.debug
>>  ### /usr/lib/debug/usr/lib/pppd
>>  ### /usr/lib/debug/usr/lib/pppd/2.4.5
>>  ### /usr/lib/debug/usr/lib/pppd/2.4.5/nm-pppd-plugin.so.debug
>>  ### /usr/lib/debug/usr/libexec
>>  ### /usr/lib/debug/usr/libexec/nm-avahi-autoipd.action.debug
>>  ### /usr/lib/debug/usr/libexec/nm-crash-logger.debug
>>  ### /usr/lib/debug/usr/libexec/nm-dhcp-client.action.debug
>>  ### /usr/lib/debug/usr/libexec/nm-dispatcher.action.debug
>>  ### /usr/lib/debug/usr/sbin
>>  ### /usr/lib/debug/usr/sbin/NetworkManager.debug

GDB: libpthread library mismatch with libthread_db

If there is no debug symbols for libpthread library, GDB will not directly say that there is no debugging symbols for libpthread, instead, whenever you start GDB, it will show below warning,

warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.

To fix this issue, just enable splitdebug inside /etc/entropy/client.conf and reinstall sys-libs/glibc package. See this link for more information.

# equo install sys-libs/glibc