Package: developers-reference Version: 3.3.8 Severity: normal The document is missing anything about -dbg packages. Here's some text you can include if you like it: Debug packages A debug package is a package with a name ending in "-dbg", that contains additional information that gdb can use. Since Debian binaries are stripped by default, debugging information, including function names and line numbersm is not available when running gdb on Debian binaries. Debug packages allow users who need this additional debugging information to install it, without bloating a regular system with the information. It is up to a package's maintainer whether to create a debug package or not. Maintainers are encouraged to create debug packages for library packages, since this can aid in debugging many programs linked to a library. In general, debug packages do not need to be added for all programs; doing so would bloat the archive. But if a maintainer finds that users often need a debugging version of a program, it can be worthwhile to make a debug package for it. Programs that are core infrastructure, such as apache and the X server are also good candidates for debug packages. Some debug packages may contain an entire special debugging build of a library or other binary, but most of them can save space and build time by instead containing separated debugging symbols that gdb can find and load on the fly when debugging a program or library. The convention in Debian is to keep these symbols in /usr/lib/debug/<path>, where <path> is the path to the executable or library. For example, debugging symbols for /usr/bin/foo go in /usr/lib/debug/usr/bin/foo, and debugging symbols for /usr/lib/libfoo.so.1 go in /usr/lib/debug/usr/lib/libfoo.so.1 . The debugging symbols can be extracted from an object file using "objcopy --only-keep-debug". Then the object file can be stripped, and "objcopy --add-gnu-debuglink" used to specify the path to the debugging symbol file. The man page for objcopy(1) explains in detail how this works. The dh_strip command in debhelper supports creating debug packages, and can take care of using objcopy to separate out the debugging symbols for you. If your package uses debhelper, all you need to do is call "dh_strip --dbg-package=libfoo-dbg", and add an entry to debian/control for the debug package. Note that the Debian package should depend on the package that it provides debugging symbols for, and this dependency should be versioned. For example: Depends: libfoo-dbg (= ${binary:Version}) -- System Information: Debian Release: lenny/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Kernel: Linux 2.6.20-1-686 (SMP w/1 CPU core) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash developers-reference depends on no packages. Versions of packages developers-reference recommends: ii debian-policy 3.7.2.2 Debian Policy Manual and related d -- no debconf information -- see shy jo
Attachment:
signature.asc
Description: Digital signature