Next: Preparing Tree and Bind Files for gnatelim, Previous: Eliminate Pragma, Up: Reducing the Size of Ada Executables with gnatelim
A tree file stores a snapshot of the compiler internal data structures at the very end of a successful compilation. It contains all the syntactic and semantic information for the compiled unit and all the units upon which it depends semantically. To use tools that make use of tree files, you need to first produce the right set of tree files.
GNAT produces correct tree files when -gnatt -gnatc options are set in a gcc call. The tree files have an .adt extension. Therefore, to produce a tree file for the compilation unit contained in a file named foo.adb, you must use the command
$ gcc -c -gnatc -gnatt foo.adb
and you will get the tree file foo.adt. compilation.