Debugging Ada Programs

Free Software Foundation

Chris Nettleton


This guide is based on documentation distributed by the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


This guide is distributed under the terms of the GNU Public license. Permission is granted to make and distribute verbatim copies of this document provided the copyright notice and this permission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this document into another language, under the above conditions for modified versions.

Table of Contents
About this Guide
Related Documents
Reader's Comments
Documentation Conventions
1. A Sample Debug Session
2. Getting In and Out of the Debugger
2.1. Invoking the Debugger
2.1.1. Choosing Files
2.1.2. Choosing Modes
2.2. Quitting the Debugger
2.3. Shell Commands
3. Debugger Commands
3.1. Command Syntax
3.2. Command Completion
3.3. Getting Help
4. Running Programs Under the Debugger
4.1. Compiling for Debugging
4.2. Starting your Program
5. Stopping and Continuing
5.1. Breakpoints, Watchpoints, and Exceptions
5.1.1. Setting Breakpoints
5.1.2. Setting Watchpoints
5.1.3. Deleting Breakpoints
5.1.4. Disabling Breakpoints
5.1.5. Break Conditions
5.1.6. Breakpoint Command Lists
5.1.7. Breakpoint Menus
5.2. Continuing and Stepping
6. Examining the Stack
6.1. Stack Frames
6.2. Backtraces
6.3. Selecting a Frame
6.4. Information about a Frame
7. Examining Source Files
7.1. Printing Source Lines
7.2. Searching Source Files
7.3. Specifying Source Directories
7.4. Source and Machine Code
8. Examining Data
8.1. Expressions
8.2. Program Variables
8.3. Artificial Arrays
8.4. Output Formats
8.5. Examining Memory
8.6. Automatic Display
8.7. Print Settings
8.8. Value History
8.9. Convenience Variables
8.10. Registers
9. Using the Debugger with Different Languages
9.1. Switching Between Source Languages
9.1.1. List of Filename Extensions and Languages
9.1.2. Setting the Working Language
9.1.3. Having the Debugger Infer the Source Language
9.2. Displaying the Language
9.3. Supported Languages
9.3.1. C and C++ operators
9.3.2. C and C++ Constants
9.4. The Ada Mode
9.4.1. Omissions from Ada
9.4.2. Additions to Ada
9.4.3. Stopping at the Beginning
9.4.4. Breaking on Ada Exceptions
9.4.5. Extensions for Ada Tasks
9.4.6. Debugging Generic Units
9.4.7. Set commands for Ada
9.4.8. Known Peculiarities of Ada Mode
10. Examining the Symbol Table
11. Altering Execution
11.1. Assignment to Variables
11.2. Continuing at a Different Address
11.3. Returning from a Function
11.4. Calling Program Functions
11.5. Patching Programs
12. The Debugger Files
12.1. Commands to Specify Files
12.2. Errors Reading Symbol Files
13. Specifying a Debugging Target
13.1. Active Targets
13.2. Commands for Managing Targets
13.3. Remote Debugging
14. Controlling the Debugger
14.1. Prompt
14.2. Command Editing
14.3. Command History
14.4. Screen Size
14.5. Numbers
14.6. Optional Warnings and Messages
15. Canned Sequences of Commands
15.1. User-Defined Commands
15.2. User-Defined Command Hooks
15.3. Command Files
15.4. Commands for Controlled Output
16. Using History Interactively
16.1. History Interaction
16.1.1. Event Designators
16.1.2. Word Designators
16.1.3. Modifiers
List of Examples
9-1. Output from info tasks
9-2. Output from info queues