This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc debugging
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: sevtov <sevtov at mail dot ru>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Tue, 27 Jul 2004 17:05:46 +0530
- Subject: Re: gcc debugging
- References: <15719445140.20020727144435@mail.ru>
sevtov wrote:
> Hello, everybody.
>
> Does anybody have experience of doing gcc gebbuging with gdb.
> The essential problem is that I don't know how to set a breakpoint in cc1,
> debugging gcc.
> What I think is the gcc invokes cc1 module. Am I right? It's easy to debug gcc,
> but how does debug cc1, which is called from gcc?
>
> Probably it is a case of using gdb, but I ask here because of it's related to
> gcc.
See Alexandre Oliva's scripts "debugx" and "debug":
http://gcc.gnu.org/ml/gcc/2004-03/msg01195.html
Once you have them in your PATH, you can simply do:
debugx cc1 gcc foo bar
debugx cc1plus g++ foo bar
debugx jc1 gcj foo bar
etc.
This has to be a very FAQ on GCC development! I think
Alexandre's scripts should go into "contrib" (as
is also noted in the message referred to above).
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/