public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Debugging Gcc
@ 2004-03-11 11:29 Hari
  2004-03-12  2:56 ` Ian Lance Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Hari @ 2004-03-11 11:29 UTC (permalink / raw)
  To: gcc-help



Hi,
 I am an undergraduate student at IIT Bombay working on the control flow
of GCC while compiling c code.I am intrested in tracing the path of gcc
during compilation.I don't see any good material on this topic anywhere.
 One approach is to  put break points in all of (176) c files 
in gcc directory and check the flow but that seems to be very time
consuming . Is there is anyother way out???

--Hari
 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging Gcc
  2004-03-11 11:29 Debugging Gcc Hari
@ 2004-03-12  2:56 ` Ian Lance Taylor
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Lance Taylor @ 2004-03-12  2:56 UTC (permalink / raw)
  To: Hari; +Cc: gcc-help

Hari <hari@cse.iitb.ac.in> writes:

>  I am an undergraduate student at IIT Bombay working on the control flow
> of GCC while compiling c code.I am intrested in tracing the path of gcc
> during compilation.I don't see any good material on this topic anywhere.
>  One approach is to  put break points in all of (176) c files 
> in gcc directory and check the flow but that seems to be very time
> consuming . Is there is anyother way out???

The main path of compiling code is in the function
rest_of_compilation().  It calls a series of passes.  See also the
documentation for the -d option.

Ian

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Debugging GCC
  2005-08-30  5:00 Debugging GCC Brendon Costa
@ 2005-08-30  8:31 ` Andrey Belevantsev
  0 siblings, 0 replies; 6+ messages in thread
From: Andrey Belevantsev @ 2005-08-30  8:31 UTC (permalink / raw)
  To: Brendon Costa; +Cc: gcc-help

Brendon Costa wrote:
> Does anyone know a way of invoking g++ inside gdb or compiling g++ so 
> that g++ will not handle the SIGSEGV signal but would crash instead so 
> GDB can give me a stack trace of the place where the segmentation fault 
> occurred?
http://gcc.gnu.org/wiki/DebuggingGCC explains how to debug the compiler. 
Also, you can put a breakpoint on fancy_abort() to see what happens when 
an ICE is occured.

Andrey


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Debugging GCC
@ 2005-08-30  5:00 Brendon Costa
  2005-08-30  8:31 ` Andrey Belevantsev
  0 siblings, 1 reply; 6+ messages in thread
From: Brendon Costa @ 2005-08-30  5:00 UTC (permalink / raw)
  To: gcc-help

Hi all,

    I have been working on a small extension to the C++ front end of GCC 
that helps me to document exceptions while compiling code. Anyway my 
extension requires me to modify GCC and so I am modifying version 4.0.1. 
Through developing this I have come across a single frustration that has 
slowed my development down a lot. Basically GCC seems to catch any 
SIGSEGV generated and then spit out an Internal Compiler Error. This is 
ok, I am still trying to debug some of my code that is producing the 
exception, but the problem is that I want to run g++ inside a debugg 
(gdb) in order to find out where the SIGSEV is being generated. 
Currently I have a lot of very extensive logging procedures that try to 
narrow down the problem, but it is still tedious.

Does anyone know a way of invoking g++ inside gdb or compiling g++ so 
that g++ will not handle the SIGSEGV signal but would crash instead so 
GDB can give me a stack trace of the place where the segmentation fault 
occurred?

Thanks,
Brendon.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: debugging gcc
  2001-12-20 10:54 debugging gcc ratnadeep  joshi
@ 2001-12-21 14:27 ` Andrea 'Fyre Wyzard' Bocci
  0 siblings, 0 replies; 6+ messages in thread
From: Andrea 'Fyre Wyzard' Bocci @ 2001-12-21 14:27 UTC (permalink / raw)
  To: ratnadeep  joshi, gcc-help

Heve you had a look at the GCC manuals ?
http://gcc.gnu.org/onlinedocs/gcc/
http://gcc.gnu.org/onlinedocs/gccint/

fwyzard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* debugging gcc
@ 2001-12-20 10:54 ratnadeep  joshi
  2001-12-21 14:27 ` Andrea 'Fyre Wyzard' Bocci
  0 siblings, 1 reply; 6+ messages in thread
From: ratnadeep  joshi @ 2001-12-20 10:54 UTC (permalink / raw)
  To: gcc-help


hello ,

  i want to know the intermediate representation of gcc and integration of front end - back end of gcc to try to write a small front end for it 

   what can be done for this ? do i have to debug gcc code itself to know its passes and their calling ?
If yes , how to debug gcc code ? How to use gdb or any other debugging tool to debug whole gcc code 

  - ratnadeep 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-08-30  8:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-11 11:29 Debugging Gcc Hari
2004-03-12  2:56 ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2005-08-30  5:00 Debugging GCC Brendon Costa
2005-08-30  8:31 ` Andrey Belevantsev
2001-12-20 10:54 debugging gcc ratnadeep  joshi
2001-12-21 14:27 ` Andrea 'Fyre Wyzard' Bocci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).