OpenVMS Debugger Manual


Previous Contents Index

C.8 COBOL

The following subtopics describe debugger support for COBOL.

C.8.1 Operators in Language Expressions

Supported COBOL operators in language expressions include:
Kind Symbol Function
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition
Infix - Subtraction
Infix * Multiplication
Infix / Division
Infix = Equal to
Infix NOT = Not equal to
Infix > Greater than
Infix NOT < Greater than or equal to
Infix < Less than
Infix NOT > Less than or equal to
Infix NOT Logical NOT
Infix AND Logical AND
Infix OR Logical OR

C.8.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for COBOL follow:
Symbol Construct
( ) Subscripting
OF Record component selection
IN Record component selection

C.8.3 Data Types

Supported COBOL data types follow:
COBOL Data Type Operating System Data Type Name
COMP Longword Integer (L,LU)
COMP Word Integer (W,WU)
COMP Quadword Integer (Q,QU)
COMP-1 F_Floating (F)
COMP-1 (Alpha and Integrity servers specific) S_Floating (FS)
COMP-2 D_Floating (D)
COMP-2 (Alpha and Integrity servers specific) T_Floating (FT)
COMP-3 Packed Decimal (P)
INDEX Longword Integer (L)
Alphanumeric ASCII Text (T)
Records (None)
Numeric Unsigned Numeric string, unsigned (NU)
Leading Separate Sign Numeric string, left separate sign (NL)
Leading Overpunched Sign Numeric string, left overpunched sign (NLO)
Trailing Separate Sign Numeric string, right separate sign (NR)
Trailing Overpunched Sign Numeric string, right overpunched sign (NRO)

Floating-point numbers of type COMP-1 may be represented by F_Floating or IEEE S_Floating, depending on compiler switches.

Floating-point numbers of type COMP-2 may be represented by D_Floating or IEEE T_Floating, depending on compiler switches.

C.8.4 Source Display

The debugger can show source text included in a program with the COPY, COPY REPLACING, or REPLACE statement. However, when COPY REPLACING or REPLACE is used, the debugger shows the original source text instead of the modified source text generated by the COPY REPLACING or REPLACE statement.

The debugger cannot show the original source lines associated with the code for a REPORT section. You can see the DATA SECTION source lines associated with a REPORT, but no source lines are associated with the compiled code that generates the report.

C.8.5 COBOL INITIALIZE Statement and Large Tables (Arrays) (Alpha Only)

On OpenVMS Alpha systems, the debugger can take an unusually great amount of time and resources if you use the STEP command to execute an INITIALIZE statement in a COBOL program when a large table (array) is being initialized.

To work around this problem, set a breakpoint on the first executable line past the INITIALIZE statement, rather than stepping across the INITIALIZE statement.

C.9 Fortran

The following subtopics describe debugger support for Fortran.

C.9.1 Operators in Language Expressions

Supported Fortran operators in language expressions include:
Kind Symbol Function
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition
Infix - Subtraction
Infix * Multiplication
Infix / Division
Infix // Concatenation
Infix .EQ. Equal to
Infix == Equal to
Infix .NE. Not equal to
Infix /= Not equal to
Infix .GT. Greater than
Infix > Greater than
Infix .GE. Greater than or equal to
Infix >= Greater than or equal to
Infix .LT. Less than
Infix < Less than
Infix .LE. Less than or equal to
Infix <= Less than or equal to
Prefix .NOT. Logical NOT
Infix .AND. Logical AND
Infix .OR. Logical OR
Infix .XOR. Exclusive OR
Infix .EQV. Equivalence
Infix .NEQV. Exclusive OR

C.9.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for Fortran follow:
Symbol Construct
( ) Subscripting
. (period) Record component selection
% (percent sign) Record component selection

C.9.3 Predefined Symbols

Supported Fortran predefined symbols follow:
Symbol Description
.TRUE. Logical True
.FALSE. Logical False

C.9.4 Data Types

Supported Fortran data types follow:
Fortran Data Type Operating System Data Type Name
LOGICAL*1 Byte Unsigned (BU)
LOGICAL*2 Word Unsigned (WU)
LOGICAL*4 Longword Unsigned (LU)
LOGICAL*8 (Alpha and Integrity servers specific) Quadword Unsigned (QU)
BYTE Byte (B)
INTEGER*1 Byte Integer (B)
INTEGER*2 Word Integer (W)
INTEGER*4 Longword Integer (L)
INTEGER*8 (Alpha and Integrity servers specific) Quadword Integer (Q)
REAL*4 F_Floating (F)
REAL*4 (Alpha and Integrity servers specific) IEEE S_Floating (FS)
REAL*8 D_Floating (D)
REAL*8 G_Floating (G)
REAL*8 (Alpha and Integrity servers specific) IEEE T_Floating (FT)
REAL*16 (Alpha and Integrity servers specific) H_Floating (H)
COMPLEX*8 F_Complex (FC)
COMPLEX*8 (Alpha and Integrity servers specific) IEEE S_Floating (SC)
COMPLEX*16 D_Complex (DC)
COMPLEX*16 G_Complex (GC)
COMPLEX*16 (Alpha and Integrity servers specific) IEEE T_Floating (TC)
CHARACTER ASCII Text (T)
Arrays (None)
Records (None)

