HP OpenVMS Systems Documentation

Content starts here

OpenVMS Alpha System Analysis Tools Manual


Previous Contents Index

2.3.4 Building the SDA Symbol Table

After locating and reading the system dump file, SDA attempts to read the system symbol table file into the SDA symbol table. If SDA cannot find SDA$READ_DIR:SYS$BASE_IMAGE.EXE---or is given a file that is not a system symbol table in the /SYMBOL qualifier to the ANALYZE command---it displays a fatal error and exits. SDA also reads into its symbol table a subset of SDA$READ_DIR:SYSDEF.STB, called SDA$READ_DIR:REQSYSDEF.STB. This subset provides SDA with the information needed to access some of the data structures in the dump.

When SDA finishes building its symbol table, SDA displays a message identifying itself and the immediate cause of the system failure. In the following example, the cause of the system failure was the deallocation of a bad page file address.


OpenVMS Alpha System Dump Analyzer

Dump taken on 27-MAR-1993  11:22:33.92
BADPAGFILD, Bad page file address deallocated

2.3.5 Executing the SDA Initialization File (SDA$INIT)

After displaying the system failure summary, SDA executes the commands in the SDA initialization file, if you have established one. SDA refers to its initialization file by using the logical name SDA$INIT. If SDA cannot find the file defined as SDA$INIT, it searches for the file SYS$LOGIN:SDA.INIT.

This initialization file can contain SDA commands that read symbols into SDA's symbol table, define keys, establish a log of SDA commands and output, or perform other tasks. For instance, you may want to use an SDA initialization file to augment SDA's symbol table with definitions helpful in locating system code. If you issue the following command, SDA includes those symbols that define many of the system's data structures, including those in the I/O database:


READ SDA$READ_DIR:filename

You may also find it helpful to define those symbols that identify the modules in the images that make up the executive by issuing the following command:


READ/EXECUTIVE SDA$READ_DIR:

After SDA has executed the commands in the initialization file, it displays its prompt as follows:


SDA>

This prompt indicates that you can use SDA interactively and enter SDA commands.

An SDA initialization file may invoke a command procedure with the @ command. However, such command procedures cannot invoke other command procedures.

2.4 Analyzing a Running System

Occasionally, OpenVMS Alpha encounters an internal problem that hinders system performance without causing a system failure. By allowing you to examine the running system, SDA enables you to search for the solution without disturbing the operating system. For example, you may be able to use SDA to examine the stack and memory of a process that is stalled in a scheduler state, such as a miscellaneous wait (MWAIT) or a suspended (SUSP) state.

If your process has change-mode-to-kernel (CMKRNL) privilege, you can invoke SDA to examine the system. Use the following DCL command:


$ ANALYZE/SYSTEM

SDA attempts to load SDA$READ_DIR:SYS$BASE_IMAGE.EXE and SDA$READ_DIR:REQSYSDEF.STB. It then executes the contents of any existing SDA initialization file, as it does when invoked to analyze a crash dump (see Sections 2.3.4 and 2.3.5, respectively). SDA subsequently displays its identification message and prompt, as follows:


OpenVMS Alpha System Analyzer

SDA>

This prompt indicates that you can use SDA interactively and enter SDA commands. When analyzing a running system, SDA sets its process context to that of the process running SDA.

If you are analyzing a running system, consider the following:

  • When used in this mode, SDA does not map the entire system, but instead retrieves only the information it needs to process each individual command. To update any given display, you must reissue the previous command.

    Caution:

    When using SDA to analyze a running system, carefully interpret its displays. Because system states change frequently, it is possible that the information SDA displays may be inconsistent with the current state of the system.
  • Certain SDA commands are illegal in this mode, such as SHOW CPU and SET CPU. Use of these commands results in the following error message:


    %SDA-E-CMDNOTVLD, command not valid on the running system
    
  • The SHOW CRASH command, although valid, does not display the contents of any of the processor's set of hardware registers.

2.5 SDA Context

When you invoke SDA to analyze either a crash dump or a running system, SDA establishes a default context for itself from which it interprets certain commands.

