Running and Debugging Ada Programs (GNAT User’s Guide for Native Platforms)

### 6.1 Running and Debugging Ada Programs ¶

This section discusses how to debug Ada programs.

The GNAT compiler handles an incorrect Ada program in three ways:

- The illegality may be a violation of the static semantics of Ada. In that case, GNAT diagnoses the constructs in the program that are illegal. It’s then a straightforward matter for you to modify those parts of the program.
- The illegality may be a violation of the dynamic semantics of Ada. In that case the program compiles and executes, but may generate incorrect results or may terminate abnormally with some exception.
- When presented with a program that contains convoluted errors, GNAT itself may terminate abnormally without providing full diagnostics on the incorrect user program.