hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP OpenVMS System Analysis Tools Manual

HP OpenVMS System Analysis Tools Manual


Previous Contents Index

This example shows the contents of the CPU database vector, then dumps the first 32 bytes of each CPU database entry. Only the first five entries in the array are requested, and those containing zero are ignored.


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|/FPSR|/IFS
|/ISR|/PFS|/PS|/PSR
|/PTE
|/[NO]SYMBOLS |/TIME}] expression


Parameter

expression

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

Qualifiers

/CONDITION_VALUE

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

/FPSR

(I64 only.) Evaluates the specified expression in the format of a floating-point status register.

/IFS

(I64 only.) Evaluates the specified expression in the format of an interruption function state.

/ISR

(I64 only.) Evaluates the specified expression in the format of an interruption status register.

/PFS

(I64 only.) Evaluates the specified expression in the format of a previous function state.

/PS

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

/PSR

(I64 only.) Evaluates the specified expression in the format of a processor status register.

/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.1.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/PFS 00000000.000013AF
         PPL    PEC    RRB.PR   RRB.FR   RRB.GR     SOR       SOL           SOF
         0       0.       0.       0.       0.       0.    39. (32-70)   47. (32-78) 
 
      

This example shows the output of an EVALUATE/PFS command on an I64 system.

#7

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

In this EVALUATE/PS command on an Alpha system, SDA interprets the entered value 0B03 as though it were a processor status (PS) and displays the resulting field values.

#8

SDA> EVALUATE/PSR 00001410.0A026010
        RT  TB  LP  DB  SI  DI  PP  SP  DFH DFL DT  PK  I   IC  MFH MFL AC  BE  
        1   0   1   0   0   0   0   0   0   0   1   0   1   1   0   1   0   0   
        IA  BN  ED  RI  SS  DD  DA  ID  IT  MC  IS  CPL
        0   1   0   2   0   0   0   0   1   0   0   0
 
      

This example shows the output of an EVALUATE/PSR command on an I64 system.

#9

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. For more information on interpreting information in this output, see Section 2.8.

#10

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 of a 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.1 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 (Alpha) or 16 (I64). 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.

/FD

See the description of /PD.

/FPSR

(I64 only.) Examines the specified expression in the format of a floating-point status register.

/IFS

(I64 only.) Examines the specified expression in the format of an interruption function state.

/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. For I64 only, SDA always displays entire bundles of instructions, not individual slots.

/ISR

(I64 only.) Examines the specified expression in the format of an interruption status register.

/NOFD

See the description of /NOPD.

/NOPD

Can be used with the /INSTRUCTION qualifier to override treating symbols as function or procedure descriptors. You can place the qualifier immediately after the /INSTRUCTION qualifier, or following a symbol name. /NOFD and /NOPD are completely interchangeable. SDA interprets them based on the architecture of the system or dump being analyzed.

For more details on using the /NOFD and /NOPD qualifiers, 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 function descriptor (FD) or procedure descriptor (PD). /FD or /PD can also be used to qualify symbols. /FD and /PD are completely interchangeable. SDA interprets them based on the architecture of the system or dump being analyzed. For clarity, the remainder of this description refers only to /PD and /NOPD.

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 overrides how the symbol is treated. /PD forces it to be a procedure descriptor, and /NOPD forces it to not be a procedure descriptor.

Only the /PD qualifier can be placed right after the /INSTRUCTION qualifier. SDA treats the calculated value as a function or procedure descriptor as appropriate.

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 

/PFS

(I64 only.) Examines the specified expression in the format of a previous function state.

/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.

/PSR

(I64 only.) Examines the specified expression in the format of a processor status register.

/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:

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 (Alpha) or octaword aligned (I64).

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/PFS 7FF43C10
        PPL    PEC    RRB.PR   RRB.FR   RRB.GR     SOR       SOL           SOF 
        0       0.       0.       0.       0.       0.    23. (32-54)   31. (32-62)  
 
 
      

This example shows the display produced by the EXAMINE/PFS command. Headings refer to previous privilege level (PPL), previous epilog count (PEC), Register Rename Base (RRB) for Predicate (PR), Floating (FR), and General (GR) Registers, Size of Rotating (SOR) or Local (SOL) portion of the stack frame or Size of the Stack Frame (SOF). For more information, see the Intel IA-64 Architecture Software Developer's Manual.

#2

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.

#3

SDA> EXAMINE/PSR 7FF43C78
        RT  TB  LP  DB  SI  DI  PP  SP  DFH DFL DT  PK  I   IC  MFH MFL AC  BE 
        1   0   1   0   0   0   0   0   1   0   1   0   1   1   0   1   0   0   
        IA  BN  ED  RI  SS  DD  DA  ID  IT  MC  IS  CPL
        0   1   0   1   0   0   0   0   1   0   0   0
 
      

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

#4

SDA> EXAMINE/PTE @^QMMG$GQ_L1_BASE
      


 3 3 2  2              2   1   1 1 
 1 0 9  7              0   8   6 5               7 6           0 
+-+-+--+--------------+-+-+---+-+---------------+-+-----------+-+ 
|0|1|00|     0000     |0|X| 00|0|      11       |X|    04     |0| 
+-+-+--+--------------+-+-+---+-+---------------+-+-----------+-+ 
|                            00000C37                           | 
+---------------------------------------------------------------+ 
Valid PTE: Read Prot = K---, Write Prot = K--- 
           Owner = K, Fault on = -E--, ASM = 00, Granularity Hint = 00 
           CPY = 00  PFN = 00000C37 

The EXAMINE/PTE command displays and formats the level 1 page table entry at FFFFFEFD.BF6FC000. For more information on interpreting this display, see Section 2.8.

#5

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.

#6

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

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


Previous Next Contents Index