What This Guide Contains
This guide contains the following chapters:
- Getting Started with GNAT, describes how to get started compiling
and running Ada programs with the GNAT Ada programming environment.
- The GNAT Compilation Model, describes the compilation model used
- Compiling Using gcc, describes how to compile
Ada programs with gcc, the Ada compiler.
- Binding Using gnatbind, describes how to
perform binding of Ada programs with
gnatbind, the GNAT binding
- Linking Using gnatlink,
describes gnatlink, a
program that provides for linking using the GNAT run-time library to
construct a program. gnatlink can also incorporate foreign language
object units into the executable.
- The GNAT Make Program gnatmake, describes gnatmake, a
utility that automatically determines the set of sources
needed by an Ada compilation unit, and executes the necessary compilations
binding and link.
- Improving Performance, shows various techniques for making your
Ada program run faster or take less space.
It discusses the effect of the compiler's optimization switch and
also describes the gnatelim tool and unused subprogram/data
- Renaming Files Using gnatchop, describes
gnatchop, a utility that allows you to preprocess a file that
contains Ada source code, and split it into one or more new files, one
for each compilation unit.
- Configuration Pragmas, describes the configuration pragmas
handled by GNAT.
- Handling Arbitrary File Naming Conventions Using gnatname,
shows how to override the default GNAT file naming conventions,
either for an individual unit or globally.
- GNAT Project Manager, describes how to use project files
to organize large projects.
- The Cross-Referencing Tools gnatxref and gnatfind, discusses
gnatfind, two tools that provide an easy
way to navigate through sources.
- The GNAT Pretty-Printer gnatpp, shows how to produce a reformatted
version of an Ada source file with control over casing, indentation,
comment placement, and other elements of program presentation style.
- The GNAT Metric Tool gnatmetric, shows how to compute various
metrics for an Ada source file, such as the number of types and subprograms,
and assorted complexity measures.
- File Name Krunching Using gnatkr, describes the
file name krunching utility, used to handle shortened
file names on operating systems with a limit on the length of names.
- Preprocessing Using gnatprep, describes
preprocessor utility that allows a single source file to be used to
generate multiple or parameterized source files, by means of macro
- The GNAT Library Browser gnatls, describes
utility that displays information about compiled units, including dependences
on the corresponding sources files, and consistency of compilations.
- Cleaning Up Using gnatclean, describes
gnatclean, a utility
to delete files that are produced by the compiler, binder and linker.
- GNAT and Libraries, describes the process of creating and using
Libraries with GNAT. It also describes how to recompile the GNAT run-time
- Using the GNU make Utility, describes some techniques for using
the GNAT toolset in Makefiles.
- Memory Management Issues, describes some useful predefined storage pools
and in particular the GNAT Debug Pool facility, which helps detect incorrect
It also describes gnatmem, a utility that monitors dynamic
allocation and deallocation and helps detect “memory leaks”.
- Stack Related Facilities, describes some useful tools associated with
stack checking and analysis.
- Verifying properties using gnatcheck, discusses
a utility that checks Ada code against a set of rules.
- Creating Sample Bodies Using gnatstub, discusses
a utility that generates empty but compilable bodies for library units.
- Other Utility Programs, discusses several other GNAT utilities,
- Running and Debugging Ada Programs, describes how to run and debug
- Platform-Specific Information for the Run-Time Libraries,
describes the various run-time
libraries supported by GNAT on various platforms and explains how to
choose a particular library.
- Example of Binder Output File, shows the source code for the binder
output file for a sample program.
- Elaboration Order Handling in GNAT, describes how GNAT helps
you deal with elaboration order issues.
- Inline Assembler, shows how to use the inline assembly facility
in an Ada program.
- Compatibility and Porting Guide, includes sections on compatibility
of GNAT with other Ada 83 and Ada 95 compilation systems, to assist
in porting code from other environments.
- Microsoft Windows Topics, presents information relevant to the
Microsoft Windows platform.