[an error occurred while processing this directive]
![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
HP OpenVMS Debugger Manual
B.3.5 Controlling the Input RadixThe built-in symbols %BIN, %DEC, %HEX, and %OCT can be used in address expressions and language expressions to specify that an integer literal that follows (or all integer literals in a parenthesized expression that follows) should be interpreted in binary, decimal, hexadecimal, or octal radix, respectively. Use these radix built-in symbols only with integer literals. For example:
B.3.6 Specifying Program Locations and the Current Value of an EntityThe following built-in symbols enable you to specify program locations and the current value of an entity:
In the following example, the variable WIDTH is examined; the value 12 is then deposited into the current location (WIDTH); this is verified by examining the current location:
In the next example, the next and previous locations in an array are examined:
Note that using the Return key to signify the logical successor does
not apply to all contexts. For example, you cannot press the Return key
after typing the command DEPOSIT to indicate the next location, but you
can always use the symbol %NEXTLOC for that purpose.
The following list describes the symbols and operators that you can use in address expressions. A unary operator has one operand. A binary operator has two operands. The following examples show the use of built-in symbols and operators in address expressions. The following command sets a tracepoint at line 26 of the module in which execution is currently suspended:
The next command displays the source line associated with line 47:
The next command sets a breakpoint at label 10 of module MOD4:
The following command displays the value of the variable COUNT that is declared in routine ROUT2 of module MOD4. The backslash (\) pathname delimiter separates the pathname elements:
The following command sets a breakpoint on line 26 of the module QUEUMAN:
The following command displays the value of the global symbol X:
The order in which the debugger evaluates the elements of an address expression is similar to that used by most programming languages. The order is determined by the following three factors, listed in decreasing order of precedence (first listed have higher precedence):
The debugger operators are listed in decreasing order of precedence as follows:
For example, when evaluating the following expression, the debugger first adds the operands within parentheses, then divides the result by 4, then subtracts the result from 5:
The following command displays the value contained in the memory
location
The following examples show the use of the contents-of operator. In the first example, the instruction at the current PC value is obtained (the instruction whose address is contained in the PC and which is about to execute):
In the next example, the source line at the PC value one level down the call stack is obtained (at the call to routine SWAP):
For the next example, the value of the pointer variable PTR is 7FF00000 hexadecimal, the address of an entity that you want to examine. The value of this entity is 3FF00000 hexadecimal. The following command shows how to examine the entity:
In the next example, the contents-of operator (at sign or period) is used with the current location operator (period) to examine a linked list of three quadword-integer pointer variables (identified as L1, L2, and L3 in the following figure). P is a pointer to the start of the list. The low longword of each pointer variable contains the address of the next variable; the high longword of each variable contains its integer value (8, 6, and 12, respectively). ![]()
The following example shows how to use the bit-field operator. For example, to examine the address expression X_NAME starting at bit 3 with a length of 4 bits and no sign extension, enter the following command:
B.3.8 Obtaining Information About ExceptionsThe following built-in symbols enable you to obtain information about the current exception and use that information to qualify breakpoints or tracepoints:
For example:
The conditional expressions in the WHEN clauses are language-specific.
You can use the following built-in symbols to obtain and manipulate the scope for symbol lookup and for source or instruction display relative to the routine call stack:
These symbols return integer values that denote a call frame on the call stack. Call frame 0 denotes the routine at the top of the stack, where execution is suspended. Call frame 1 denotes the calling routine, and so on. For example, the following command specifies that the debugger search for symbols starting with the scope denoted by the next routine down the call stack (rather than starting with the routine at the top of the call stack):
Appendix C
|
Ada | BASIC | BLISS | C |
C++ | COBOL | DIBOL | Fortran |
MACRO-32 | Pascal | PL/I | RPG II |
SCAN |
On Alpha processors, you can use the debugger with programs written in the following Compaq languages:
Ada | BASIC | BLISS | C |
C++ | COBOL | Fortran | MACRO-32 1 |
MACRO-64 | Pascal | PL/I |
On Intel® Itanium® processors, you can use the debugger with programs written in the following HP languages:
Assembler (IAS) | BASIC | BLISS | C |
C++ | COBOL | Fortran | MACRO-32 1 |
IMACRO | PASCAL | ||
Assembler (IAS) | BASIC | BLISS | C |
C++ | COBOL | Fortran | MACRO-32 1 |
IMACRO | PASCAL |
The debugger recognizes the syntax, data typing, and scoping rules of each language. It also recognizes each language's operators and expression syntax. Therefore, when using debugger commands you can specify variables and other program entities as you might in the source code of the program. You can also compute the value of a source-language expression using the syntax of that language.
This appendix describes debugging techniques that are common to most of the supported languages. The help topics provide further information specific to each language:
For more information about language-specific debugger support, refer to the documentation furnished with a particular language.
If your program is written in more than one language, you can change the debugging context from one language to another during a debugging session. Use the SET LANGUAGE command with the keyword corresponding to your language choice.
On VAX processors, you can specify one of the following keywords:
ADA | BASIC | BLISS | C |
C++ | COBOL | DIBOL | FORTRAN |
MACRO | PASCAL | PLI | RPG |
SCAN | UNKNOWN |
On Alpha processors, you can specify one of the following keywords:
ADA | AMACRO | BASIC | BLISS |
C | C++ | COBOL | FORTRAN |
MACRO | MACRO64 | PASCAL | UNKNOWN |
On Intel® Itanium® processors, you can specify on of the following keywords:
AMACRO | BASIC | BLISS | C |
C++ | COBOL | Fortran | PASCAL |
UNKNOWN |
When you are debugging a program written in an unsupported language,
enter the SET LANGUAGE UNKNOWN command. To maximize the usability of
the debugger with unsupported languages, this setting causes the
debugger to accept a large set of data formats and operators, including
some that might be specific to only a few supported languages. For
information about the operators and constructs that are recognized when
the language is set to UNKNOWN, type Help Language_UNKNOWN.
C.2 Ada
The following subtopics describe debugger support for Ada. For
information specific to Ada tasking programs, see also Chapter 16.
C.2.1 Ada Names and Symbols
The following subtopics describe debugger support for Ada names and symbols, including predefined attributes.
Note that parts of names may be language expressions---for example, attributes such as 'FIRST or 'POS. This affects how you use the EXAMINE, EVALUATE, and DEPOSIT commands with such names. For examples of enumeration types, type Help Specifying_Attributes_with_Enumeration_Types.
Previous | Next | Contents | Index |