Even though the data type codes for unsigned integers (BU, WU, LU, QU) are used internally to describe the LOGICAL data types, the debugger (like the compiler) treats LOGICAL variables and values as being signed when they are used in language expressions.

The debugger prints the numeric values of LOGICAL variables or expressions instead of .TRUE. or .FALSE. Normally, only the low-order bit of a LOGICAL variable or value is significant (0 is .FALSE. and 1 is .TRUE.). However, Fortran does allow all bits in a LOGICAL value to be manipulated and LOGICAL values can be used in integer expressions. For this reason, it is at times necessary to see the entire integer value of a LOGICAL variable or expression, and that is what the debugger shows.

COMPLEX constants such as (1.0,2.0) are not supported in debugger expressions.

Floating-point numbers of type REAL*4 and COMPLEX*8 may be represented by F_Floating or IEEE S_Floating, depending on compiler switches.

Floating-point numbers of type REAL*8 and COMPLEX*16 may be represented by D_Floating, G_Floating, or IEEE T_Floating, depending on compiler switches.

On OpenVMS Alpha systems, the debugger cannot evaluate expressions that contain complex variables. To work around this problem, examine the complex variable and then evaluate the expression using the real and imaginary parts of the complex variable as shown by the EXAMINE command.

C.9.5 Initialization Code

When you debug a program that compiled with the /CHECK=UNDERFLOW or /PARALLEL qualifier, a message appears, as in the following example:


DBG> RUN FORMS
Language: FORTRAN, Module: FORMS 
Type GO to reach main program
DBG>

The "Type GO to reach MAIN program" message indicates that execution is supended before the start of the main program, so that you can execute initialization code under debugger control. Entering the GO command places you at the start of the main program. At that point, enter the GO command again to start program execution, as with other types of Fortran programs.

C.10 MACRO-32

The following subtopics describe debugger support for MACRO-32.

C.10.1 Operators in Language Expressions

The MACRO-32 language does not have expressions in the same sense as high-level languages. Only assembly-time expressions and only a limited set of operators are accepted. To permit the MACRO-32 programmer to use expressions at debug-time as freely as in other languages, the debugger accepts a number of operators in MACRO-32 language expressions that are not found in MACRO-32 itself. In particular, the debugger accepts a complete set of comparison and Boolean operators modeled after BLISS. It also accepts the indirection operator and the normal arithmetic operators.
Kind Symbol Function
Prefix @ Indirection
Prefix . Indirection
Prefix + Unary plus
Prefix - Unary minus (negation)
Infix + Addition
Infix - Subtraction
Infix * Multiplication
Infix / Division
Infix MOD Remainder
Infix @ Left shift
Infix EQL Equal to
Infix EQLU Equal to
Infix NEQ Not equal to
Infix NEQU Not equal to
Infix GTR Greater than
Infix GTRU Greater than unsigned
Infix GEQ Greater than or equal to
Infix GEQU Greater than or equal to unsigned
Infix LSS Less than
Infix LSSU Less than unsigned
Infix LEQ Less than or equal to
Infix LEQU Less than or equal to unsigned
Prefix NOT Bit-wise NOT
Infix AND Bit-wise AND
Infix OR Bit-wise OR
Infix XOR Bit-wise exclusive OR
Infix EQV Bit-wise equivalence

C.10.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for MACRO-32 follow:
Symbol Construct
[ ] Subscripting
<p,s,e> Bit field selection as in BLISS

The DST information generated by the MACRO-32 assembler treats a label that is followed by an assembler directive for storage allocation as an array variable whose name is the label. This enables you to use the array syntax of a high-level language when examining or manipulating such data.

In the following example of MACRO-32 source code, the label LAB4 designates hexadecimal data stored in four words:


LAB4:    .WORD    ^X3F,5[2],^X3C 

The debugger treats LAB4 as an array variable. For example, the following command displays the value stored in each element (word):


DBG> EXAMINE LAB4
.MAIN.\MAIN\LAB4 
    [0]:        003F 
    [1]:        0005 
    [2]:        0005 
    [3]:        003C

The following command displays the value stored in the fourth word (the first word is indexed as element "0"):


DBG> EXAMINE LAB4[3]
.MAIN.\MAIN\LAB4[3]:    03C

C.10.3 Data Types

MACRO-32 binds a data type to a label name according to the assembler directive that follows the label definition. Supported MACRO-32 directives follow:
MACRO-32 Directives Operating System Data Type Name
.BYTE Byte Unsigned (BU)
.WORD Word Unsigned (WU)
.LONG Longword Unsigned (LU)
.SIGNED_BYTE Byte Integer (B)
.SIGNED_WORD Word Integer (W)
.LONG Longword Integer (L)
.QUAD Quadword Integer (Q)
.F_FLOATING F_Floating (F)
.D_FLOATING D_Floating (D)
.G_FLOATING G_Floating (G)
(Not applicable) Packed decimal (P)

C.10.4 MACRO-32 Compiler (AMACRO) (Alpha Only)

Programmers who are porting applications written in MACRO-32 to Alpha systems use the MACRO-32 compiler (AMACRO). A debugging session for compiled MACRO-32 code is similar to that for assembled code. However, there are some important differences that are described in this section. For complete information on porting these applications, see the Porting VAX MACRO Code from OpenVMS VAX to OpenVMS Alpha manual.


Previous Next Contents Index