This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: debuggable gcc
- From: Andrew Haley <aph at redhat dot com>
- To: raja dot saleru at iap-online dot com
- Cc: gcc-help at gcc dot gnu dot org
- Date: Wed, 04 Feb 2009 10:03:22 +0000
- Subject: Re: debuggable gcc
- References: <19732.210.143.35.14.1233570800.squirrel@www.iap-online.com> <m3bptko9jf.fsf@google.com> <15240.210.143.35.14.1233627705.squirrel@www.iap-online.com> <7069.210.143.35.14.1233714457.squirrel@www.iap-online.com> <m3skmuhd3d.fsf@google.com> <29378.210.143.35.14.1233738284.squirrel@www.iap-online.com>
raja.saleru@iap-online.com wrote:
> tried to debug the same
> $ ddd newARM-gcc
>
> The ddd does not contails all the source files of the compiler, but it has
> only few c and h files.
>
> Please help us how to proceed further to debug the gcc.
Oh come on, it's at the top of the page:
"A lot of people frequently have questions about debugging GCC. In
particular, how to debug the compiler itself, instead of the driver.
Here is a quick rundown:
Assuming you've produced preprocessed source (see the bug reporting
directions for how to do this), and have a debuggable compiler built
somewhere, you can simply do
gdb --args <location of cc1, cc1plus, or whatever compiler for the
language the preprocessed source file is in> <flags passed to
compiler>
This will enable you to debug the compiler itself, instead of the
driver."
Andrew.