CPPX Technical Notes

On gcc

ASG dumps in text from GCC

GCC has an option (-fdump-translation-unit-dumpfilename) to dump the internal ASG to a file. Currently this is only available for gcc version 2.97, the development branch for version 3.0. The internal graph representation is currently only complete for g++ (the C++ compiler). The C compiler (gcc) does not currently dump the contents of functions to the file. We are using the January 15, 2000 snapshot of 2.97.

The text dump files do not contain all of the information in the gcc ASG. In partciular, the value of any real constants, the inheritance hierarchy, and if a record is declared as a struct or a class is missing from the tect dumps. Since we have to change the dumping routines anyway, we are hooking directly into the compiler to dump the contents we are interested in.