Eyes Above The Waves

Robert O'Callahan. Christian. Repatriate Kiwi. Hacker.

Sunday 26 June 2016

Dear Ubuntu, Please Fix Your Debuginfo Packaging

Fedora has a delightfully simple approach to supplying debuginfo for its packages: you run sudo dnf debuginfo-install <original-package-name> and everything you need to debug that code is installed (including sources). It also installs debuginfo for dependent packages.

Ubuntu does not. With Ubuntu, you first have to figure out the name of the debuginfo package to install. This is not easy. Once you've figured that out. you install the package and find that it's mostly useless because it doesn't contain sources. So you try to install sources using sudo apt source ..., but that fails because "You must put some 'source' URIs in your sources.list". Then you look at /etc/apt/sources.list and discover that all the necessary deb-src URLs are there, but commented out by default. (Why? Because otherwise it would make things too easy?) Then you uncomment those URLs and try again, but get the same error. Then you wail and gnash your teeth a bit and figure out you need to run sudo apt-get update before retrying. Finally you've got the source package installed, then you run rr replay (or gdb if you must) and discover that it's not finding those sources. Then, unless you're more stubborn than I am (or just have more time to burn), you give up in despair.

Seriously Ubuntu (or Debian), just copy Red Hat here. Please.

Comments

Anonymous
Well, it is almost ten years ago when (enforced by laziness) I switched from Debian to Fedora/RHEL, but I still feel that shocking experience of gdb just working.
dannas
Agreed, symbol management on Ubuntu/Debian is somewhat deficient. Some pointers to resources related to Ubuntu/Debian symbol management: You can use gdb's directory command for specifying where to find source files. If the debug symbols has absolute paths, you can use the substitute-path command. https://blogs.oracle.com/ksplice/entry/8_gdb_tricks_you_should Bruce Dawson has a good series of articles on debug symbol management on Linux (and their shortcomings): https://randomascii.wordpress.com/2013/01/08/symbols-on-linux-part-one-g-library-symbols/ There is a shell script floating around on the Internet for downloading all debug-symbols and sources for a specific deb packet (including those of the packages it depends on) but I can't seem to find it right now.