The following list contains the descriptions of the cross-referencing flags available with gnatxref:
If this switch is present, gnatfind and gnatxref will parse the read-only files found in the library search path. Otherwise, these files will be ignored. This option can be used to protect Gnat sources or your own libraries from being parsed, thus making gnatfind and gnatxref much faster, and their output much smaller.
When looking for source files also look in directory DIR. The order in which source file search is undertaken is the same as for gnatmake.
When searching for library and object files, look in directory DIR. The order in which library files are searched is the same as for gnatmake.
If this switch is set, the output file names will be preceded by their directory (if the file was found in the search path). If this switch is not set, the directory will not be printed.
If this switch is set, information is output only for library-level entities, ignoring local entities. The use of this switch may accelerate gnatfind and gnatxref.
Equivalent to -aODIR -aIDIR.
Specify a project file to use. By default, gnatxref and gnatfind will try to locate a project file in the current directory.
If a project file is either specified or found by the tools, then the content of the source directory and object directory lines are added as if they had been specified respectively by -aI and -aO.
Output only unused symbols. This may be really useful if you give your main compilation unit on the command line, as gnatxref will then display every unused entity and 'with'ed package.
Instead of producing the default output, gnatxref will generate a tags file that can be used by vi. See examples of gnatxref usage for examples how to use this feature. The tags file is output to the standard output, thus you will have to redirect it to a file.
All these switches may be in any order on the command line, and may even appear after the file names. They need not be separated by spaces, thus you can say gnatxref -ag instead of gnatxref -a -g.