[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gnatls
gnatls
is a tool that outputs information about compiled
units. It gives the relationship between objects, unit names and source
files. It can also be used to check the source dependencies of a unit
as well as various characteristics.
17.1 Running gnatls
17.2 Switches for gnatls
17.3 Example of gnatls
Usage
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gnatls
The gnatls
command has the form
$ gnatls switches object_or_ali_file |
The main argument is the list of object or `ali' files (see section 2.8 The Ada Library Information Files) for which information is requested.
In normal mode, without additional option, gnatls
produces a
four-column listing. Each line represents information for a specific
object. The first column gives the full path of the object, the second
column gives the name of the principal unit in this object, the third
column gives the status of the source and the fourth column gives the
full path of the source representing this unit.
Here is a simple example of use:
$ gnatls *.o ./demo1.o demo1 DIF demo1.adb ./demo2.o demo2 OK demo2.adb ./hello.o h1 OK hello.adb ./instr-child.o instr.child MOK instr-child.adb ./instr.o instr OK instr.adb ./tef.o tef DIF tef.adb ./text_io_example.o text_io_example OK text_io_example.adb ./tgef.o tgef DIF tgef.adb |
The first line can be interpreted as follows: the main unit which is contained in object file `demo1.o' is demo1, whose main source is in `demo1.adb'. Furthermore, the version of the source used for the compilation of demo1 has been modified (DIF). Each source file has a status qualifier which can be:
OK (unchanged)
MOK (slightly modified)
DIF (modified)
??? (file not found)
HID (hidden, unchanged version not first on PATH)
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gnatls
gnatls
recognizes the following switches:
gnatmake
flags (see section 6.2 Switches for gnatmake
).
gnatmake
flag (see section 6.2 Switches for gnatmake
).
Preelaborable
No_Elab_Code
Pure
Elaborate_Body
Remote_Types
Shared_Passive
Predefined
Remote_Call_Interface
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
gnatls
Usage Example of using the verbose switch. Note how the source and object paths are affected by the -I switch.
$ gnatls -v -I.. demo1.o GNATLS 5.03w (20041123-34) Copyright 1997-2004 Free Software Foundation, Inc. Source Search Path: <Current_Directory> ../ /home/comar/local/adainclude/ Object Search Path: <Current_Directory> ../ /home/comar/local/lib/gcc-lib/x86-linux/3.4.3/adalib/ Project Search Path: <Current_Directory> /home/comar/local/lib/gnat/ ./demo1.o Unit => Name => demo1 Kind => subprogram body Flags => No_Elab_Code Source => demo1.adb modified |
The following is an example of use of the dependency list. Note the use of the -s switch which gives a straight list of source files. This can be useful for building specialized scripts.
$ gnatls -d demo2.o ./demo2.o demo2 OK demo2.adb OK gen_list.ads OK gen_list.adb OK instr.ads OK instr-child.ads $ gnatls -d -s -a demo1.o demo1.adb /home/comar/local/adainclude/ada.ads /home/comar/local/adainclude/a-finali.ads /home/comar/local/adainclude/a-filico.ads /home/comar/local/adainclude/a-stream.ads /home/comar/local/adainclude/a-tags.ads gen_list.ads gen_list.adb /home/comar/local/adainclude/gnat.ads /home/comar/local/adainclude/g-io.ads instr.ads /home/comar/local/adainclude/system.ads /home/comar/local/adainclude/s-exctab.ads /home/comar/local/adainclude/s-finimp.ads /home/comar/local/adainclude/s-finroo.ads /home/comar/local/adainclude/s-secsta.ads /home/comar/local/adainclude/s-stalib.ads /home/comar/local/adainclude/s-stoele.ads /home/comar/local/adainclude/s-stratt.ads /home/comar/local/adainclude/s-tasoli.ads /home/comar/local/adainclude/s-unstyp.ads /home/comar/local/adainclude/unchconv.ads |
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |