[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mandatory -dbg packages for libraries?



On Sun, Apr 22, 2007 at 10:31:04PM +0200, Hendrik Sattler wrote:
> Am Sonntag 22 April 2007 22:12 schrieb Russ Allbery:
> > Actually, you don't.  See the features of dh_strip introduced at debhelper
> > level V5.  And of course you can do the same thing by hand.
> >
> > gdb will read the resulting detached debugging symbols automatically.
> 
> Did you ever try to debug an application compiled with optimizations?

Irrelevant.

We're talking about *libraries* here, not applications. The main reason
why you want debugging symbols in a library is so that you can get a
reasonable backtrace in a bug report.

If you need to step into the library to figure out how a few function
calls work, then often you're debugging an application that uses the
library rather than the library itself. Stepping in and through the
library is only useful insofar that you can figure out whether you're
calling the library's API calls correctly; that doesn't need a whole lot
of going inside the library, at least not so much that having an
optimized library isn't annoying yet.

If you *are* debugging the library itself and not an application that
uses the library, then you probably need to recompile the library
anyway; at that point, doing it before throwing stuff through the
debugger (so that "make" after changing one or two lines in a file
doesn't take an hour) is a good idea; and while you're at it, compiling
with -O0 isn't very hard to do.

YMMV, of course.

-- 
Fun will now commence
  -- Seven Of Nine, "Ashes to Ashes", stardate 53679.4



Reply to: