How to configure GCC as debuggable
Dave Korn
dk@artimi.com
Thu Oct 14 16:46:00 GMT 2004
> -----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....
More information about the Gcc
mailing list