Document revision date: 30 March 2001

## OpenVMS Alpha System Analysis Tools Manual

Previous | Contents | Index

The initial SHOW STACK command contains an address that SDA resolves into an offset from the PROCESS_MANAGEMENT executive image. The READ command loads the corresponding symbols into the SDA symbol table such that the reissue of the SHOW STACK command subsequently identifies the same location as an offset within a specific process management routine.

## REPEAT

> Repeats execution of the last command issued. On terminal devices, the KP0 key performs the same function as the REPEAT command with no parameter or qualifier.

### Format

> REPEAT [count|/UNTIL=condition]

### Parameter

> #### count

> The number of times the previous command is to be repeated. The default is a single repeat.

### Qualifier

> #### /UNTIL=condition

> Defines a condition that terminates the REPEAT command. By default, there is no terminating condition.

### Description

> The REPEAT command is useful for stepping through a linked list of data structures, or for examining a sequence of memory locations. When used with ANALYZE/SYSTEM, it allows the changing state of a system location or data structure to be monitored.

Examples

      1. SDA> SPAWN CREATE SDATEMP.COM
                 SEARCH  0:3FFFFFFF   12345678
                 SET PROCESS/NEXT
                 ^Z
          SDA> SET PROCESS NULL
          SDA> @SDATEMP
          SDA> REPEAT/UNTIL = BADPROC

This example demonstrates how the address space of each process in a system or dump can be searched for a given pattern.

      2. SDA> SHOW CALL_FRAME
        Call Frame Information
        ----------------------
                Stack Frame Procedure Descriptor
        Flags:  Base Register = FP, Jacket, Native
                Procedure Entry: FFFFFFFF.80080CE0              MMG$RETRANGE_C+00180
                Return address on stack = FFFFFFFF.8004CF30     EXCEPTION_NPRO+00F30

        Registers saved on stack
        ------------------------
        7FF95E80 FFFFFFFF.FFFFFFFD  Saved R2
        7FF95E88 FFFFFFFF.8042DBC0  Saved R3      EXCEPTION_NPRW+03DC0
        7FF95E90 FFFFFFFF.80537240  Saved R4
        7FF95E98 00000000.00000000  Saved R5
        7FF95EA0 FFFFFFFF.80030960  Saved R6      MMG$IMGRESET_C+00200
        7FF95EA8 00000000.7FF95EC0  Saved R7
        7FF95EB0 FFFFFFFF.80420E68  Saved R13     MMG$ULKGBLWSL E
        7FF95EB8 00000000.7FF95F70  Saved R29
        .
        .
        .
        SDA> SHOW CALL_FRAME/NEXT_FP

        Call Frame Information
        ----------------------
                Stack Frame Procedure Descriptor
        Flags:  Base Register = FP, Jacket, Native
                Procedure Entry: FFFFFFFF.80F018D0              IMAGE_MANAGEMENT_PRO+078D0
                Return address on stack = FFFFFFFF.8004CF30     EXCEPTION_NPRO+00F30

        Registers saved on stack
        ------------------------
        7FF95F90 FFFFFFFF.FFFFFFFB  Saved R2
        7FF95F98 FFFFFFFF.8042DBC0  Saved R3      EXCEPTION_ NPRW+03DC0
        7FF95FA0 00000000.00000000  Saved R5
        7FF95FA8 00000000.7FF95FC0  Saved R7
        7FF95FB0 FFFFFFFF.80EF8D20  Saved R13     ERL$DEVINF O+00C20
        7FF95FB8 00000000.7FFA0450  Saved R29
        .
        .
        .
        SDA> REPEAT
        Call Frame Information
        ----------------------
                Stack Frame Procedure Descriptor
        Flags:  Base Register = FP, Jacket, Native
                Procedure Entry: FFFFFFFF.80F016A0              IMAGE_MANAGEMENT_PRO+076A0
                Return address on stack = 00000000.7FF2451C

                Registers saved on stack
                ------------------------
         7FFA0470 00000000.7FEEA890  Saved R13
         7FFA0478 00000000.7FFA0480  Saved R29
         .
         .
         .

