> Does adding debugging information make an executable run through its
> code paths slower, or will there be no significant difference? How about
> its memory footprint...hideously bloated, or only marginally different?
> I'm currently rebuilding my system, and debating whether I should strip
> the binaries, because I will often have a bug arise and have occasion to
> use GDB; I'd also like to be able to step through eg shared libraries
> while debugging some code...does this require explicit linking to a
> debugging library (like libc_g or something...I forget its exact name)?
> I'm not concerned about disk space.

This is my totally non-technical response, based completely on just my
own observations, so I could be dead wrong, however:

I've noticed no slowdown whatsoever running apps under gdb, nor running a
version compiled with -g vs one without.  The things that make a major
difference are optimization flags and disk footprint.  In the first case,
I mean using -O2 or -O3 vs no optimization.  Normally if you want to be
able to debug something, you want to leave optimizations off, since
they tend to mangle up the code and make it difficult to step through.
However, the optimizations in egcs have gotten so good that *not*
using them can literally mean doubling your execution time.  So there's
a tradeoff there.
The other big on is the disk space.  Debugging symbols are huge,
frequently several times the size of the executable itself.  An example
is the latest WINE executable; with debugging info it's like 5 megs,
without it's just over 2.  The load time of the program is *signifigantly*
sped up by striping the executable, since it has less than half as much
data to drag off the disk.

Hope that helps.

Reply via email to