When you are analyzing a uniprocessor system, SDA's context is solely process context, which means SDA can interpret its process-specific commands in the context of either the process current on the uniprocessor or some other process in another scheduling state. When SDA is initially invoked to analyze a crash dump, SDA's process context defaults to that of the process that was current at the time of the system failure. When you invoke SDA to analyze a running system, SDA's process context defaults to that of the current process, that is, the one executing SDA. To change SDA's process context, issue any of the following commands:

SET PROCESS process-name
SET PROCESS/ADDRESS=pcb-address
SET PROCESS/INDEX=nn
SET PROCESS/SYSTEM
SHOW PROCESS process-name
SHOW PROCESS/ADDRESS=pcb-address
SHOW PROCESS/INDEX=nn
SHOW PROCESS/SYSTEM

When you invoke SDA to analyze a crash dump from a multiprocessing system with more than one active CPU, SDA maintains a second dimension of context---its CPU context---that allows it to display certain processor-specific information. This information includes the reason for the bugcheck exception, the currently executing process, the current IPL, and the spin locks owned by the processor. When you invoke SDA to analyze a multiprocessor's crash dump, its CPU context defaults to that of the processor that induced the system failure. When you are analyzing a running system, CPU context is not accessible to SDA. Therefore, the SET CPU and SHOW CPU commands are not permitted.

You can change the SDA CPU context by using any of the following commands:

SET CPU cpu-id
SHOW CPU cpu-id
SHOW CRASH
SHOW MACHINE_CHECK cpu-id

Changing CPU context involves an implicit change in process context in either of the following ways:

  • If there is a current process on the CPU made current, SDA process context is changed to that of that CPU's current process.
  • If there is no current process on the CPU made current, SDA process context is undefined and no process-specific information is available until SDA process context is set to that of a specific process.

Changing process context can require a switch of CPU context as well. For instance, if you issue a SET PROCESS command for a process that was current at the time of a system failure on another CPU, SDA will automatically change its CPU context to that of the CPU on which that process was current. The following commands can have this effect if the process-name, pcb-address, or index number (nn) refers to a current process:

SET PROCESS process-name
SET PROCESS/ADDRESS=pcb-address
SET PROCESS/INDEX=nn
SHOW PROCESS process-name
SHOW PROCESS/ADDRESS=pcb-address
SHOW PROCESS/INDEX=nn

2.6 SDA Command Format

The following sections describe the format of SDA commands and the expressions you can use with SDA commands.

2.6.1 General Command Format

SDA uses a command format similar to that used by the DCL interpreter. Issue commands in the following format:


command-name[/qualifier...] [parameter][/qualifier...] [!comment]

The command-name is an SDA command. Each command tells the utility to perform a function. Commands can consist of one or more words, and can be abbreviated to the number of characters that make the command unique. For example, SH stands for SHOW.

The parameter is the target of the command. For example, SHOW PROCESS RUSKIN tells SDA to display the context of the process RUSKIN. The command EXAMINE 80104CD0;40 displays the contents of 40 bytes of memory, beginning with location 80104CD0.

When you supply part of a file specification as a parameter, SDA assumes default values for the omitted portions of the specification. The default device is SYS$DISK, the device specified in your most recent SET DEFAULT command. The default directory is the directory specified in the most recent SET DEFAULT command. See the OpenVMS DCL Dictionary for a description of the DCL command SET DEFAULT.

The qualifier modifies the action of an SDA command. A qualifier is always preceded by a slash (/). Several qualifiers can follow a single parameter or command name, but each must be preceded by a slash. Qualifiers can be abbreviated to the shortest string of characters that uniquely identifies the qualifier.

The comment consists of text that describes the command; this comment is not actually part of the command. Comments are useful for documenting SDA command procedures. When executing a command, SDA ignores the exclamation point and all characters that follow it on the same line.

2.6.2 Expressions

You can use expressions as parameters for some SDA commands, such as SEARCH and EXAMINE. To create expressions, use any of the following elements:

  • Numerals
  • Radix operators
  • Arithmetic and logical operators
  • Precedence operators
  • Symbols

