[2193] in SIPB_Linux_Development

home help back first fref pref prev next nref lref last post

Re: Official policy on what build flags to use for the release?

daemon@ATHENA.MIT.EDU (Theodore Y. Ts'o)
Thu Oct 1 18:48:47 1998

Date: Thu, 1 Oct 1998 18:43:32 -0400
From: "Theodore Y. Ts'o" <tytso@MIT.EDU>
To: Salvatore Valente <svalente@MIT.EDU>
Cc: ghudson@MIT.EDU, linux-dev@MIT.EDU
In-Reply-To: Salvatore Valente's message of Wed, 30 Sep 1998 17:56:35 -0400,
	<199809302156.RAA04767@quiche-lorraine.mit.edu>

   Date: Wed, 30 Sep 1998 17:56:35 -0400
   From: Salvatore Valente <svalente@MIT.EDU>

   If someone sends in a bug report that says "This program crashes when
   I press the 'a' key," I can build a copy of the program with -g and
   try to debug it.  So, if the person who originally noticed the bug has
   no interest in debugging it, does it make a difference if the program
   he was running was built with -g?  (Specifically, does a program
   generate a more meaningful core dump if it was built with -g?)

At least with gcc, it doesn't make a difference, since -g only adds
additional information to the symbol table, which is completely ignored
by the kernel anyway.

One caution to this approach, though --- yes, you can build a copy of
the program with -g and try to debug it, but this only works if the
sources and the build environment is *identical* to the one you used
when you originally built the released version of the binary.  If the
version of gcc is different, or the include files have changed, then the
new binary built with -g may not correspond with the original binary
built without -g.

This is why it's better to build the binaries -g from the beginning, and
archive them; then changes to the build environment won't matter.

						- Ted

home help back first fref pref prev next nref lref last post