The first SHOW CALL_FRAME displays the call frame indicated by the current FP value. Because the /NEXT_FP qualifier to the instruction displays the call frame indicated by the saved FP in the current call frame, you can use the REPEAT command to repeat the SHOW CALL_FRAME/NEXT_FP command and follow a chain of call frames.

## SEARCH

> Scans a range of memory locations for all occurrences of a specified value.

### Format

> SEARCH [/qualifier] range [=] expression

### Parameters

> #### range

> Location in memory to be searched. A location can be represented by any valid SDA expression. To search a range of locations, use the following syntax:

> m:n | Range of locations to be searched, from m to n
> m;n | Range of locations to be searched, starting at m and continuing for n bytes

> #### expression

> The value for which SDA is to search. SDA evaluates the expression and searches the specified range of memory for the resulting value. For a description of SDA expressions, see Section 2.6.2.

> If you do not use an equals sign to seperate range and expression, then you must insert a space between them.

### Qualifiers

> #### /LENGTH={QUADWORD|LONGWORD|WORD |BYTE }

> Specifies the size of the expression value that the SEARCH command uses for matching. If you do not specify the /LENGTH qualifier, the SEARCH command uses a longword length by default.

> #### /MASK=n

> Allows the SEARCH command finer qranularity in its matches. It compares only the given bits of a byte, word, longword, or quadword. To compare bits when matching, you set the bits in the mask; to ignore bits when matching, you clear the bits in the mask.

> #### /STEPS={QUADWORD|LONGWORD|WORD |BYTE|value }

> Specifies the step factor of the search through the specified memory range. After the SEARCH command has performed the comparison between the value of expression and memory location, it adds the specified step factor to the address of the memory location. The resulting location is the next location to undergo the comparison. If you do not specify the /STEPS qualifier, the SEARCH command uses a step factor of a longword.

> #### /PHYSICAL

> Specifies that the addresses used to define the range of locations to be searched are physical addresses.

### Description

> SEARCH displays each location as each value is found. If you press Ctrl/T while using the SEARCH command, the system displays how far the search has progressed. The progress display is always output to the terminal even if a SET OUTPUT <file> command has previously been entered.

### Examples

#1
    SDA> SEARCH GB81F0;500 B41B0000
    Searching from FFFFFFFF.800B81F0 to FFFFFFFF.800B86EF in LONGWORD steps for B41B0000...
    Match at FFFFFFFF.800B86E4    B41B0000

> This SEARCH command finds the value B41B0000 in the longword at FFFFFFFF.800B86E4.

#2
    SDA> SEARCH 80000000;200/STEPS=BYTE 82
    Searching from FFFFFFFF.80000000 to FFFFFFFF.800001FF in BYTE steps for 00000082...
    Match at FFFFFFFF.8000012C    00000082

> This SEARCH command finds the value 00000082 in the longword at FFFFFFFF.8000012C.

#3
    SDA> SEARCH/LENGTH=WORD 80000000;100 10
    Match at FFFFFFFF.80000030    0010
    Match at FFFFFFFF.80000040    0010
    Match at FFFFFFFF.80000090    0010
    Match at FFFFFFFF.800000A0    0010
    Match at FFFFFFFF.800000C0    0010
    5 matches found

> This SEARCH command finds the value 0010 in the words at FFFFFFFF.80000030, FFFFFFFF.80000040, FFFFFFFF.80000090, FFFFFFFF.800000A0, FFFFFFFF.800000C0.

#4
    SDA> SEARCH/MASK=FF000000 80000000;40 20000000
    Searching from FFFFFFFF.80000000 to FFFFFFFF.8000003F in LONGWORD steps for 20000000...
    (Using search mask of FF000000)
    Match at FFFFFFFF.80000000    201F0104
    Match at FFFFFFFF.80000010    201F0001
    2 matches found

> This SEARCH command finds the value 20 in the upper byte of the longwords at FFFFFFFF.80000000 and FFFFFFFF.80000010, regardless of the contents of the lower three bytes.

## SET CPU

> When analyzing a system dump, selects a processor to become the current CPU for SDA. (This command cannot be used when analyzing the running system.)

### Format

> SET CPU cpu-id

### Parameter

> #### cpu-id

