Living with mricon I get exposed to the way the other half lives. One thing I've noticed is that the RPM tools automatically build extra -debuginfo packages that contain the debugging symbols for the binaries in the package, which gdb can use. I thought too myself "That's cool, why doesn't Debian do that?" Of course, after some research it's actually very easy to accomplish the same thing in a DEB.
First step is just to add a dbg package to your debian/control
file like so:
Package: giblib1-dbg Architecture: any Section: libdevel Priority: extra Depends: giblib1 (= ${Source-Version}) Description: debugging symbols for giblib1 giblib is a library of handy stuff. Contains an imlib2 wrapper to avoid the context stuff, doubly-linked lists and font styles. . This package contains the debugging symbols for giblib1.
Then change your call to dh_strip
in your debian/rules
files so it looks like this:
dh_strip --dbg-package=giblib1-dbg
If you use cdbs then just add the line:
DEB_DH_STRIP_ARGS := --dbg-package=giblib1-dbg
These cause dh_strip
to place the debugging symbols under /usr/lib/debug
in the named package. Make sure you have debhelper compatibility level set to 5, as the semantics for the --dbg-package switch in 4 and earlier were different and weird.
So add a -dbg package to your library or binary today!