HP OpenVMS Systems Documentation
OpenVMS Alpha System Analysis Tools Manual
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.
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:
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:
After SDA has executed the commands in the initialization file, it displays its prompt as follows:
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
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.
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:
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:
2.5 SDA Context
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
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.
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
2.6 SDA Command Format
The following sections describe the format of SDA commands and the
expressions you can use with SDA commands.
SDA uses a command format similar to that used by the DCL interpreter. Issue commands in the following format:
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.
Numerals are one possible component of an expression. The following
sections describe the use of the other components.
The default radix is hexadecimal. SDA displays hexadecimal numbers with
leading zeros and decimal numbers with leading spaces.
There are two types of arithmetic and logical operators, both of which are listed in Table 2-3.
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.
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.
188.8.131.52 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.
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:
For example, enter the following command:
SDA displays the following information:
Now enter the EXAMINE command but do not specify the /INSTRUCTION qualifier, as follows:
SDA displays the following information:
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.
SDA can get its information from the following places:
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.
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.