> Numeric value from 0016 to 1F16 indicating the identity of the processor to be made the current CPU. If you specify a value outside this range or a cpu-id of a processor that was not active at the time of the system failure, SDA displays the following message:

>     %SDA-E-CPUNOTVLD, CPU not booted or CPU number out of range

### Qualifiers

> None.

### Description

> When you invoke SDA to examine a system dump, the current CPU context for SDA defaults to that of the processor that caused the system to fail. When analyzing a system failure from a multiprocessing system, you may find it useful to examine the context of another processor in the configuration.

> The SET CPU command changes the current CPU context for SDA to that of the processor indicated by cpu-id. The CPU specified by this command becomes the current CPU for SDA until you either exit from SDA or change the CPU context for SDA by issuing one of the following commands:

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

> The following commands also change the CPU context for SDA 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

> Changing CPU context can cause an implicit change in process context under the following circumstances:

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

> See Chapter 2, Section 2.5 for further discussion of the way in which SDA maintains its context information.

## SET ERASE_SCREEN

> Enables or disables the automatic clearing of the screen before each new page of SDA output.

### Format

> SET ERASE_SCREEN {ON|OFF}

### Parameters

> #### ON

> Enables the screen to be erased before SDA outputs a new heading. This setting is the default.

> #### OFF

> Disables the erasing of the screen.

### Qualifiers

> None.

### Description

> SDA's usual behavior is to erase the screen and then show the data. By setting the OFF parameter, the clear screen action is replaced by a blank line. This action does not affect what is written to a file when the SET LOG or SET OUTPUT commands are used.

### Examples

#1
    SDA>  SET ERASE_SCREEN ON

> The clear screen action is now enabled.

#2
    SDA> SET ERASE_SCREEN OFF

> The clear screen action is disabled.

## SET FETCH

> Sets the default size and access method of address data used when SDA evaluates an expression that includes the @ unary operator.

### Format

> SET FETCH [{QUADWORD|LONGWORD|WORD|BYTE}][,][{PHYSICAL|VIRTUAL}]

### Parameters

> #### QUADWORD

> Sets the default size to 8 bytes.

> #### LONGWORD

> Sets the default size to 4 bytes.

> #### WORD

> Sets the default size to 2 bytes.

> #### BYTE

> Sets the default size to 1 byte.

> #### PHYSICAL

> Sets the default access method to physical addresses.

> #### VIRTUAL

> Sets the default access method to virtual addresses.

> Note that you can specify one and only one parameter out of each group. If you are changing both size and access method, separate the two parameters by spaces and/or a comma. Include a comma only if you are specifying a parameter from both groups. See examples 5 and 6.

### Qualifiers

> None.

### Description

> Sets the default size and/or default access method of address data used by the @ unary operator in commands such as EXAMINE and EVALUATE. SDA uses the current default size unless it is overridden by the ^Q, ^L, ^W, or ^B qualifier on the @ unary operator in an expression. SDA uses the current default access method unless it is overridden by the ^P or ^V qualifier on the @ unary operator in an expression.

### Examples

#1
    SDA>  EXAMINE MMG$GQ_SHARED_VA_PTES
    MMG$GQ_SHARED_VA_PTES:  FFFFFFFD.FF7FE000   ".`a....."

> This shows the location's contents of a 64-bit virtual address.

#2
    SDA> SET FETCH LONG
    SDA> EXAMINE @MMG$GQ_SHARED_VA_PTES
    %SDA-E-NOTINPHYS, FFFFFFFF.FF7FE000 : virtual data not in physical memory

> This shows a failure because the SET FETCH LONG causes SDA to assume that it should take the lower 32 bits of the location's contents as a longword value, sign-extend them, and use that value as an address.

#3
    SDA> EXAMINE @^QMMG$GQ_SHARED_VA_PTES
    FFFFFFFD.FF7FE000:  000001D0.40001119   "...@..."

> This shows the correct results by overriding the SET FETCH LONG with the ^Q qualifier on the @ operator. SDA takes the full 64-bits of the location's contents and uses that value as an address.

#4
    SDA> SET FETCH QUAD
    SDA> EXAMINE @MMG$GQ_SHARED_VA_PTES
    FFFFFFFD.FF7FE000:  000001D0.40001119   "...@..."

