This is used to log memory in a function compiled using 32-bit flat addressing and is coded as:
MEM32=(address_spec,flag,{length|LEN}),
where:
address_spec
is a flat memory address specification as described in Address Specification.
is a mandatory parameter that identifies the level of indirection to be used on the address. It is one of:
D[IRECT]
I[NDIRECT][*[{+|-}iiiiiiii]]...
IS
INDIRECT means that the address contains a flat address and is dereferenced to obtain the memory location. The optional asterisks denote the level of indirection, one for each level. The indirect offsets iiiiiiii are added to or subtracted from the value found at the given level of indirection.
IS (Indirect Segmented) means that the address contains a segmented address that is dereferenced to obtain the memory location.
is the number of bytes at the memory location to be saved in the trace buffer. If length is too big, a warning message will be given, and length will be set to MAXDATALENGTH. If length is 0 an error message will be given, and this tracepoint will be ignored.
specifies that this is a variable length record to log and the length was specified by the preceding LEN statement. If there was no preceding LEN statement, this tracepoint is rejected. Either length or LEN must be specified, but not both.
Example of the MEM32 statement follows:
TRACE MINOR=..... /* To log retcode enter the following: */ MEM32=(.retcode,DIRECT,2), /* s_ptr is a pointer to a structure, log it for 4 bytes. */ MEM32=(.s_ptr,INDIRECT,4), /* Field 6 bytes into structure pointed at by s_ptr is a */ /* pointer to a structure, log 8 bytes past begin of struct.*/ MEM32=(.s_ptr,INDIRECT*+6*+8,10), /* logs ten bytes */ /* s_ptr points to a variable length record, second field */ /* is the record length (offset 4 from record beginning).*/ LEN=(s_ptr,INDIRECT*+4), MEM32=(.s_ptr,INDIRECT,LEN) /* s_end points to the end of same variable length record,*/ /* second field is the record length (offset -6 from */ /* record beginning). */ LEN=(s_end,INDIRECT*-6), MEM32=(.s_ptr,INDIRECT,LEN)