Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Requirements for symbolic debugging

&pagelevel(4)&pagelevel

For debugging at symbolic level, AID enables variables to be addressed with the names defined in the source program and source references to be used to refer to individual statement lines. LSD information must be made available to AID for this purpose.

The generation and transfer of this information is controlled in each of the following steps by specifying appropriate operands in the control statements or commands:

  • compiling with the C++ compiler

  • linking and loading with the dynamic binder loader

  • linking with BINDER

  • linking with the compiler statement BIND

Compiling with the C/C++ compiler

The generation of LSD information is controlled with the following option:

//MODIFY-TEST-PROPERTIES TEST-SUPPORT = *NO / *YES

*NO

*NO is the default value, which means that the compiler does not generate LSD information.
Even without LSD information, it is possible to trace the call hierarchies. In other words, %SDUMP %NEST can always be used if the program is aborted.

*YES

The compiler generates LSD information.
However, this is only possible for non-optimized programs. If optimization happens to be set (see the MODIFY-OPTIMIZATION-PROPERTIES statement), the compiler treats the request for debugging support as the higher priority, switches the optimization level to *LOW, and issues an appropriate message.

Linking, loading and starting

Once the LSD information has been generated during compilation, it is possible to

  • load it together with the overall program or

  • dynamically load it on request for each translation unit if the associated modules are maintained in a PLAM library.

The table below shows which operands have to be specified in both cases in order to transfer LSD information:

Method of
linking/loading

Loading LSD information
with the overall program:

Dynamic loading of LSD information
by AID (%SYMLIB):

Linking, loading
and starting with
DBL

LOAD-EXECUTABLE-PROGRAM ...,

TEST-OPTIONS=*AID

or

START-EXECUTABLE-PROGRAM ...,

TEST-OPTIONS=*AID

LOAD-EXECUTABLE-PROGRAM ...,

[TEST-OPTIONS=*NONE]

or

START-EXECUTABLE-PROGRAM ...,

[TEST-OPTIONS=*NONE]

Linking with
BINDER

START-LLM-CREATION ...,

INC-DEF=*PAR(...,

TEST-SUPPORT=*YES)

or
INCLUDE-MODULES ...,

TEST-SUPPORT=*YES

START-LLM-CREATION ...,

[INC-DEF=*PAR(...,

TEST-SUPPORT=*NO)]

or

INCLUDE-MODULES ...,

[TEST-SUPPORT=*NO]

Linking with the
BIND statement

MODIFY-BIND-PROP ...,

TEST-SUPPORT=*YES

MODIFY-BIND-PROP ...,

[TEST-SUPPORT=*NO]

Loading and
starting with DBL

LOAD-EXECUTABLE-PROGRAM ...,

TEST-OPTIONS=*AID

or

START-EXECUTABLE-PROGRAM ...,

TEST-OPTIONS=*AID

LOAD-EXECUTABLE-PROGRAM ...,

[TEST-OPTIONS=*NONE]

or

START-EXECUTABLE-PROGRAM ...,

[TEST-OPTIONS=*NONE]

A program to be tested should be loaded with the LOAD-EXECUTABLE-PROGRAM command so that AID commands can be subsequently entered.
A program that is to be processed with AID only if an error occurs can be loaded and started with the START-EXECUTABLE-PROGRAM command.

Note on linking the C runtime systems

If the modules from the CRTE library SYSLNK.CRTE.PARTIAL-BIND are linked, and the C runtime system itself is loaded dynamically only at runtime (which reflects the default setting when linking with the BIND statement of the compiler), the following restriction applies when debugging with AID: in the case of some program errors, e.g. due to invalid parameter passing to C library functions, AID cannot display the call hierarchy fully, since the last function before the error occurred may be missing. This restriction can be eliminated by linking the C runtime system statically. The following entry is required for this purpose when linking with the BIND statement of the compiler: MODIFY-BIND-PROPERTIES STDLIB=*STATIC.

Name of the translation unit in the S qualification

For LLMs, the so-called “source module name” is specified. This name is derived from the name of the source program by the C/C++ compiler as follows:

  1. The <cat-id> and <user-id> name components, if present, are not used.

  2. If the file or element name of the source program exceeds 32 characters, it is truncated from the right to 32 characters.

If the source module name contains periods, it must be specified in the S qualification using the n’name’ notation.

Example

The file name of the source program is HELLO.C.

The S qualification in the %TRACE command, for example, would be:

/%t 1 in s=n’hello.c’