Numerals are one possible component of an expression. The following sections describe the use of the other components.

2.6.2.1 Radix Operators

Radix operators determine which numeric base SDA uses to evaluate expressions. You can use one of the three radix operators to specify the radix of the numeric expression that follows the operator:

  • ^X (hexadecimal)
  • ^O (octal)
  • ^D (decimal)

The default radix is hexadecimal. SDA displays hexadecimal numbers with leading zeros and decimal numbers with leading spaces.

2.6.2.2 Arithmetic and Logical Operators

There are two types of arithmetic and logical operators, both of which are listed in Table 2-3.

  • Unary operators affect the value of the expression that follows them.
  • Binary operators combine the operands that precede and follow them.

In evaluating expressions containing binary operators, SDA performs logical AND, OR, and XOR operations, and multiplication, division, and arithmetic shifting before addition and subtraction. Note that the SDA arithmetic operators perform integer arithmetic on 64-bit operands.

Table 2-3 SDA Operators
Operator Action
Unary Operators
# Performs a logical NOT of the expression
+ Makes the value of the expression positive
-- Makes the value of the expression negative
@ Evaluates the following expression as an address, then uses the contents of that address as value
^Q Specifies that the size of field to be used as an address is a quadword when used with the unary operator @ 1
^L Specifies that the size of field to be used as an address is a longword when used with the unary operator @ 1
^W Specifies that the size of field to be used as an address is a word when used with the unary operator @ 1
^B Specifies that the size of field to be used as an address is a byte when used with the unary operator @ 1
^P Specifies a physical address when used with the unary operator @ 1
^V Specifies a virtual address when used with the unary operator @ 1
G Adds FFFFFFFF 80000000 16 to the value of the expression 2.
H Adds 7FFE0000 16 to the value of the expression 3.
I Fills the leading digits of the following hexadecimal number with hex value of F. For example:
SDA> eval i80000000

Hex = FFFFFFFF.80000000 Decimal = -2147483648 G
SYS$PUBLIC_VECTORS_NPRO
Binary Operators
+ Addition
-- Subtraction
* Multiplication
& Logical AND
| Logical OR
\ Logical XOR
/ Division 4
@ Arithmetic shifting
"." Catenates two 32-bit values into a 64-bit value. For example:
SDA> eval fe.50000

Hex = 000000FE00050000 Decimal = 1090922020864

1The command SET FETCH can be used to change the default FETCH size and/or access method. See the SET FETCH command description in Chapter 4 for more details and examples.
2The unary operator G corresponds to the first virtual address in system space. For example, the expression GD40 can be used to represent the address FFFFFFFF 80000D4016.
3The unary operator H corresponds to a convenient base address in P1 space (7FFE000016). You can therefore refer to an address such as 7FFE2A6416 as H2A64.
4In division, SDA truncates the quotient to an integer, if necessary, and does not retain a remainder.

2.6.2.3 Precedence Operators

SDA uses parentheses as precedence operators. Expressions enclosed in parentheses are evaluated first. SDA evaluates nested parenthetical expressions from the innermost to the outermost pairs of parentheses.

2.6.2.4 Symbols

A symbol can represent a few different types of values. It can represent a constant, a data address, a procedure descriptor address, or a routine address. Constants are usually offsets of a particular field in a data structure; however, they can also represent constant values such as the BUG$_xxx symbols.

All address symbols identify memory locations. SDA generally does not distinguish among different types of address symbols. However, for a symbol identified as the name of a procedure descriptor, SDA takes an additional step of creating an associated symbol to name the code entry point address of the procedure. It forms the code entry point symbol name by appending _C to the name of the procedure descriptor.

Also, SDA substitutes the code entry point symbol name for the procedure descriptor symbol when you enter the following command:


SDA> EXAMINE/INSTRUCTION procedure descriptor

For example, enter the following command:


SDA> EXAMINE/INSTRUCTION SCH$QAST

SDA displays the following information:


SCH$QAST_C:     SUBQ    SP,#X40,SP

Now enter the EXAMINE command but do not specify the /INSTRUCTION qualifier, as follows:


