Introduction

Debug packages contain debug symbols and usually are named <package>-dbg. They are useful if program crashes and you want to generate stack trace which contains information about functions where it crashed.

dbgsym packages

debhelper/9.20151219 and newer will generate debug symbol packages (as <package>-dbgsym) for you automatically. These packages are not available from the main archive. Please fetch these from debian-debug or snapshot.debian.org.

If you want to transition from a former -dbg package to a -dbgsym package you might want to look into the dh_strip's switch --dbgsym-migration=pkgname-dbg (<< currentversion~)' switch.

-dbgsym packages have the same component as the regular mirror (e.g. "main"), but they exists in a separate "archive". In fact, the suites are also different ("unstable" vs. "unstable-debug"). Basically, the "X-debug" suite works like an "overlay" to the suite "X" (similar to how experimental needs "unstable" to be useful). For that reason, packages in "unstable" cannot depend on packages in "unstable-debug". This means that -dbg packages must not be transitioned to a dummy package depending on -dbgsym. When transitioning to the new system, just drop the -dbg package.

Previous source snippets for manual debug packages

The information below is obsolete, and only provided as a reference of what to migrate to AutomaticDebugPackages.

Package control entry

binary package, typically named <pkg>-dbg.

Package: giblib1-dbg
Section: debug
Depends:
    giblib1 (= ${binary:Version}),
    ${misc:Depends}
...

dh_strip config

dh_strip was invoked with the --dbg-package=foo option to place the debugging symbols under /usr/lib/debug/ in the named package.

Example:

.PHONY: override_dh_strip
override_dh_strip:
        dh_strip --dbg-package=giblib1-dbg

Or:

        dh_strip -pfoo --dbg-package=foo-dbg
        dh_strip -pbar --dbg-package=bar-dbg

A debug package's documentation in /usr/share/doc/giblib1-dbg/ was symlinked to /usr/share/doc/giblib1 using

override_dh_installdocs:
        dh_installdocs --link-doc=giblib1

This can also be removed.


CategoryDeveloper CategoryDebugging CategoryPackaging CategoryProposedDeletion