or
DBG> EXAMINE @AP ; to see arg count DBG> EXAMINE .+4:.+20 ; to see first 5 args
On Alpha systems, the arguments do not reside in a vector in memory as they did on VAX systems. Furthermore, there is no AP register on Alpha systems. If you type EXAMINE @AP when debugging MACRO compiled code, the debugger reports that AP is an undefined symbol.
In the compiled code, the arguments can reside in some combination of:
The compiler does not require that you read the generated code to locate the arguments. Instead, it provides $ARGn symbols that point to the correct argument locations. $ARG0 is the same as @AP+0 is on VAX systems, that is, the argument count. $ARG1 is the first argument, $ARG2 is the second argument, and so forth. These symbols are defined in CALL_ENTRY and JSB_ENTRY directives, but not in EXCEPTION_ENTRY directives.
There may be additional arguments in your code for which the compiler did not generate a $ARGn symbol. The number of $ARGn symbols defined for a .CALL_ENTRY routine is the maximum number detected by the compiler (either by automatic detection or as specified by MAX_ARGS) or 16, whichever is less. For a .JSB_ENTRY routine, since the arguments are homed in the caller's stack frame and the compiler cannot detect the actual number, it always creates eight $ARGn symbols.
In most cases, you can easily find any additional arguments, but in some cases you cannot.
You can easily find additional arguments if:
For example, you can examine arguments beyond the eighth argument in a JSB routine (where the argument list must be homed in the caller), as follows:
DBG> EX $ARG8 ; highest defined $ARGn . . . DBG> EX .+4 ; next arg is in next longword . . . DBG> EX .+4 ; and so on
This example assumes that the caller detected at least ten arguments when homing the argument list.
To find arguments beyond the last $ARGn symbol in a routine that did not home the arguments, proceed exactly as in the previous example except substitute EX .+8 for EX .+4.
You cannot easily find additional arguments if:
The only way to find the additional arguments in these cases is to examine the compiled machine code to determine where the arguments reside. Both of these problems are eliminated if MAX_ARGS is specified correctly for the maximum argument that you want to examine.
The following list provides important information about debugging compiled MACRO--32 code with floating-point data on an Alpha system:
EXAMINE/G_FLOAT R4
MOVG DATA, R6
DBG> EX R6 .MAIN.\%LINE 100\%R6: 0FFFFFFFF D8E640D1 DBG> EX R7 .MAIN.\%LINE 100\%R7: 00000000 2F1B24DD DBG> DEP R0 = 2F1B24DDD8E640D1 DBG> EX/G_FLOAT R0 .MAIN.\%LINE 100\%R0: 4568.89900000000
The following list provides important information about debugging compiled MACRO--32 code with packed decimal data on an Alpha system:
Language MACRO--64 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--64 programmer to use expressions at debug-time as freely as in other languages, the debugger accepts a number of operators in MACRO--64 language expressions that are not found in MACRO--64 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 |
Symbol | Construct |
---|---|
<p,s,e> | Bit field selection as in BLISS |
MACRO--64 binds a data type to a label name according to the data directive that follows the label definition. For example, in the following code fragment, the .LONG data directive directs MACRO--64 to bind the longword integer data type to labels V1, V2, and V3:
.PSECT A, NOEXE .BYTE 5 V1: V2: V3: .LONG 7
To confirm the type bound to V1, V2, and V3, issue a SHOW SYMBOL/TYPE command with a V* parameter. The following display results:
data .MAIN.\V1 atomic type, longword integer, size: 4 bytes data .MAIN.\V2 atomic type, longword integer, size: 4 bytes data .MAIN.\V3 atomic type, longword integer, size: 4 bytes)
Supported MACRO--64 directives follow:
MACRO--64 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) |
.S_FLOATING (Alpha specific) | S_Floating (S) |
.T_FLOATING (Alpha specific) | T_Floating (T) |
(Not applicable) | Packed decimal (P) |
Supported Pascal operators in language expressions follow:
Kind | Symbol | Function |
---|---|---|
Prefix | + | Unary plus |
Prefix | -- | Unary minus (negation) |
Infix | + | Addition, concatenation |
Infix | -- | Subtraction |
Infix | * | Multiplication |
Infix | / | Real division |
Infix | DIV | Integer division |
Infix | MOD | Modulus |
Infix | REM | Remainder |
Infix | ** | Exponentiation (VAX specific) |
Infix | IN | Set membership |
Infix | = | Equal to |
Infix | <> | Not equal to |
Infix | > | Greater than |
Infix | >= | Greater than or equal to |
Infix | < | Less than |
Infix | <= | Less than or equal to |
Prefix | NOT | Logical NOT |
Infix | AND | Logical AND |
Infix | OR | Logical OR |
The typecast operator (::) is not supported in language expressions.
Symbol | Construct |
---|---|
[ ] | Subscripting |
. (period) | Record component selection |
^ (circumflex) | Pointer dereferencing |
Supported Pascal predefined symbols follow:
Symbol | Meaning |
---|---|
TRUE | Boolean True |
FALSE | Boolean False |
NIL | Nil pointer |
Supported Pascal built-in functions follow:
Symbol | Meaning |
---|---|
SUCC | Logical successor |
PRED | Logical predecessor |
Supported Pascal data types follow:
Pascal Data Type | Operating System Data Type Name |
---|---|
INTEGER | Longword Integer (L) |
INTEGER | Word Integer (W,WU) |
INTEGER | Byte Integer (B,BU) |
UNSIGNED | Longword Unsigned (LU) |
UNSIGNED | Word Unsigned (WU) |
UNSIGNED | Byte Unsigned (BU) |
SINGLE, REAL | F_Floating (F) |
REAL (Alpha specific) | IEEE S_Floating (FS) |
DOUBLE | D_Floating (D) |
DOUBLE | G_Floating (G) |
DOUBLE (Alpha specific) | IEEE T_Floating (FT) |
QUADRUPLE (VAX specific) | H_Floating (H) |
BOOLEAN | (None) |
CHAR | ASCII Text (T) |
VARYING OF CHAR | Varying Text (VT) |
SET | (None) |
FILE | (None) |
Enumerations | (None) |
Subranges | (None) |
Typed Pointers | (None) |
Arrays | (None) |
Records | (None) |
Variant records | (None) |
The debugger accepts Pascal set constants such as [1,2,5,8..10] or [RED, BLUE] in Pascal language expressions.
Floating-point numbers of type REAL may be represented by F_Floating or IEEE S_Floating, depending on compiler switches or source code attributes.
Floating-point numbers of type DOUBLE may be represented by D_Floating, G_Floating, or IEEE T_Floating, depending on compiler switches or source code attributes.
In general, you can examine, evaluate, and deposit into variables, record fields, and array components. An exception to this occurs under the following circumstances: if a variable is not referenced in a program, the Pascal compiler might not allocate the variable. If the variable is not allocated and you try to examine it or deposit into it, you will receive an error message.
When you deposit data into a variable, the debugger truncates the high-order bits if the value being deposited is larger than the variable; the debugger fills the high-order bits with zeros if the value being deposited is smaller than the variable. If the deposit violates the rules of assignment compatibility, the debugger displays an informational message.
You can examine and deposit into automatic variables (within any active block); however, because automatic variables are allocated in stack storage and are contained in registers, their values are considered undefined until the variables are initialized or assigned a value.
You can examine a VARYING OF CHAR string, but you cannot examine the .LENGTH or .BODY fields using the normal language syntax. For example, if VARS is the name of a string variable, the following commands are not supported:
DBG> EXAMINE VARS.LENGTH DBG> EXAMINE VARS.BODY
To examine these fields, use the techniques illustrated in the following examples.
Use | Instead of |
---|---|
EXAMINE/WORD VARS | EXAMINE VARS.LENGTH |
EXAMINE/ASCII VARS+2 | EXAMINE VARS.BODY |
The following subtopics describe debugger support for PL/I.
Supported PL/I 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 |
Infix | || | Concatenation |
Infix | = | Equal to |
Infix | ^= | Not equal to |
Infix | > | Greater than |
Infix | >= | Greater than or equal to |
Infix | ^< | Greater than or equal to |
Infix | < | Less than |
Infix | <= | Less than or equal to |
Infix | ^> | Less than or equal to |
Prefix | ^ | Bit-wise NOT |
Infix | & | Bit-wise AND |
Infix | | | Bit-wise OR |
Symbol | Construct |
---|---|
( ) | Subscripting |
. (period) | Structure component selection |
-> | Pointer dereferencing |
Supported PL/I data types follow:
PL/I Data Type | Operating System Data Type Name |
---|---|
FIXED BINARY | Byte- (B), Word- (W), or Longword- (L) Integer |
FIXED DECIMAL | Packed Decimal (P) |
FLOAT BIN/DEC | F_Floating (F) |
FLOAT BIN/ DEC | D_Floating (D) |
FLOAT BIN/DEC | G_Floating (G) |
FLOAT BIN/DEC (VAX specific) | H_Floating (H) |
BIT | Bit (V) |
BIT | Bit Unaligned (VU) |
CHARACTER | ASCII Text (T) |
CHARACTER VARYING | Varying Text (VT) |
FILE | (None) |
Labels | (None) |
Pointers | (None) |
Arrays | (None) |
Structures | (None) |
Variables of the following storage classes are allocated statically:
Variables of the following storage classes are allocated nonstatically (on the stack or in registers):
The following subtopics give examples of the EXAMINE command with PL/I data types. They also highlight aspects of debugger support that are specific to PL/I.
The following examples show use of the EXAMINE command with a few selected PL/I data types.
DBG> EXAMINE X PROG4\X: 540.02700
DBG> EXAMINE PART MAIN_PROG\INVENTORY_PROG\PART ITEM: "WF-1247" PRICE: 49.95 IN_STOCK: 24
DBG> EXAMINE Q MAIN\Q: "666.3330"
DBG> EXAMINE/HEXADECIMAL P PROG4\SAMPLE.P: 0000B2A4
DBG> EXAMINE X PROG\X: "A"
ALLOCATE X SET (PTR);
DBG> EXAMINE PTR->X PROG6\PTR->X: "A"
Note the following points about debugger support for PL/I.
4538P056.HTM OSSG Documentation 22-NOV-1996 13:03:00.13
Copyright © Digital Equipment Corporation 1996. All Rights Reserved.