HP OpenVMS Systems Documentation
OpenVMS Debugger Manual
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 Exceptions
The following built-in symbols enable you to obtain information about the current exception and use that information to qualify breakpoints or tracepoints:
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):
On Alpha processors, you can use the debugger with programs written in the following Compaq languages:
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:
On Alpha processors, you can specify one of the following keywords:
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.
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.
C.2.1.1 Ada Names
Supported Ada names follow:
|Kind of Name||Debugger Support|
Full support for Ada rules for the syntax of identifiers.
Function designators that are operator symbols (for example, + and *) rather than identifiers must be prefixed with %NAME. Also, the operator symbol must be enclosed in quotation marks.
Full support for Ada rules for numeric literals, character literals, string literals, and reserved words.
The debugger accepts signed integer literals in the range --2147483648 to 2147483647.
Depending on context and architecture, the debugger interprets floating-point types as F_floating, D_floating, G_floating, H_floating, S_floating, or T_floating.
|Indexed components||Full support.|
You can examine and evaluate an entire slice or an indexed component of
You can deposit only to an indexed component of a slice. You cannot deposit an entire slice.
|Selected components||Full support, including use of the keyword all in .all.|
|Literals||Full support, including the keyword null.|
|Boolean symbols||Full support (TRUE, FALSE).|
|Aggregates||You can examine the entire record and array objects with the EXAMINE command. You can deposit a value in a component of an array or record. You cannot use the DEPOSIT command with aggregates, except to deposit character string values.|
Supported Ada predefined attributes follow. Note that the debugger SHOW SYMBOL/TYPE command provides the same information that is provided by the P'FIRST, P'LAST, P'LENGTH, P'SIZE, and P'CONSTRAINED attributes.
|P'CONSTRAINED||For a prefix P that denotes a record object with discriminants. The value of P'CONSTRAINED reflects the current state of P (constrained or unconstrained).|
|P'FIRST||For a prefix P that denotes an enumeration type or a subtype of an enumeration type. Yields the lower bound of P.|
|P'FIRST||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the lower bound of the first index range.|
|P'FIRST(N)||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the lower bound of the Nth index range.|
|P'LAST||For a prefix P that denotes an enumeration type, or a subtype of an enumeration type. Yields the upper bound of P.|
|P'LAST||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the upper bound of the first index range.|
|P'LAST(N)||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the upper bound of the Nth index range.|
|P'LENGTH||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the number of values of the first index range (zero for a null range).|
|P'LENGTH(N)||For a prefix P that is appropriate for an array type, or that denotes a constrained array subtype. Yields the number of values of the Nth index range (zero for a null range).|
|P'POS(X)||For a prefix P that denotes an enumeration type or a subtype of an enumeration type. Yields the position number of the value X. The first position is 0.|
|P'PRED(X)||For a prefix P that denotes an enumeration type or a subtype of an enumeration type. Yields the value of type P which has a position number one less than that of X.|
|P'SIZE||For a prefix P that denotes an object. Yields the number of bits allocated to hold the object.|
|P'SUCC(X)||For a prefix P that denotes an enumeration type or a subtype of an enumeration type. Yields the value of type P which has a position number one more than that of X.|
|P'VAL(N)||For a prefix P that denotes an enumeration type or a subtype of an enumeration type. Yields the value of type P which has the position number N. The first position is 0.|
Consider the following declarations:
type DAY is (MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY); MY_DAY : DAY;
The following examples show the use of attributes with enumeration types. Note that you cannot use the EXAMINE command to determine the value of attributes, because attributes are not variable names. You must use the EVALUATE command instead. For the same reason, attributes can appear only on the right of the := operator in a DEPOSIT command.
DBG> EVALUATE DAY'FIRST MON DBG> EVALUATE DAY'POS(WEDNESDAY) 2 DBG> EVALUATE DAY'VAL(4) FRI DBG> DEPOSIT MY_DAY := TUESDAY DBG> EVALUATE DAY'SUCC(MY_DAY) WED DBG> DEPOSIT . := DAY'PRED(MY_DAY) DBG> EXAMINE . EXAMPLE.MY_DAY: MONDAY DBG> EVALUATE DAY'PRED(MY_DAY) %DEBUG-W-ILLENUMVAL, enumeration value out of legal range
Consider the following declarations:
type MASK is (DEC,FIX,EXP); type CODE is (FIX,CLA,DEC); MY_MASK : MASK; MY_CODE : CODE;
In the following example, the qualified expression CODE'(FIX) resolves the overloaded enumeration literal FIX, which belongs to both type CODE and type MASK:
DBG> DEPOSIT MY_CODE := FIX %DEBUG-W-NOUNIQUE, symbol 'FIX' is not unique DBG> SHOW SYMBOL/TYPE FIX data EXAMPLE.FIX enumeration type (CODE, 3 elements), size: 1 byte data EXAMPLE.FIX enumeration type (MASK, 3 elements), size: 1 byte DBG> DEPOSIT MY_CODE := CODE'(FIX) DBG> EXAMINE MY_CODE EXAMPLE.MY_CODE: FIX
The following sections describe debugger support for Ada operators and
C.2.2.1 Operators in Language Expressions
Supported Ada operators in language expressions include:
|Prefix||+||Unary plus (identity)|
|Prefix||-||Unary minus (negation)|
|Infix||**||Exponentiation (VAX specific)|
|Infix||&||Concatenation (only string types)|
|Infix||=||Equality (only scalar and string types)|
|Infix||/=||Inequality (only scalar and string types)|
|Infix||>||Greater than (only scalar and string types)|
|Infix||>=||Greater than or equal (only scalar and string types)|
|Infix||<||Less than (only scalar and string types)|
|Infix||<=||Less than or equal (only scalar and string types)|
|Infix||AND||Logical AND (not for bit arrays)|
|Infix||OR||Logical OR (not for bit arrays)|
|Infix||XOR||Logical exclusive OR (not for bit arrays)|
The debugger does not support the following items:
Supported Ada expressions include:
|Kind of Expression||Debugger Support|
No support for any of the
explicit type conversions specified in Ada. However, the
debugger performs certain
implicit type conversions between numeric types during the
evaluation of expressions.
The debugger converts lower-precision types to higher-precision types before evaluating expressions involving types of different precision:
|Subtypes||Full support. Note that the debugger denotes subtypes and types that have range constraints as "subrange" types.|
|Qualified expressions||Supported as required to resolve overloaded enumeration literals (literals that have the same identifier but belong to different enumeration types). The debugger does not support qualified expressions for any other purpose.|
|Allocators||No support for any operations with allocators.|
|Universal expressions||No support.|
C.2.3 Data Types
Supported Ada data types follow:
|Ada Data Type||Operating System Data Type Name|
|INTEGER||Longword Integer (L)|
|SHORT_INTEGER||Word Integer (W)|
|SHORT_SHORT_INTEGER||Byte Integer (B)|
|SYSTEM.UNSIGNED_QUADWORD||Quadword Unsigned (QU)|
|SYSTEM.UNSIGNED_LONGWORD||Longword Unsigned (LU)|
|SYSTEM.UNSIGNED_WORD||Word Unsigned (WU)|
|SYSTEM.UNSIGNED_BYTE||Byte Unsigned (BU)|
D_Floating (D), if pragma LONG_FLOAT (D_FLOAT) is in effect.
G_Floating (G), if pragma LONG_FLOAT (G_FLOAT) is in effect.
|STRING||ASCII Text (T)|
|BOOLEAN||Aligned Bit String (V)|
|BOOLEAN||Unaligned Bit String (VU)|
|Enumeration||For any enumeration type whose value fits into an unsigned byte or word: Byte Unsigned (BU) or Word Unsigned (WU), respectively. Otherwise: No corresponding operating system data type.|