> This shows the correct results by changing the default fetch size to a quadword.

#5
    SDA> SET FETCH PHYSICAL
    SDA> EXAMINE /PHYSICAL @0

> This command uses the contents of the physical location 0 as the physical address of the location to be examined.

#6
    SDA> SET FETCH QUADWORD, PHYSICAL

> This command sets the default fetch size and default access method at the same time.

## SET LOG

> Initiates or discontinues the recording of an SDA session in a text file.

### Format

> SET [NO]LOG filespec

### Parameter

> #### filespec

> Name of the file in which you want SDA to log your commands and their output. The default filespec is SYS$DISK:[default_dir]filename.LOG, where SYS$DISK and [default-dir] represent the disk and directory specified in your last DCL command SET DEFAULT. You must specify a file name.

### Qualifiers

> None.

### Description

> The SET LOG command echoes the commands and output of an SDA session to a log file. The SET NOLOG command terminates this behavior.

> The following differences exist between the SET LOG command and the SET OUTPUT command:

> - When logging is in effect, your commands and their results are still displayed on your terminal. The SET OUTPUT command causes the displays to be redirected to the output file and they no longer appear on the screen.
> - If an SDA command requires that you press Return to produce successive screens of display, the log file produced by SET LOG will record only those screens that are actually displayed. SET OUTPUT, however, sends the entire output of any SDA commands to its listing file.
> - The SET LOG command produces a log file with a default file type of .LOG; the SET OUTPUT command produces a listing file whose default file type is .LIS.
> - The SET LOG command does not record output from the HELP command in its log file. The SET OUTPUT command can record HELP output in its listing file.
> - The SET OUTPUT command can generate a table of contents, each item of which refers to a display written to its listing file. SET OUTPUT also produces running heads for each page of output. The SET LOG command does not produce these items in its log file.

> Note that, if you use the SET OUTPUT command to redirect output to a listing file, a SET LOG command to direct the same output to a log file is ineffective until output is restored to the terminal.

## SET OUTPUT

> Redirects output from SDA to the specified file or device.

### Format

> SET OUTPUT [/[NO]INDEX|/[NO]HEADER|/SINGLE_COMMAND] filespec

### Parameter

> #### filespec

> Name of the file to which SDA is to send the output generated by its commands. The default filespec is SYS$DISK:[default_dir]filename.LIS, where SYS$DISK and [default-dir] represent the disk and directory specified in your last DCL command SET DEFAULT. You must specify a file name.

### Qualifiers

> #### /INDEX
> /NOINDEX

> The /INDEX qualifer causes SDA to include an index page at the beginning of the output file. This is the default, unless /NOHEADER is specified; see the /NOHEADER description. The /NOINDEX qualifier causes SDA to omit the index page from the output file.

> #### /HEADER
> /NOHEADER

> The /HEADER qualifier causes SDA to include a heading at the top of each page of the output file. This is the default. The /NOHEADER qualifier causes SDA to omit the page headings. Use of /NOHEADER implies /NOINDEX.

> #### /SINGLE_COMMAND

> Indicates to SDA that the output for a single command is to be written to the specified file and that subsequent output should be written to the terminal.

### Description

> When you use the SET OUTPUT command to send the SDA output to a file or device, SDA continues displaying the SDA commands that you enter but sends the output generated by those commands to the file or device you specify. (See the description of the SET LOG command for a list of differences between the SET LOG and SET OUTPUT commands.)

> When you finish directing SDA commands to an output file and want to return to interactive display, issue the following command:

>     SDA> SET OUTPUT SYS$OUTPUT

> Note that this command is not needed when the /SINGLE_COMMAND qualifier was specified on the original SET OUTPUT command.

> If you use the SET OUTPUT command to send the SDA output to a listing file and do not specify /NOINDEX or /NOHEADER, SDA builds a table of contents that identifies the displays you selected and places the table of contents at the beginning of the output file. The SET OUTPUT command formats the output into pages and produces a running head at the top of each page, unless you specify /NOHEADER.

> Note See the description of the DUMP command for use of SET OUTPUT/NOHEADER.

## SET PROCESS

> Selects a process to become the SDA current process.

### Format

