GNAT User’s Guide for Native Platforms#
GNAT, The GNU Ada Development Environment
AdaCore
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “GNAT User’s Guide for Native Platforms”, and with no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
- 1. About This Guide
- 2. Getting Started with GNAT
- 3. The GNAT Compilation Model
- 3.1. Source Representation
- 3.2. Foreign Language Representation
- 3.3. File Naming Topics and Utilities
- 3.4. Configuration Pragmas
- 3.5. Generating Object Files
- 3.6. Source Dependencies
- 3.7. The Ada Library Information Files
- 3.8. Binding an Ada Program
- 3.9. GNAT and Libraries
- 3.10. Conditional Compilation
- 3.11. Mixed Language Programming
- 3.12. GNAT and Other Compilation Models
- 3.13. Using GNAT Files with External Tools
- 4. Building Executable Programs with GNAT
- 4.1. Building with
gnatmake
- 4.2. Compiling with
gcc
- 4.3. Compiler Switches
- 4.3.1. Alphabetical List of All Switches
- 4.3.2. Output and Error Message Control
- 4.3.3. Warning Message Control
- 4.3.4. Debugging and Assertion Control
- 4.3.5. Validity Checking
- 4.3.6. Style Checking
- 4.3.7. Run-Time Checks
- 4.3.8. Using
gcc
for Syntax Checking - 4.3.9. Using
gcc
for Semantic Checking - 4.3.10. Compiling Different Versions of Ada
- 4.3.11. Character Set Control
- 4.3.12. File Naming Control
- 4.3.13. Subprogram Inlining Control
- 4.3.14. Auxiliary Output Control
- 4.3.15. Debugging Control
- 4.3.16. Exception Handling Control
- 4.3.17. Units to Sources Mapping Files
- 4.3.18. Code Generation Control
- 4.4. Linker Switches
- 4.5. Binding with
gnatbind
- 4.6. Linking with
gnatlink
- 4.7. Using the GNU
make
Utility
- 4.1. Building with
- 5. GNAT Utility Programs
- 6. GNAT and Program Execution
- 6.1. Running and Debugging Ada Programs
- 6.1.1. The GNAT Debugger GDB
- 6.1.2. Running GDB
- 6.1.3. Introduction to GDB Commands
- 6.1.4. Using Ada Expressions
- 6.1.5. Calling User-Defined Subprograms
- 6.1.6. Using the next Command in a Function
- 6.1.7. Stopping When Ada Exceptions Are Raised
- 6.1.8. Ada Tasks
- 6.1.9. Debugging Generic Units
- 6.1.10. Remote Debugging with gdbserver
- 6.1.11. GNAT Abnormal Termination or Failure to Terminate
- 6.1.12. Naming Conventions for GNAT Source Files
- 6.1.13. Getting Internal Debugging Information
- 6.1.14. Stack Traceback
- 6.1.15. Pretty-Printers for the GNAT runtime
- 6.2. Profiling
- 6.3. Improving Performance
- 6.4. Overflow Check Handling in GNAT
- 6.5. Performing Dimensionality Analysis in GNAT
- 6.6. Stack Related Facilities
- 6.7. Memory Management Issues
- 6.1. Running and Debugging Ada Programs
- A. Platform-Specific Information
- B. Example of Binder Output
- C. Elaboration Order Handling in GNAT
- Elaboration Code
- Elaboration Order
- Checking the Elaboration Order
- Controlling the Elaboration Order in Ada
- Controlling the Elaboration Order in GNAT
- Mixing Elaboration Models
- ABE Diagnostics
- SPARK Diagnostics
- Elaboration Circularities
- Resolving Elaboration Circularities
- Elaboration-related Compiler Switches
- Summary of Procedures for Elaboration Control
- Inspecting the Chosen Elaboration Order
- D. Inline Assembler
- E. GNU Free Documentation License
- Preamble
- 1. APPLICABILITY AND DEFINITIONS
- 2. VERBATIM COPYING
- 3. COPYING IN QUANTITY
- 4. MODIFICATIONS
- 5. COMBINING DOCUMENTS
- 6. COLLECTIONS OF DOCUMENTS
- 7. AGGREGATION WITH INDEPENDENT WORKS
- 8. TRANSLATION
- 9. TERMINATION
- 10. FUTURE REVISIONS OF THIS LICENSE
- 11. RELICENSING
- ADDENDUM: How to use this License for your documents