Option for Debugging a Program (X)

The X option supplies information that the programmer may use to debug a program.

Creating the Cross-reference (X)

The X option to COMPILE creates a cross-reference of all variables and labels used in the program and places it in the BSYM file in the current account. For example:

>COMPILE BP ADDNUMS (X)

********

SUCCESSFUL COMPILE!   1 FRAMES USED.

 

>

The BSYM file now has 3 items with item-IDs: SUM, NUM1, and NUM2. Each item has a single attribute, with value marks separating the line numbers at which the variable was accessed. For example, item SUM contains in Attribute 1:

005*]006

From this we can tell that the SUM variable is accessed in lines 5 and 6 of the program. The asterisk (*) after 005 signifies that the variable is assigned a value on line 5 of the program. Similarly, item NUM1 of the file BSYM contains:

002*]005]006

The data section of the BSYM file is initialized each time the X option to COMPILE is used, regardless of whether the same program is compiled or what program file the program resides in. If the BSYM file does not already exist, an error message results and the cross-reference is not created.

See Also

Compiling the Program

Options for Cataloging (C, S)

Listing the Source (L)

Printing Compiler Output (P)

Specifying a Version of the Operating System

Obtaining the Compilation Time and Date