> SET PROCESS {/ADDRESS=pcb-address|process-name|/ID=nn | /INDEX=nn |/NEXT|/SYSTEM}

### Parameter

> #### process-name

> Name of the process to become the SDA current process. The process-name is a string containing up to 15 uppercase or lowercase characters; numerals, the dollar sign ($), and the underscore (_) can also be included in the string. If you include characters other than these, you must enclose the entire string in quotation marks (" ").

### Qualifiers

> #### /ADDRESS=pcb-address

> Specifies the process control block (PCB) address of a process in order to display information about the process.

> #### /ID=nn

> #### /INDEX=nn

> Specifies the process for which information is to be displayed by its index into the system's list of software process control blocks (PCBs), or by its process identification. You can supply the following values for nn:
> - The process index itself.
> - The process identification (PID) or extended PID longword, from which SDA extracts the correct index. The PID or extended PID of any thread of a process with multiple kernel threads may be specified. Any thread-specific data displayed by further commands will be for the given thread.

> To obtain these values for any given process, issue the SDA command SHOW SUMMARY/THREADS. The /ID=nn and /INDEX=nn qualifiers can be used interchangeably.

> #### /NEXT

> Causes SDA to locate the next valid process in the process list and select that process. It there are no further valid processes in the process list, SDA returns an error.

> #### /SYSTEM

> Specifies the new current process by the system process control block (PCB). The system PCB and process header (PHD) parallel the data structures that describe processes. They contain the system working set list, global section table, and other systemwide data.

### Description

> When you issue an SDA command such as EXAMINE, SDA displays the contents of memory locations in its current process. To display any information about another process, you must change the current process with the SET PROCESS command.

> When you invoke SDA to analyze a crash dump, the process context defaults to that of the process that was current at the time of the system failure. If the failure occurred on a multiprocessing system, SDA sets the CPU context to that of the processor that caused the system to fail. The process context is set to that of the process that was current on that processor.

> When you invoke SDA to analyze a running system, its process context defaults to that of the current process, that is, the one executing SDA.

> The SET PROCESS command changes the current SDA process context to that of the process indicated by process-name, pcb-address, or /INDEX=nn. The process specified by this command becomes the current process for SDA until you either exit from SDA or change SDA process context by issuing one 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 analyze a crash dump from a multiprocessing system, changing process context may require a switch of CPU context as well. For instance, if you issue a SET PROCESS command for a process that is current on another CPU, SDA automatically changes its CPU context to that of the CPU on which that process is current. The following commands can have this effect if 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

> The following commands will also switch process context when analyzing a system dump, if there was a current process on the target CPU at the time of the crash:

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

> See Chapter 2, Section 2.5 for further discussion of the way in which SDA maintains its context information.

### Example

    SDA>  SHOW PROCESS
    Process index: 0012   Name: ERRFMT   Extended PID: 00000052
    -----------------------------------------------------------
    Process status:  02040001   RES,PHDRES,INTER
            status2: 00000001   QUANTUM_RESCHED
    PCB address              80D772CO    JIB address              80556600
    PHD address              80477200    Swapfile disk address    01000F01
    KTB vector address       80D775AC    HWPCB address            81260080
    Callback vector address  00000000    Termination mailbox          0000
    Master internal PID      00010004    Subprocess count                0
    Creator extended PID     00000000    Creator internal PID     00000000
    Previous CPU Id          00000000    Current CPU Id           00000000
    Previous ASNSEQ  0000000000000001    Previous ASN     000000000000002E
    Initial process priority        4    Delete pending count            0
    # open files allowed left     100    Direct I/O count/limit        150/150
    UIC                [00001,000004]    Buffered I/O count/limit      149/150
    Abs time of last event   0069D34E    BUFIO byte count/limit      99424/99808
    ASTs remaining                247    # of threads                    1
    Swapped copy of LEFC0    00000000    Timer entries allowed left     63
    Swapped copy of LEFC1    00000000    Active page table count         4
    Global cluster 2 pointer 00000000    Process WS page count          32
    Global cluster 3 pointer 00000000    Global WS page count           31

> Previous | Next | Contents | Index

> | privacy and legal statement |
> 6549PRO_008.HTML