Provides a way to examine memory in the current process address space. Use of this function requires information about GT.M internals, which may change from release to release. Contact FIS support for information on techniques for using $ZPEEK() in largely release independent ways.
The $ZPEEK() function returns the contents of the memory requested as a string depending on the requested (or defaulted) formatting.
The format of the $ZPEEK() function is:
$ZPEEK("mnemonic[:argument]",offset,length[,format])
mnemonic
specifies the memory area $ZPEEK() is to access. Some mnemonics have arguments separated from the mnemonic by a colon (":"). The mnemonics are case independent. Possible mnemonics, their possible abbreviations and their arguments are:
CSA[REG] - returns a value from the sgmnt_addrs (process private) control block. Takes a case independent region name as an argument.
FH[REG] - returns a value from the sgmnt_data (shared file header) control block. Takes a case independent region name as an argument..
GDR[REG] - returns a value from the gd_region (process private) control block. Takes a case independent region name as an argument.
GLF[REPL] - returns a value from the jnlpool.gtmsrc_lcl_array[n] control block. Takes a numeric index (n) as an argument.
GRL[REPL] - returns a value from the recvpool.gtmrecv_local control block. No argument allowed. Only available when run on a non-primary instance.
GSL[REPL] - returns a value from the jnlpool.gtmsource_local_array[n] control block. Takes a numeric index (n) as an argument.
JBF[REG]:region[ -obtains fields in shared jnl_buffer structure.
JNL[REG]:region[ - obtains fields in the jnl_private_control structure.
JPC[REPL] - returns a value from the jnlpool.jnlpool_ctl control block. No argument allowed.
NL[REG] - returns a value from the node_local (shared) control block. Takes a case independent region name as an argument.
NLREPL - returns a value from the node_local (shared) control block associated with replication. No argument allowed.
PEEK - returns a value based on the supplied argument. Argument is the base address of the value to obtain in 0xhhhhhhh format where the h's are hex digits.
RIH[REPL] - returns a value from the jnlpool.repl_inst_filehdr control block. No argument allowed.
RPC[REPL] - returns a value from the recvpool.recvpool_ctl control block. No argument allowed. Only available when run on a non-primary instance.
UHC[REPL] - returns a value from the recvpool.upd_helper_ctl control block. No argument allowed. Only available when run on a non-primary instance.
UPL[REPL] - returns a value from the recvpool.upd_proc_local control block. No argument allowed. Only available when run on a non-primary instance.
offset
(first integer expression) is a numeric value that specifies the offset from the address supplied or implied by the the mnemonic and argument. Specifying a negative offset results in a BADZPEEKARG error. Specifying too large an offset such that unavailable memory is specified results in a BADZPEEKRANGE error.
length
(second integer expression) is a numeric value that specifies the length of the field to obtain. Specifying a negative legnth results in a BADZPEEKARG error. Specifying a length that exceeds the maximum string length results in a MAXSTRLEN error. Specifying too large a length such that unavailable memory is specified results in a BADZPEEKRANGE error.
format
is an optional single case independent character formatting code for the retrieved data. The formatting codes are:
C : returns a character representations of the memory locations; this is the DEFAULT if the fourth argument is not specified.
I : returns a signed integer value - negative values have a preceding minus sign (-); the length can be 1, 2, 4, or 8 bytes.
U : returns an unsigned integer value - all bits are part of the numeric value; the length can be 1, 2, 4, or 8 bytes.
S : returns a character representation of the memory locations and the first NULL character found terminates the returned string; that is: the specified length is a maximum.
T: Selects a $HOROLOG format for a field of 4 or 8 bytes which is intended for use on fields in UNIX time format (seconds since 01/01/1970)
X : returns a hexadecimal value as 0xXXXXXX where XXXXXX is twice the specified length in bytes, so requested length 1 returns 0xXX and length 4 returns 0xXXXXXXXX; the length can be 1, 2, 4, or 8 bytes.
Z : returns a hexadecimal representation of the memory locations as 'X' does, without regard to endianness, and with no length restriction other than max string length.
$ZPEEK() function generates an UNDEF error when VIEW UNDEF is not set and a format parameter is specified but is undefined.
Notes | |
---|---|
|