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

Re: RFS: lbzip2

On Tue, 17 Feb 2009, ERSEK Laszlo wrote:
> Don Armstrong wrote:
> > If you plan on being able to debug the binaries that you've released,
> > you almost certainly need the debbugging symbols that match the
> > binaries that you've released.
> > 
> > In Debian we currently aren't collecting all of the debugging symbols,
> > so doing the above is difficult for packages which don't provide a
> > -dbg package, but this is almost certainly a direction that we're
> > going to be moving in.
> Are object files built with -O3 (-finline-functions) debuggable at
> all?

It depends on the specific object file, the bug, and the specific
compiler used, of course.

> The user might not be able to get a usable backtrace from a core
> dump, even if debugging symbols are availbale. (A core dump may be
> the consequence of SIGQUIT, not just SIGSEGV; or he/she may choose
> to run the program under gdb, or attach gdb to the running program.)

There are lots of cases where the user is unable to produce useful
debugging output, and it is necessary to build a set of binaries
specifically to debug the problem. That's orthogonal to making it
easier to find bugs in the cases where they don't (or can't) rebuild
the binaries.

> If -O3 objects really are non-debuggable,

Since I reject this, the rest isn't really necessary, but we'll
continue on.

> does that mean that Debian will move into a direction where a) all
> packages are at most -O2?

Must packages should be at -O2 (or possibly -Os) unless someone has
actually sat down and run the benchmarks to determine that -O3 (or any
other compiler options) make a significant performance increase to
overcome the increase in complexity and the increase in the likelihood
of running into compiler bugs.

[And yes, this is something that almost no one bothers to do, or if
they try, they do incorrectly. Hint: if you haven't calculated a
standard deviation and p values, your benchmarks aren't worth

> b) all -dbg packages include -g3 -O0 binaries, and X-dbg conflicts
> with X? (Or are all -dbg binaries named -dbg?) What about
> Heisenbugs? What about libraries? Can a user select (via
> ld-linux.so) the debugging/stripped version of each library?

For the most part, there's little purpose to -dbg packages shipped in
the main archive which do not correpspond to the binaries that are
actually being run. If they are needed, they can easily be built
separately or otherwise made available on resources that aren't in the
main archive. [In fact, IMO it'd be ideal for -dbg packages to be
shipped separately from the main archive too, but that's not currently

Don Armstrong

This can't be happening to me. I've got tenure.
 -- James Hynes _Publish and Perish_

http://www.donarmstrong.com              http://rzlab.ucr.edu

Reply to: