This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to configure GCC as debuggable


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]