www.delorie.com/gnu/docs/gcc/gnat_ug_215.html   search  
Buy the book!

Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

21.4 Preparing Tree and Bind Files for gnatelim

A set of tree files covering the program to be analyzed with gnatelim and the bind file for the main subprogram does not have to be in the current directory. '-T' gnatelim option may be used to provide the search path for tree files, and '-b' option may be used to point to the bind file to process (see 21.5 Running gnatelim)

If you do not have the appropriate set of tree files and the right bind file, you may create them in the current directory using the following procedure.

Let Main_Prog be the name of a main subprogram, and suppose this subprogram is in a file named `main_prog.adb'.

To create a bind file for gnatelim, run gnatbind for the main subprogram. gnatelim can work with both Ada and C bind files; when both are present, it uses the Ada bind file. The following commands will build the program and create the bind file:

$ gnatmake ^-c Main_Prog^/ACTIONS=COMPILE MAIN_PROG^
$ gnatbind main_prog

To create a minimal set of tree files covering the whole program, call gnatmake for this program as follows:

$ gnatmake -f -c -gnatc -gnatt Main_Prog

The ^-c^/ACTIONS=COMPILE^ gnatmake option turns off the bind and link steps, that are useless anyway because the sources are compiled with `-gnatc' option which turns off code generation.

The ^-f^/FORCE_COMPILE^ gnatmake option forces recompilation of all the needed sources.

This sequence of actions will create all the data needed by gnatelim from scratch and therefore guarantee its consistency. If you would like to use some existing set of files as gnatelim output, you must make sure that the set of files is complete and consistent. You can use the -m switch to check if there are missed tree files

Note, that gnatelim needs neither object nor ALI files.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003