HP 3000 Manuals

STACK TRACE AND ANALYSIS [ MPE Debug/Stack Dump Reference Manual ] MPE/iX 5.0 Documentation


MPE Debug/Stack Dump Reference Manual

STACK TRACE AND ANALYSIS 

The stack trace and analysis provided automatically by SETDUMP and
optionally by STACKDUMP can be very useful.  The values provided by the
stack trace and analysis are illustrated in Figure 4-1.

           :SETDUMP
           :RUN DBPROG2

           MAINPROG MONE     MTWO       MTHREE

             ABORT :DBPPOG2.PUB.TECHPUBS.%0.%231 \ 1 
            PROGRAM ERROR #1: INTEGER OVERFLOW   /
           *** ABORT STACK ANALYSIS ***
                                                   ----- 5 -----
       2 -- S=000052       DL=177602  Z=001475    /              \
       3 -- Q=000056  - P=000231   LCST= 000  STAT=U,1,1,l,0,0,CCL   X=000000
            Q=000041  | P=177777   LCST=S123  STAT=P,1,0,L,0,0,CCG   X=000000
       4 ------------ |     \      \       /
                      |      7      -- 6 --
            *DEBUG*  0.231

          Figure 4-1.  Sample Stack Trace and Analysis 

The key items in Figure 4-1 are:

1                Abort message indicating where the abort occurred
                 (segment 0, relative location 231) and the type of error
                 (integer overflow).

2                Location of top of stack when the error occured.

3                Location of Q after the error and after the four-word
                 stack marker has been placed at the top of the stack;
                 note that Q is four words greater than S.

4                Value of program counter following abort; P-1 is
                 location of statement that caused the abort.

5                Status word at the time of the error; the first line
                 shows the status of the program unit that caused the
                 program to abort.

                 The second line provides the status of system area to
                 which control normally returns at an abort.

6                Logical Code Segment number assigned to the program by
                 the segmenter at the time of PREP. The S preceding the
                 LCST number indicates it is a system code segment.

7                Since code segment S132 has not been entered yet, the
                 program counter has no valid value.  This is indicated
                 by printing -1,(177777).

This information is not only displayed for your use, but is placed at the
top of the stack as the four-word stack marker.

The status word (ST in the display) has the following format:

[]
bit 0 = 1 if program is privileged bit4 = 1 if overflow bit set (not set if user 0 if program is in user mode traps enabled) 0 if not bit 1 = 1 if external interrupts are enabled 0 if,not bit5 = 1 if carry bit set 0 if not bit 2 = 1 if user traps enabled 0 if not bits 6,7 = 01 if CCL 10 if CCE bit 3 = 1 if right stack operation pending 00 if CCG 0 if left stack operation pending


MPE/iX 5.0 Documentation