[OpenVMS documentation]
[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
Updated: 11 December 1998

OpenVMS Debugger Manual


Previous Contents Index

C.7.7.4 Pointers to Members

Objects that are pointers to members are represented as 64-bit integers.

C.7.7.5 Referencing Entities by Type

To examine and display the value of an object or member by type, use the command EXAMINE/TYPE. Similarly, you can modify the value of an expression to be deposited to a type you specify by using the DEPOSIT/TYPE command. With the /TYPE qualifier, the syntax for these commands is as follows:


deposit/type=(name) 
examine/type=(name) 

The type denoted by name must be the name of a variable or data type declared in the program. The /type qualifier is particularly useful for referencing C++ objects that have been declared with more than one type.

C.7.8 Using the Debugger with C++ Functions

This section describes how to reference the various kinds of functions and function arguments.

C.7.8.1 Referring to Overloaded Functions

To find the symbolic names of functions in your code, use the SHOW SYMBOL command. If the function is overloaded, use the asterisk wildcard character (*) in the name specification to display the overloaded symbol names.

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 

C.7.8.2 Referring to Static and Nonstatic Member Functions

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' 

C.7.8.3 Referring to Constructors

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 

C.7.8.4 Referring to Destructors

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' 

C.7.8.5 Referring to Conversions

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)&' 

C.7.8.6 Referring to User-Defined Operators

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' 

C.7.8.7 Referring to Function Arguments

In debugger referencing, you use this, *this, and this->m as follows:

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 ** 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

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 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.

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 DIBOL (VAX Only)

The following subtopics describe debugger support for DIBOL.

C.9.1 Operators in Language Expressions

Supported DIBOL operators in language expressions include:
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

C.9.2 Constructs in Language and Address Expressions

Supported constructs in language and address expressions for DIBOL follow:
Symbol Construct
( ) Substring
[ ] Subscripting
. (period) Record component selection

C.9.3 Data Types

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)

C.10 Fortran

The following subtopics describe debugger support for Fortran.

C.10.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 ** 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

C.10.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.10.3 Predefined Symbols

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

C.10.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 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.


Previous Next Contents Index

[Site home] [Send comments] [Help with this site] [How to order documentation] [OpenVMS site] [Compaq site]
[OpenVMS documentation]

Copyright © Compaq Computer Corporation 1998. All rights reserved.

Legal
4538PRO_071.HTML