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: gcc debugging


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/


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