USING SETDUMP IN BATCH MODE [ MPE Debug/Stack Dump Reference Manual ] MPE/iX 5.0 Documentation
MPE Debug/Stack Dump Reference Manual
USING SETDUMP IN BATCH MODE
When :SETDUMP is entered as a batch command or SETDUMP is included as an
intrinsic in a program executed in batch mode, the stack dump facility
displays the stack trace and analysis as illustrated in Figure 4-1.
Also,depending on the parameters specified,it dumps all or part of the
stack.
USING :SETDUMP COMMAND IN A JOB
In a job, the SETDUMP parameters specify the portion of the stack to be
dumped and whether the dump will include ASCII as well as octal values.
If all parameters are omitted, only the stack trace and analysis is
displayed in case of an abort.
If you want to dump the entire stack, you must specify two parameters, as
follows:
:SETDUMP DB,ST
DB displays the stack from DL to Q, and ST displays the stack from Q to
S.
If you want to display the parameters passed to the current subroutine
and the stack markers at Q-63 through Q-0, you can specify the command
as:
:SETDUMP QS
QS displays Q 63 through S. If ST is specified with QS, QS is ignored.
If you want the dump to include the ASCII conversion of the octal values,
you must specify the ASCII parameter. For example:
:SETDUMP DB,ST;ASCII
This command dumps the entire stack and includes the ASCII conversion.
USING SETDUMP INTRINSIC IN A JOB
You may include a call to the SETDUMP intrinsic anywhere within your
program. If you want a dump in case of an abort anywhere in the program
you should place the call at the beginning of the program. To only dump
in case of an abort in isolated sections of the program,these sections
can be delimited by a call to SETDUMP at the start and a call to
RESETDUMP at the end of each section.
One parameter is specified in the SETDUMP intrinsic. The value of this
parameter determines whether or not a stack dump is made and, if so, what
portion of the stack is dumped, and whether the ASCII conversion is to be
included.
The parameter is passed by value. It is a 16-bit logical value with the
following format:
Only bits 12 through 15 have meaning. They are interpreted as follows:
bit DB = 1 dump DL to Q initial
ST = 1 dump Q initial to S
QS = I dump Q- 63 to S (ignored if bit 14 = 1)
AS = 1 dump ASCII as well as octal values
The remaining values are zero and, if the entire parameter is zero, only
the stack trace and analysis is provided.
Suppose you want to call the system intrinsic SETDUMP from a FORTRAN
program and dump the entire stack with ASCII equivalence, include the
following call in your program:
CALL SETDUMP(% 13) (Dump DL through S with ASCII)
Bits 12, 14, and 15 are set by this parameter, octal 13.
To simply dump the stack with no ASCII conversion, use the call:
CALL SETDUMP(3) (Dump DL through S, no ASCII)
If you want to dump Q-63 to S, use the call:
CALL SETDUMP(4) (Dump Q- 63 through S, no ASCII)
Set the entire parameter value to zero if you only want a stack trace and
analysis upon abort:
CALL SETDUMP(0) (Stack trace and analysis only)
The stack trace and analysis is illustrated in Figure 4-1. Refer to
Figure 4-4 for a sample of a stack dump.
MPE/iX 5.0 Documentation