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

Untitled Document

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

12. The Cross-Referencing Tools gnatxref and gnatfind

The compiler generates cross-referencing information (unless you set the `-gnatx' switch), which are saved in the `.ali' files. This information indicates where in the source each entity is declared and referenced. Note that entities in package Standard are not included, but entities in all other predefined units are included in the output.

Before using any of these two tools, you need to compile successfully your application, so that GNAT gets a chance to generate the cross-referencing information.

The two tools gnatxref and gnatfind take advantage of this information to provide the user with the capability to easily locate the declaration and references to an entity. These tools are quite similar, the difference being that gnatfind is intended for locating definitions and/or references to a specified entity or entities, whereas gnatxref is oriented to generating a full report of all cross-references.

To use these tools, you must not compile your application using the `-gnatx' switch on the `gnatmake' command line (See Info file `gnat_ug', node `The GNAT Make Program gnatmake'). Otherwise, cross-referencing information will not be generated.

12.1 gnatxref Switches  
12.2 gnatfind Switches  
12.3 Project Files for gnatxref and gnatfind  
12.4 Regular Expressions in gnatfind and gnatxref  
12.5 Examples of gnatxref Usage  
12.6 Examples of gnatfind Usage  

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