Mail Archives: djgpp/2003/11/21/06:45:20
Vjekoslav Levacic <vjekoslav DOT levacic AT fer DOT hr> wrote:
> What we need is to compile a GCC in simpliest form which will allow us to
> examine how it compiles programs written in C and C++.
I think you're thoroughly misguided if you think that single-stepping
through a running GCC would give you any insight on this.
If you really want to understand how GCC works, turn on all the RTL
dumps (-da) and learn how to read them. Also learn what all the
individual optimization flags (as shown in a gcc -v -Q run) actually
mean, and observe their effect by comparing before/after RTL dumps.
> compare diferences. Now we need to figure out internal structure of
> compiler, how he manages internal reprsentation such as tree, and tables and
> steps during parsing, and traslating source code to machine code.
A source code analyzer/navigator like cscope or RedHat's Source
Navigator is going to help you a lot more with that than running GCC
in a debugger.
> We started to examine manual which documents the internals of the GNU
> compilers and source files of GCC but the size of compiler, its wideness and
> resources (lack of computer with Linux) has forced us to ask for help.
It's exactly that sheer size of the thing that makes understanding the
thing from inside a debugger virtually impossible.
[And please learn how to quote properly --- answer *below* the quoted
text, and snip quoted text you're not answering to]
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -