[an error occurred while processing this directive]

HP OpenVMS Systems Documentation

Content starts here

OpenVMS Alpha System Analysis Tools Manual


Previous Contents Index


EVALUATE

Computes and displays the value of the specified expression in both hexadecimal and decimal. Alternative evaluations of the expression are available with the use of the qualifiers defined for this command.

Format

EVALUATE [{/CONDITION_VALUE|/PS|/PTE
|/[NO]SYMBOLS |/TIME}] expression


Parameter

expression

SDA expression to be evaluated. Section 2.6.2 describes the components of SDA expressions.

Qualifiers

/CONDITION_VALUE

Displays the message that the $GETMSG system service obtains for the value of the expression.

/PS

Evaluates the specified expression in the format of a processor status.

/PTE

Interprets and displays the expression as a page table entry (PTE). The individual fields of the PTE are separated and an overall description of the PTE's type is provided.

/SYMBOLS
/NOSYMBOLS

Specifies that all symbols known to be equal to the evaluated expression are to be listed in alphabetical order. The default behavior of the EVALUATE command displays only the first five symbols. If /NOSYMBOLS is specified, only the hexadecimal and decimal values are displayed.

/TIME

Interprets and displays the expression as a 64-bit time value. Positive values are interpreted as absolute time; negative values are interpreted as delta time.

Description

If you do not specify a qualifier, the EVALUATE command interprets and displays the expression as hexadecimal and decimal values. In addition, if the expression is equal to the value of a symbol in the SDA symbol table, that symbol is displayed. If no symbol with this value is known, the next lower valued symbol is displayed with an appropriate offset unless the offset is extremely large. (See Section 2.6.2.4 for a description of how SDA displays symbols and offsets.) The DEFINE command adds symbols to the SDA symbol table but does not display the results of the computation. EVALUATE displays the result of the computation but does not add symbols to the SDA symbol table.


Examples

#1

SDA>  EVALUATE -1
Hex = FFFFFFFF.FFFFFFFF   Decimal = -1           I
      

The EVALUATE command evaluates a numeric expression, displays the value of that expression in hexadecimal and decimal notation, and displays a symbol that has been defined to have an equivalent value.

#2

SDA>  EVALUATE 1
Hex = 00000000.00000001   Decimal = 1  CHF$M_CALEXT_CANCEL
                                              CHF$M_FPREGS_VALID
                                              CHF$V_CALEXT_LAST
                                              IRP$M_BUFIO
                                              IRP$M_CLN_READY
                                                |
                           (remaining symbols suppressed by default)
      

The EVALUATE command evaluates a numeric expression and displays the value of that expression in hexadecimal and decimal notation. This example also shows the symbols that have the displayed value. A maximum of five symbols are displayed by default.

#3

SDA>  DEFINE TEN = A
SDA>  EVALUATE TEN
Hex = 00000000.0000000A   Decimal = 10  IRP$B_TYPE
                                             IRP$S_FMOD
                                             IRP$V_MBXIO
                                             TEN
                                             UCB$B_TYPE
                                             |
                           (remaining symbols suppressed by default)
      

This example shows the definition of a symbol named TEN. The EVALUATE command then shows the value of the symbol.

Note that A, the value assigned to the symbol by the DEFINE command, could be a symbol. When SDA evaluates a string that can be either a symbol or a hexadecimal numeral, it first searches its symbol table for a definition of the symbol. If SDA finds no definition for the string, it evaluates the string as a hexadecimal number.

#4

SDA>  EVALUATE (((TEN * 6) + (-1/4)) + 6)
Hex = 00000000.00000042      Decimal = 66
      

This example shows how SDA evaluates an expression of several terms, including symbols and rational fractions. SDA evaluates the symbol, substitutes its value in the expression, and then evaluates the expression. The fraction -1/4 is truncated to 0.

#5

SDA>  EVALUATE/CONDITION 80000018
%SYSTEM-W-EXQUOTA, exceeded quota
      

This example shows the output of an EVALUATE/CONDITION command.

#6

SDA>  EVALUATE/PS  0B03
         MBZ SPAL      MBZ    IPL VMM MBZ CURMOD INT PRVMOD
         0   00   00000000000 0B  0   0   KERN   0   USER

      

SDA interprets the entered value 0B03 as though it were a processor status (PS) and displays the resulting field values.

#7

SDA>  EVALUATE/PTE 0BCDFFEE








3 3 2  2              2   1   1 1
1 0 9  7              0   8   6 5               7 6           0
+-+-+--+--------------+-+-+---+-+---------------+-+-----------+-+
|0|0|00|     005E     |0|X| 02|1|      FF       |X|    37     |0|
+-+-+--+--------------+-+-+---+-+---------------+-+-----------+-+
|                            00000000                           |
+---------------------------------------------------------------+
Global PTE:  Owner = S, Read Prot = KESU, Write Prot = KESU, CPY = 0
                     GPT Index  = 00000000

The EVALUATE/PTE command displays the expression 0BCDFFEE as a page table entry (PTE) and labels the fields. It also describes the status of the page.

#8

SDA> EVALUATE/TIME 009A9A4C.843DBA9F
10-OCT-1996 15:59:44.02
      

This example shows the use of the EVALUATE/TIME command.


EXAMINE

Displays either the contents of a location or range of locations in physical memory, or the contents of a register. Use location parameters to display specific locations or use qualifiers to display the entire process and system regions of memory.

Format

EXAMINE [/qualifier[,...]] [location]


Parameter

location

Location in memory to be examined. A location can be represented by any valid SDA expression. (See Section 2.6.2 for additional information about expressions.) To examine a range of locations, use the following syntax:
m:n Range of locations to be examined, from m to n
m;n Range of locations to be examined, starting at m and continuing for n bytes

The default location that SDA uses is initially 0 in the program region (P0) of the process that was executing at the time the system failed (if you are examining a crash dump) or your process (if you are examining the running system). Subsequent uses of the EXAMINE command with no parameter specified increase the last address examined by eight. Use of the /INSTRUCTION qualifier increases the default address by four. To examine memory locations of other processes, you must use the SET PROCESS command.


Qualifiers

/ALL

Examines all the locations in the program, and control regions and system space, displaying the contents of memory in hexadecimal longwords and ASCII characters. Do not specify parameters when you use this qualifier.

/CONDITION_VALUE

Examines the specified longword, displaying the message that the $GETMSG system service obtains for the value in the longword.

/INSTRUCTION

Translates the specified range of memory locations into assembly instruction format. Each symbol in the EXAMINE expression that is defined as a procedure descriptor is replaced with the code entry point address of that procedure, unless you also specify the /NOPD qualifier.

/NOPD

Can be used with the /INSTRUCTION qualifier to override treating symbols as procedure descriptors. You can place the qualifier immediately after the /INSTRUCTION qualifier, or following a symbol name.

For more details on using the /NOPD qualifier, see the description for the /PD qualifier.

/NOSUPPRESS

Inhibits the suppression of zeros when displaying memory with one of the following qualifiers: /ALL, /P0, /P1, /SYSTEM, or when a range is specified.

/P0

Displays the entire program region for the default process. Do not specify parameters when you use this qualifier.

/P1

Displays the entire control region for the default process. Do not specify parameters when you use this qualifier.

/PD

Causes the EXAMINE command to treat the location specified in the EXAMINE command as a procedure descriptor (PD). PD can also be used to qualify symbols.

You can use the /PD and /NOPD qualifiers with the /INSTRUCTION qualifier to override treating symbols as procedure descriptors. Placing the qualifier right after a symbol will override how the symbol is treated. /PD will force it to be a procedure descriptor, and /NOPD will force it to not be a procedure descriptor.

Only the /PD qualifier can be placed right after the /INSTRUCTION qualifier. It treats the calculated value as a procedure descriptor.

In the following examples, TEST_ROUTINE is a PD symbol. Its value is 500 and the code address in this procedure descriptor is 1000. The first example displays intructions starting at 520.


EXAMINE/INSTRUCTION TEST_ROUTINE/NOPD+20

The next example fetches code address from TEST_ROUTINE PD, adds 20 and displays instructions at that address. In other words, it displays code starting at location 1020.


EXAMINE/INSTRUCTION TEST_ROUTINE+20

The final example treates the address TEST_ROUTINE+20 as a procedure descriptor, so it fetches the code address out of a procedure descriptor at address 520. It then uses that address to display instructions.


EXAMINE/INSTRUCTION/PD TEST_ROUTINE/NOPD+20

/PHYSICAL

Examines physical addresses. You cannot use the /PHYSICAL qualifier in combination with the /P0, /P1, or /SYSTEM qualifiers.

/PS

Examines the specified quadword, displaying its contents in the format of a processor status. This qualifier must precede any parameters used in the command line.

/PTE

Interprets and displays the specified quadword as a page table entry (PTE). The display separates individual fields of the PTE and provides an overall description of the PTE's type.

/SYSTEM

Displays portions of the writable system region. Do not specify parameters when you use this qualifier.

/TIME

Examines the specified quadword, displaying its contents in the format of a system-date-and-time quadword.

Description

The following sections describe how to use the EXAMINE command.

Examining Locations

When you use the EXAMINE command to look at a location, SDA displays the location in symbolic notation (symbolic name plus offset), if possible, and its contents in hexadecimal and ASCII formats:


SDA> EXAMINE G6605C0
806605C0:  64646464.64646464  "dddddddd"

If the ASCII character that corresponds to the value contained in a byte is not printable, SDA displays a period (.). If the specified location does not exist in memory, SDA displays this message:


%SDA-E-NOTINPHYS, address : virtual data not in physical memory

To examine a range of locations, you can designate starting and ending locations separated by a colon. For example:


SDA> EXAMINE G40:G200
Alternatively, you can specify a location and a length, in bytes, separated by a semicolon. For example:


SDA> EXAMINE G400;16

When used to display the contents of a range of locations, the EXAMINE command displays six or ten columns of information. Ten columns are used if the terminal width is 132 or greater, or if a SET OUTPUT has been entered; six columns are used otherwise. An explanation of the columns is as follows:

  • Each of the first four or eight columns represents a longword of memory, the contents of which are displayed in hexadecimal format.
  • The fifth or ninth column lists the ASCII value of each byte in each longword displayed in the previous four or eight columns.
  • The sixth or tenth column contains the address of the first, or rightmost, longword in each line. This address is also the address of the first, or leftmost, character in the ASCII representation of the longwords. Thus, you read the hexadecimal dump display from right to left, and the ASCII display from left to right.

If a series of virtual addresses does not exist in physical memory, SDA displays a message specifying the range of addresses that were not translated.

If a range of virtual locations contains only zeros, SDA displays this message:


Zeros suppressed from 'loc1' to 'loc2'

Decoding Locations

You can translate the contents of memory locations into instruction format by using the /INSTRUCTION qualifier. This qualifier causes SDA to display the location in symbolic notation (if possible) and its contents in instruction format. The operands of decoded instructions are also displayed in symbolic notation. The location must be longword aligned.

Examining Memory Regions

You can display an entire region of virtual memory by using one or more of the qualifiers /ALL, /SYSTEM, /P0, and /P1 with the EXAMINE command.

Other Uses

Other uses of the EXAMINE command appear in the following examples.

Note

When examining individual locations, addresses are usually symbolized, as described previously. If the SET SYMBOLIZE OFF command is issued, addresses are not symbolized. See the SET SYMBOLIZE command for further details.

Examples

#1

SDA> EXAMINE/PS 7FF95E78
          MBZ SPAL      MBZ    IPL VMM MBZ CURMOD INT PRVMOD
          0   00   00000000000 08  0   0   KERN   0   EXEC
      

This example shows the display produced by the EXAMINE/PS command.

#2

SDA> EXAMINE/PTE @^QMMG$GQ_L1_BASE
      


The EXAMINE/PTE command displays and formats the level 1 page table entry at FFFFFFFF.FF7FC000.

#3

SDA> EXAMINE/CONDITION_VALUE R0
%SYSTEM-F-NOPRIV, insufficient privilege or object protection violation
      

This example shows the text associated with the condition code in R0.

#4

SDA> EXAMINE/TIME EXE$GQ_SYSTIME
12-DEC-2001 08:23:07.80

      

This example displays the current system as an ASCII absolute time.


EXIT

Exits from an SDA display or exits from the SDA utility.

Format

EXIT


Parameters

None.

Qualifiers

None.

Description

If SDA is displaying information on a video display terminal---and if that information extends beyond one screen---SDA enters display mode and displays a screen overflow prompt at the bottom of the screen:


Press RETURN for more.
SDA>

If you want to discontinue the current display at this point, enter the EXIT command. If you want SDA to execute another command, enter that command. SDA discontinues the display as if you entered EXIT, and then executes the command you entered.

When the SDA> prompt is not immediately preceded by the screen overflow prompt, entering EXIT causes your process to cease executing the SDA utility. When issued within a command procedure (either the SDA initialization file or a command procedure invoked with the execute (@) command), EXIT causes SDA to terminate execution of the procedure and return to the SDA prompt.

See Section 2.6.3 for a description of SDA display mode.


FORMAT

Displays a formatted list of the contents of a block of memory.

Format

FORMAT [/TYPE=block-type] location [/PHYSICAL] [/POSITIVE]


Parameter

location

Location of the beginning of the data block. The location can be given as any valid SDA expression.

Qualifiers

/TYPE=block-type

Forces SDA to characterize and format a data block at location as the specified type of data structure. The /TYPE qualifier thus overrides the default behavior of the FORMAT command in determining the type and/or subtype of a data block, as described in the Description section. The block-type can be the symbolic prefix of any data structure defined by the operating system.

/PHYSICAL

Specifies that the location given is a physical address.

/POSITIVE

Symbols that describe negative offsets from the start of the structure are ignored. By default, all symbols for the block type are processed.

Description

The FORMAT command performs the following actions:
  • Characterizes a range of locations as a system data block
  • Assigns, if possible, a symbol to each item of data within the block
  • Displays all the data within the block

Most OpenVMS Alpha control blocks include two bytes that indicate the block type and/or subtype at offsets 0A16 and 0B16, respectively. The type and/or subtype associate the block with a set of symbols that have a common prefix. Each symbol's name describes a field within the block, and the value of the symbol represents the offset of the field within the block.

If the type and/or subtype bytes contain a valid block type/subtype combination, SDA retrieves the symbols associated with that type of block (see $DYNDEF) and uses their values to format the block.

For a given block type, all associated symbols have the folloiwng form:


<block_type>$<field>_<name>

where field is one of the following:


B  Byte
W  Word
L  Longword
Q  Quadword
O  Octaword
A  Address
C  Constant
G  Global Longword
P  Pointer
R  Structure (variable size)
T  Counted ASCII string (up to 31 characters)

If SDA cannot find the symbols associated with the block type specified in the block-type byte or by the /TYPE qualifier, it issues the following message:


%SDA-E-NOSYMBOLS, no <block type> symbols found to format this block

If you receive this message, you may want to read additional symbols into the SDA symbol table and retry the FORMAT command. Many symbols that define OpenVMS Alpha data structures are contained within SDA$READ_DIR:SYSDEF.STB. Thus, you would issue the following command:


SDA> READ SDA$READ_DIR:SYSDEF.STB

If SDA issues the same message again, try reading additional symbols. Table 2-4 lists additional modules provided by the OpenVMS operating system. Alternatively, you can create your own object modules with the MACRO-32 Compiler for OpenVMS Alpha. See the READ command description for instructions on creating such an object module.

Certain OpenVMS Alpha data structures do not contain a block type and/or subtype. If bytes contain information other than a block type/subtype---or do not contain a valid block type/subtype---SDA either formats the block in a totally inappropriate way, based on the contents of offsets 0A16 and 0B16, or displays the following message:


%SDA-E-INVBLKTYP, invalid block type in specified block

To format such a block, you must reissue the FORMAT command, using the /TYPE qualifier to designate a block-type.

The FORMAT command produces a three-column display containing the following information:

  • The first column shows the virtual address of each item within the block.
  • The second column lists each symbolic name associated with a location within the block.
  • The third column shows the contents of each item in hexadecimal format, including symbolization if a suitable symbol exists.


Example


SDA> READ SDA$READ_DIR:SYSDEF.STB
%SDA-I-READSYM, 913 symbols read from SYS$COMMON:[SYS$LDR]SYSDEF.STB
SDA> FORMAT G41F818
FFFFFFFF.8041F818   UCB$L_FQFL                      8041F818        UCB
                    UCB$L_MB_MSGQFL
                    UCB$L_RQFL
                    UCB$W_MB_SEED
                    UCB$W_UNIT_SEED
FFFFFFFF.8041F81C   UCB$L_FQBL                      8041F818        UCB
                    UCB$L_MB_MSGQBL
                    UCB$L_RQBL
FFFFFFFF.8041F820   UCB$W_SIZE                          0110
FFFFFFFF.8041F822   UCB$B_TYPE                        10
FFFFFFFF.8041F823   UCB$B_FLCK                      2C
FFFFFFFF.8041F824   UCB$L_ASTQFL                    00000000
                    UCB$L_FPC
                    UCB$L_MB_W_AST
                    UCB$T_PARTNER
   .
   .
   .
      

The READ command loads the symbols from SDA$READ_DIR:SYSDEF.STB into SDA's symbol table. The FORMAT command displays the data structure that begins at G41F81816, a unit control block (UCB). If a field has more than one symbolic name, all such names are displayed. Thus, the field that starts at 8041F82416 has four designations: UCB$L_ASTQFL, UCB$L_FPC, UCB$L_MB_W_AST, and UCB$T_PARTNER.

The contents of each field appear to the right of the symbolic name of the field. Thus, the contents of UCB$L_FQBL are 8041F81816.


Previous Next Contents Index