 |
» |
|
|
 |
Writes a full stack trace to a previously opened file. Callable from: CM Syntax |  |
STACKDUMP' (filename, idnumber, flags, selec); |
Parameters |  |
- filename
Byte array (required) The first byte of this array contains the file number
of a previously opened file. The file is used as the output file.
The file must have a record length between 32 and 256 CM words,
and write access must be allowed for the file. - idnumber
16-bit integer (required) If the intrinsic fails due to a file system error,
the file system specific error number of the failure is returned
here. Any value passed into the intrinsic through this parameter
is ignored. - flags
16-bit unsigned integer (optional) This parameter is provided for compatibility with MPE
V. If it is present in the intrinsic call, it is ignored and has
no effect. - selec
32-bit integer array by reference (optional) This parameter is provided for compatibility with MPE
V. If it is present in the intrinsic call, it is ignored and has
no effect.
Discussion |  |
The STACKDUMP' intrinsic writes a full dual stack trace to a previously
opened file. The file number of this file is passed to the intrinsic
in the first byte of the filename parameter. This intrinsic exists only in the compatibility mode library SL.PUB.SYS. No native mode to compatibility mode switch stub
is provided. Condition Codes |  |
- CCE
Request granted. - CCG
Request denied. One of two possible problems causes
this condition code. First, an invalid address for the location
of the filename parameter was detected. Second, the file record size
was not between 32 and 256 CM words. - CCL
Request denied. User does not have access to the
file number passed in the filename parameter.
Example |  |
The following example is a code fragment from a Pascal/V program.
It is a procedure which is passed the file number of an already
opened file. The procedure then uses the STACKDUMP' intrinsic to have a stack trace printed to the
specified file number. Note the use of the Pascal $ALIAS$ directive in declaring the intrinsic. PROCEDURE dump_stack_to_fnum(fnum : shortint); TYPE bit8 = 0..255; kludge_record = RECORD CASE integer OF 0 : (byte_1 : bit8; byte_2 : bit8); 1 : (pac : packed array[1..2] OF char); END; VAR kludge_var : kludge_record; procedure STACKDUMP_PRIME $alias 'stackdump'''$; intrinsic; BEGIN kludge_var.byte_1 := fnum; { This assumes that the value of FNUM } { is no bigger than 8 bits. This is } { a valid assumption. } stackdump_prime(kludge_var.pac); { Call STACKDUMP' to produce the } { stack trace. } END;
|
|