The STACK command displays the formatted and interpreted contents of a stack.
Syntax
── STACK ──<first parameter>──<second parameter>───────────────────────┤
<first parameter>
──┬─ ACTIVE ─────┬─────────────────────────────────────────────────────┤ ├─ ALL ────────┤ ├─ DATABASE ───┤ ├─ DUMPING ────┤ │ ┌◄─── , ───┐ │ └─┴─<number>─┴─┘
<second parameter>
──┬──────────────────────────────────────────────────────────┬─────────┤ ├─ HISTORY ──────────────────────────────────────┬─┬───────┤ ├─ SUMMARY ──────────────────────────────────────┤ └─ PIB ─┘ └─ OFFSET ──<simple value>─┬─────────────────────┤ └─ - ──<simple value>─┘
Explanation
Refer to “Basic Constructs” earlier in this section for information about the <number> and<simple value> constructs.
<first parameter>
Specifies the stack or set of stacks to be displayed.
The following tables describes the elements of the first parameter:
Specify . . . |
To display . . . |
---|---|
ACTIVE |
All stacks that are alive or active at the time of the dump, including the stack that is performing the dump. |
ALL |
All stacks on the system. |
DATABASE |
All task stacks that use Data Management System II (DMSII), including database stacks and database task stacks. |
DUMPING |
The stack performing the dump. If a different stack initiated the dump, then the initiating stack is also displayed. |
<number> |
All the stacks indicated by the number. |
<second parameter>
Restricts the display of the stack or stacks. If no restriction is present, the entire stack and its process information block (PIB) are displayed. The following table describes the options of the second parameter:
Specify . . . |
To display . . . |
---|---|
HISTORY |
The MSCWs and RCWs in the stack or stacks. In HARDWAREINTERRUPT environments, the P1 and P2 parameters are also shown and analyzed. |
SUMMARY |
The summary information for the stack or stacks. |
OFFSET <simple value> |
The contents of the stack or stacks starting at the offset specified by the simple value and continuing to the base of the stack. |
OFFSET <simple value> -<simple value> |
The contents of the stack or stacks between the two specified offsets. Note that the first simple value must be greater than the second simple value. |
PIB |
The PIB of the stack. |
Example 1
The following example lists stack 368 from 10B to F5.
STACK 368 OFFSET 10B - F5
Examples 2 through 4
Examples 2 through 4 present a complete example of the output of the STACK command.
Process Stack (Example 2)
The first part of the STACK command output, shown in the Process Stack example output, includes the following items:
Following these items is a listing of the contents of each word in the process stack, starting with the S-register and working down, one word on each line. Each entry is divided into columns, from left to right. The contents of each column are shown in the following table:
Column |
Contains . . . |
---|---|
1 |
A 4–digit hexadecimal number that identifies the offset of the word from the base of the stack. |
2 |
Address couples (such as 01, 000C) that specify the lexical level and offset of items declared in each procedure. |
3 |
The contents of the word, expressed in hexadecimal representation. The leading digit expresses the tag bits. The remaining 48 bits are represented by two groups of six hexadecimal digits. Each hexadecimal digit represents a group of four bits, starting with [47:4] and ending at [3:4]. |
4 |
An analysis of the contents of the word. |
The following table explains the analyses for various types of words:
Process Information Block (Example 3)
The second part of the STACK command output, shown in Process Information Block output example, starts with a pointer to the SPIBVECTOR, which is parallel to the stack vector and stores descriptors for active process information blocks (PIBs). Then, for each word in the PIB, the output shows an entry divided into the following columns, from left to right:
-
The hexadecimal offset of the word in the PIB.
-
The hexadecimal contents of the word.
-
Analysis of the contents of the word.
Task Attribute Block (Example 4)
The third part of the STACK command output, shown in the Task Attribute Block example output, shows the contents of the task attribute block (TAB) for the process. The format of this output is similar to that used for the PIB printout. Note that arrows (=>) appear in front of active task attributes. Following the TAB listing is a dump of the contents of the environment TAB for the process.