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: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Bernd Feindt" <texol at gmx dot net>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Thu, 14 Oct 2004 14:40:41 +0200
- Subject: Re: How to configure GCC as debuggable
- References: <20759.1097748552@www50.gmx.net>
Bernd Feindt wrote:
> The documentation is silent about this point and "./configure --help"
> doesn't offer any debugging settings, but I'm sure there must be some.
> Especially it seems to me that it can't be necessary to go through
> all three stages to get a debuggable binary (BTW what is
> "bootstrapping"? I never understood this).
>
> Does anybody know how to do this? Thank you in advance,
> BF.
"bootstrapping" is the three-stage process to build GCC. You do not need it to
debug & work on GCC (while you need it to test your patches). To bootstrap, you
need to do "make bootstrap" after configuration. Doing just a regular "make"
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".
Notice that after a patch is ready, you still need to apply it against a clean
tree, and run a full bootstrap & test cycle as explained by
http://gcc.gnu.org/contribute.html (notice there is a shortcut listed there if
your patch affects only cp/*).
Giovanni Bajo