On Sat, Jan 09, 1999 at 01:58:56AM -0500, Scott McDermott wrote:
> 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)?
No, only using -g is required. The debug information is only used by the
debugger, during normal execution it will not be touched in any way. The
only possible performance reduction with -g is caused by the fact that it's
advisable to compile everything with an optimizatin of at most -O1 and
on some architectures like the i386 to avoid code generation options like
-fomit-frame-pointer when using a debugger. That loss is typically not
very hard.
> I'm not concerned about disk space.
Then there is no reason not to build everything with debugging enabled.
Ralf