This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: How to configure GCC as debuggable
- From: "Dave Korn" <dk at artimi dot com>
- To: "'Giovanni Bajo'" <giovannibajo at libero dot it>,"'Bernd Feindt'" <texol at gmx dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 14 Oct 2004 15:04:42 +0100
- Subject: RE: How to configure GCC as debuggable
> -----Original Message-----
> From: gcc-owner On Behalf Of Giovanni Bajo
> Sent: 14 October 2004 13:41
> Bernd Feindt wrote:
>
> > The documentation is silent about this point and
> "./configure --help"
Say, do we support "configure --help" in the source directory?
<g> [ Sorry Bernd. Gcc in-joke. Please ignore! ]
> > doesn't offer any debugging settings, but I'm sure there
> must be some.
> will build you a working GCC in one stage. To build with
> debug information, you
> can use make within build/gcc/ subdir. For instance, when I
> work on the C++ FE,
> I usualy touch cp/cp-tree.h, and then do a "make" within
> build/gcc/ to rebuild
> a debug version of cc1plus. Then you can "gdb cc1plus".
Um. It should be pointed out that gcc is *always* built with debug info
(-g) by default, (I haven't checked but I think it gets stripped during
"make install") but that because optimisation is usually turned on as well,
the debug info is sometimes less useful than it can be.
One way to specify different flags for a build is to manipulate the
default environmental value when you configure: you can try
CFLAGS='-g -O0' /path/to/configure <remaining configure options>
and those flags will then apply to all the build performed in that object
dir.
cheers,
DaveK
--
Can't think of a witty .sigline today....