For example, consider the following code:
class base { public: base(); base( int ); ~base(); int base_f1(); void base_f2(); void base_f2( int ); void base_f2( char ); };
The following sequence shows how to display overloaded symbols and determine the appropriate function reference:
DBG> set break %name 'base::base_f2' %DEBUG-E-NOTUNQOVR, symbol 'base::base_f2' is overloaded use SHOW SYMBOL to find the unique symbol names DBG> show symbol *base_f2 overloaded symbol CXX_T10_179\base::base_f2 overloaded instance CXX_T10_179\base::base_f2__1 overloaded instance CXX_T10_179\base::base_f2__2 overloaded instance CXX_T10_179\base::base_f2__3 DBG> set break %name 'base::base_f2__2' DBG> step stepped to CXX_T10_179\main\%LINE 20 20: x.base_f2(); DBG> step stepped to CXX_T10_179\main\%LINE 21 21: x.base_f2(5); DBG> step break at routine CXX_T10_179\base::base_f2__2 12: void base_f2( int ) {} DBG> step stepped to CXX_T10_179\main\%LINE 22 22: x.base_f2('W'); stepped to CXX_T10_179\main\%LINE 22 DBG> go 'Normal successful completion' DBG> ^Z
To refer to a member function, quote, with %name, its qualified class name, two colons (::), and the name of the member function. If the member function is overloaded, append the suffix __integer-number.
The following examples show the correct use of member function references:
DBG> set break %name 'MYSTRING::length' DBG> set break %name 'MYCOMPLEX::format__1', %name 'MYCOMPLEX::format__2'
To refer to a constructor, state the name. If a constructor is overloaded, append the suffix __integer-number.
The following examples show the correct use of constructor references:
DBG> set break FOO DBG> set break MYSTRING__1
To refer to a destructor, quote its name, including the tilde (~), with %name.
The following example shows the correct use of a destructor reference:
DBG> set break %name '~FOO'
To refer to conversion operators from a class SRC to a type dest, quote SRC, two colons (::), and then dest with %name.
The set of atomic types is drawn from the following set of names:
void char signed_char unsigned_char signed_short unsigned_short int signed_int unsigned_int signed_long unsigned_long float double long_double
Pointer types are named (type*). Reference types are named (type&). The types struct, union class and enum are named by their tags and the qualifiers const and volatile precede their types with a space in between. For example:
DBG> set break %name 'C::int', %name 'C::(const S)&'
The following operators may be overloaded by user-defined functions:
+ - * / % ^ & | ~ ! = < > += -= *= /= %= ^= &= |= << >> >>= <<= == != <= >= && | ++ -- ->* , -> [] () delete new
See §7.2 of The Annotated C++ Reference Manual (shipped with C++ documentation) for more details.
To refer to such user-defined functions, quote the operator characters with %name. As with regular functions, prefix the string quoted by %name with a qualified class name and two colons (::) if the user-defined operator is a member function. Similarly, if the function is overloaded, append the suffix __integer_number to the operator characters. In particular, this suffix is necessary if both unary and binary instances of an operator such as + are defined, or if prefix instances of ++ or -- are defined.
The following examples show the correct use of user-defined function references:
DBG> set break %name 'MYSTRING::+' DBG> set break %name 'COUNTER::++__1', %name 'COUNTER::++__2'
In debugger referencing, you use this, *this, and this->m as follows:
DBG> examine this
DBG> examine *this
DBG> examine this->m
The following subtopics describe debugger support for COBOL.
Supported COBOL operators in language expressions follow:
Kind | Symbol | Function |
---|---|---|
Prefix | + | Unary plus |
Prefix | -- | Unary minus (negation) |
Infix | + | Addition |
Infix | -- | Subtraction |
Infix | * | Multiplication |
Infix | / | Division |
Infix | ** | Exponentiation (VAX specific) |
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 |
Supported constructs in language and address expressions for COBOL follow:
Symbol | Construct |
---|---|
( ) | Subscripting |
OF | Record component selection |
IN | Record component selection |
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 specific) | S_Floating (FS) |
COMP-2 | D_Floating (D) |
COMP-2 (Alpha 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.
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.
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.
The following subtopics describe debugger support for DIBOL.
Supported DIBOL operators in language expressions follow:
Kind | Symbol | Function |
---|---|---|
Prefix | # | Round |
Prefix | + | Unary plus |
Prefix | -- | Unary minus (negation) |
Infix | + | Addition |
Infix | -- | Subtraction |
Infix | * | Multiplication |
Infix | / | Division |
Infix | // | Division with fractional result |
Infix | .EQ. | Equal to |
Infix | .NE. | Not equal to |
Infix | .GT. | Greater than |
Infix | .GE. | Greater than or equal to |
Infix | .LT. | Less than |
Infix | .LE. | Less than or equal to |
Infix | .NOT. | Logical NOT |
Infix | .AND. | Logical AND |
Infix | .OR. | Logical OR |
Infix | .XOR. | Exclusive OR |
Supported constructs in language and address expressions for DIBOL follow:
Symbol | Construct |
---|---|
( ) | Substring |
[ ] | Subscripting |
. (period) | Record component selection |
Supported DIBOL data types follow:
DIBOL Data Type | Operating System Data Type Name |
---|---|
I1 | Byte Integer (B) |
I2 | Word Integer (W) |
I4 | Longword Integer (L) |
Pn | Packed Decimal String (P) |
Pn.m | Packed Decimal String (P) |
Dn | Numeric String, Zoned Sign (NZ) |
Dn.m | Numeric String, Zoned Sign (NZ) |
An | ASCII Text (T) |
Arrays | (None) |
Records | (None) |
The following subtopics describe debugger support for Fortran.
Supported Fortran operators in language expressions follow:
Kind | Symbol | Function |
---|---|---|
Prefix | + | Unary plus |
Prefix | -- | Unary minus (negation) |
Infix | + | Addition |
Infix | -- | Subtraction |
Infix | * | Multiplication |
Infix | / | Division |
Infix | ** | Exponentiation (VAX specific) |
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 |
Supported constructs in language and address expressions for Fortran follow:
Symbol | Construct |
---|---|
( ) | Subscripting |
. (period) | Record component selection |
% (percent sign) | Record component selection |
Supported Fortran predefined symbols follow:
Symbol | Description |
---|---|
.TRUE. | Logical True |
.FALSE. | Logical False |
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 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 specific) | Quadword Integer (Q) |
REAL*4 | F_Floating (F) |
REAL*4 (Alpha specific) | IEEE S_Floating (FS) |
REAL*8 | D_Floating (D) |
REAL*8 | G_Floating (G) |
REAL*8 (Alpha specific) | IEEE T_Floating (FT) |
REAL*16 (Alpha specific) | H_Floating (H) |
COMPLEX*8 | F_Complex (FC) |
COMPLEX*8 (Alpha specific) | IEEE S_Floating (SC) |
COMPLEX*16 | D_Complex (DC) |
COMPLEX*16 | G_Complex (GC) |
COMPLEX*16 (Alpha 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.
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.
The following subtopics describe debugger support for MACRO--32.
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 |
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
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) |
.H_FLOATING | H_Floating (H) (VAX specific) |
(Not applicable) | Packed decimal (P) |
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.
One major difference is the fact that the code is compiled. On a VAX system, each MACRO--32 instruction is a single machine instruction. On an Alpha system, each MACRO--32 instruction may be compiled into many Alpha machine instructions. A major side effect of this difference is the relocation and rescheduling of code if you do not specify /NOOPTIMIZE in your compile command. After you have debugged your code, you can recompile without /NOOPTIMIZE to improve performance.
Another major difference between debugging compiled code and debugging assembled code is a new concept to MACRO--32, the definition of symbolic variables for examining routine arguments. On VAX systems, when you were debugging a routine and wanted to examine the arguments, you would typically do something like the following:
DBG> EXAMINE @AP ; to see the argument count DBG> EXAMINE @AP+4 ; to examine the first arg
4538P055.HTM OSSG Documentation 22-NOV-1996 13:02:58.39
Copyright © Digital Equipment Corporation 1996. All Rights Reserved.