5

I was expecting that after installing the package libgtk-3-0-dbg I would get DDD to show the source code when stepping into gtk+, however I had to download the source package myself (from here) and move it to the proper /build directory :(

1 Answer 1

3

-dbg packages aren't automatic - the package maintainer needs to define the package, and pass the appropriate parameters to the package building tools to ensure the package has any content.

By convention, but not by actual policy, the -dbg package is populated with data which would otherwise be removed by a call to GNU strip, i.e. debugging symbols which are stripped by default (again, by convention, but not policy). Or some language-specific equivalent in the case of non-ELF libraries (e.g. .mdb files for .NET libraries).

The convention doesn't call for -dbg packages to include source (since we already have a mechanism for including those and making them available, i.e. apt-get source pkgname).

Ubuntu has a mechanism for automatic creation of "Debug debs", or .ddeb files, which are functionally the same as -dbg packages but are created automatically by build servers (i.e. an unmodified package with no -dbg package, compiled on Ubuntu's servers, will get a .ddeb automatically) - but, again, because there is a mechanism in place for making source available, .ddebs do not include source as they don't need to.

3
  • thanks Jo! btw, I've tried apt-get source libgtk-3-0 but I still didn't get the sources in the proper location for being picked up automatically by the debugger (in /build), where did they get installed?
    – knocte
    Aug 12, 2013 at 15:51
  • 1
    "apt-get source" unpacks to the current directory
    – directhex
    Aug 12, 2013 at 21:48
  • 1
    Instead of moving the source to /build you can add the appropriate directory to gdb's search path with the "directory" command.
    – RAOF
    Aug 12, 2013 at 23:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .