![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS Debugger Manual
C.7.7.4 Pointers to Members
Objects that are pointers to members are represented as 64-bit integers.
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:
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.
This section describes how to reference the various kinds of functions
and function arguments.
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:
The following sequence shows how to display overloaded symbols and determine the appropriate function reference:
C.7.8.2 Referring to Static and Nonstatic Member FunctionsTo 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:
C.7.8.3 Referring to ConstructorsTo 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:
C.7.8.4 Referring to DestructorsTo refer to a destructor, quote its name, including the tilde ( ~ ), with %name. The following example shows the correct use of a destructor reference:
C.7.8.5 Referring to ConversionsTo 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:
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:
C.7.8.6 Referring to User-Defined OperatorsThe following operators may be overloaded by user-defined functions:
See The Annotated C++ Reference Manual (shipped with C++ documentation) for more details about overloading operators. 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:
C.7.8.7 Referring to Function ArgumentsIn debugger referencing, you use this , *this , and this->m as follows:
C.8 COBOL
The following subtopics describe debugger support for COBOL.
Supported COBOL operators in language expressions include:
C.8.2 Constructs in Language and Address ExpressionsSupported constructs in language and address expressions for COBOL follow:
C.8.3 Data TypesSupported COBOL data types follow:
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 include:
C.9.2 Constructs in Language and Address ExpressionsSupported constructs in language and address expressions for DIBOL follow:
C.9.3 Data TypesSupported DIBOL data types follow:
Supported Fortran operators in language expressions include:
C.10.2 Constructs in Language and Address ExpressionsSupported constructs in language and address expressions for Fortran follow:
C.10.3 Predefined SymbolsSupported Fortran predefined symbols follow:
C.10.4 Data TypesSupported Fortran data types follow:
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.
|