GNU C Compiler

Hi Frds,

 I am new to unix forums. With lot of hope, i'm posting this thread. I want to understand GCC functionality\(from commandline parsing to Assembly code generatio\). i have relavant source code with me. But i felt little bit difficulty in understanding / reading each line of code.  Is it possible to debug the compiler while compiling a C source.

Reading the source code of a C compiler may not be the best way to understand what they actually do... especially a big compiler like gcc which is broken up into language-independent modules.

As a aside - GCC now longer means GNU C compiler; it now stands for GNU Compiler Collection.

So what would be the best method ? Is there best way to debug the GCC cc1 compiler.

Depends what you want to do. 'debug the gcc compiler' is more of a method than a goal.

Rather than trying to debug gcc while compiling a C program, you would be better served by first reading a book on modern compiler design. There are a number of good books on the subject. I would recommend you start with Compilers: Principles, Techniques, and Tools (2nd Ed) by Aho et al.