SDA> EXAMINE SCH$QAST

SDA displays the following information:


SCH$QAST:  0000002C.00003009   ".0..,..."

This display shows the contents of the first two longwords of the procedure descriptor.

Note that there are no routine address symbols on Alpha systems, except for those in MACRO-64 assembly language modules. Therefore, SDA creates a routine address symbol for every procedure descriptor it has in its symbol table. The new symbol name is the same as for the procedure descriptor except that it has an _C appended to the end of the name.

Sources for SDA Symbols

SDA can get its information from the following places:

  • Images (.EXE files)
  • Image symbol table files (.STB files)
  • Object files

SDA also defines symbols to access registers and to access common data structures.

The only images with symbols are shareable images and executive images. These images contain only universal symbols, such as constants and addresses.

The image symbol table files are produced by the linker with the /SYMBOLS qualifier. These files normally only contain universal symbols, as do the executable images. However, if the SYMBOL_TABLE=GLOBALS linker option is specified, the .STB file also contains all global symbols defined in the image. See the OpenVMS Linker Utility Manual for more information.

Object files can contain global constant values. An object file used with SDA typically contains symbol definitions for data structure fields. Such an object file can be generated by compiling a MACRO-32 source module that invokes specific macros. The macros, which are typically defined in SYS$LIBRARY:LIB.MLB or STARLET.MLB, define symbols that correspond to data structure field offsets. The macro $UCBDEF, for example, defines offsets for fields within a unit control block (UCB). OpenVMS Alpha provides a number of such object modules in SDA$READ_DIR, as listed in Table 2-4. For compatibility with OpenVMS VAX, the modules' file types have been renamed to .STB.

Table 2-4 Modules Containing Global Symbols and Data Structures Used by SDA
File Contents
DCLDEF.STB Symbols for the DCL interpreter
DECDTMDEF.STB Symbols for transaction processing
GLXDEF.STB Symbols for OpenVMS Galaxy data structures
IMGDEF.STB Symbols for the image activator
IODEF.STB I/O database structure symbols
NETDEF.STB Symbols for DECnet data structures
REQSYSDEF.STB Required symbols for SDA
RMSDEF.STB Symbols that define RMS internal and user data structures and RMS$_ xxx completion codes
SCSDEF.STB Symbols that define data structures for system communications services
SYSDEF.STB Symbols that define system data structures, including the I/O database
TCPIP$NET_GLOBALS.STB 1 Data structure definitions for TCP/IP internet driver, execlet, and ACP data structures
TCPIP$NFS_GLOBALS.STB 1 Data structure definitions for TCP/IP NFS server
TCPIP$PROXY_GLOBALS.STB 1 Data structure definitions for TCP/IP proxy execlet
TCPIP$PWIP_GLOBALS.STB 1 Data structure definitions for TCP/IP PWIP driver, and ACP data structures
TCPIP$TN_GLOBALS.STB 1 Data structure definitions for TCP/IP TELNET/RLOGIN server driver data structures

1Only available if TCP/IP has been installed. These are found in SYS$SYSTEM, so that all files are not automatically read in when you issue a READ/EXEC command.

Table 2-5 lists symbols that SDA defines automatically on initialization.

Table 2-5 SDA Symbols Defined on Initialization
ASN Address space number
AST Both the asynchronous system trap status and enable registers: AST<3:0> = AST enable; AST<7:4> = AST status
ESP Executive stack pointer
FEN Floating-point enable
FP Frame pointer (R29)
FP0 through FP30 Floating-point registers 0-30
FPCR Floating-point control register
G FFFFFFFF.80000000 16, the base address of system space
H 00000000.7FFE0000 16, a base address in P1 space
I FFFFFFFF.FFFFFFFF 16, also fills the leading digits of a hexadecimal number with the value of F
KSP Kernel stack pointer
PC Program counter
PCC Process cycle counter
PS Processor status
PTBR Page table base register
R0 through R29 Integer registers
SCC System cycle counter
SP Current stack pointer of a process
SSP Supervisor stack pointer
USP User stack pointer


Previous Next Contents Index