C and C++ programs can be tested using the Advanced Interactive Debugger AID.
This User Guide only provides a brief description of AID. A complete description of the debugger can be found in the manual “AID, Debugging of C/C++ programs” [9].
AID offers the following features:
It enables “symbolic” debugging, i.e. symbolic names from the source program may be specified in commands instead of hexadecimal addresses, provided LSD information is generated during compilation and passed to the loaded program.
It is not always necessary to load this information for the complete program together with that program. AID allows the LSD information to be dynamically loaded for each translation unit if the associated object modules are stored with the LSD information in a PLAM library. This means that resources can be used more efficiently:
Program memory is freed, since LSD information needs to be loaded only when required for debugging
A program which is found to be error-free in the debugging session does not need to be recompiled or relinked (without LSD information) before being used.
If a program needs to be debugged when in productive use, the required LSD information will already be available without having to recompile and relink the program.
It offers functions which, in particular, enable:
program execution to be traced and logged on a symbolic level (TRACE function)
program execution to be interrupted at fixed points or on the occurrence of defined events so that AID or BS2000 commands (so- called “subcommands”) can be executed
the contents of variables to be output in a format that takes data definitions of the source program into account
the contents of variables to be changed
call hierarchies to be traced even without LSD informations (%SDUMP %NEST).
In addition to the diagnosis of loaded programs, it supports the analysis of memory dumps in disk files.
It can be used in batch mode and in interactive mode. Note, however, that the interactive dialog mode is recommended for debugging programs, since the sequence of commands need not be defined in advance but can be adapted to suit the particular situation.
The following types of symbols can be addressed in C:
simple (scalar) types
arrays and elements of arrays
structures/unions and their components
enumeration constants (enum)
bit fields
pointers
functions
labels
Note, however, that preprocessor constants and macros (#DEFINEs), typedef names, enum, structure and union types (labels), and inline substituted functions cannot be referenced.
In addition, the following types of symbols can be addressed in C++:
functions and data elements within classes
overloaded functions and operators
references
templates
namespaces
Source references are used to refer to individual statement lines and block references to the start of blocks:
S'[<UNIQUE-no.> -] <line-no.> [: <rel.statement-no.>]' or
BLK = '[<UNIQUE-no.> -] <line-no.> [: <rel.block-no.>]'
The UNIQUE number and line number also appear in the source/error listing.