Differences between revisions 5 and 6
Revision 5 as of 2009-03-16 03:31:32
Size: 1293
Editor: anonymous
Comment: converted to 1.6 markup
Revision 6 as of 2009-10-16 10:47:54
Size: 1312
Editor: BenFinney
Comment: Update for recent recommendations and changes in packaging
Deletions are marked like this. Additions are marked like this.
Line 12: Line 12:
Section: libdevel Section: debug
Line 14: Line 14:
Depends: giblib1 (= ${binary:Version}) Depends: giblib1 (= ${binary:Version}),
    ${misc:Depends}

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.

How to create one?

First step is just to add a dbg package to your debian/control file like so:

Package: giblib1-dbg
Architecture: any
Section: debug
Priority: extra
Depends: giblib1 (= ${binary:Version}),
    ${misc:Depends}
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!


CategoryDeveloper CategoryDebugging