The formatting controls are as follows:
This tells the Trace Formatter to skip over the next nnn bytes in the current trace record. This could be used, for example, to skip over unimportant data, traced as a block, and only output the data of interest.
When using this control, nnn represents an ASCII decimal number and must be followed by a space.
statement: FMT = "ignore ten bytes %I10 here", FMT = " and two more %I2 here", generates: ignore ten bytes here and two more here
This tells the Trace Formatter that the next bytes in the trace record are the prefix or header bytes for data logged by the dynamic tracing mechanism. This is required to precede any format control describing data logged from memory. Do not use this before data that was logged from a register and never use with static tracepoints.
%P may be used in combination with any of the following formatting controls: %A, %B, %C, %D, %F, %Q, %S, %U, %W.
%P%x may be specified as %Px.
See Formatting Trace Data for a description of how the data is stored in the trace buffer and the use of this control.
statements: FMT="memory byte = %P%B", generates: memory byte = C2%B
statement: FMT = "memory byte = %P%B" generates: memory byte = 01%C
statement: FMT = "memory bytes = %C%C%C" generates: memory byte = ABC
%C formats a byte of data as a single ASCII character, with no separating spaces. Bytes outside the range 0x20 - 0x7f are formatted as periods.
Note:
The %C formatting control is only available with TRCUST 2.26 or later and TRACEFMT version 2.2 or later. %W
statement: FMT = "register word = %W" generates: register word = 0001 statement: FMT = "memory word = %P%W" generates: memory word = 0001%D
statement: FMT = "double word EAX = %D" generates: double word EAX = 0000 4B2C statement: FMT = "double memory word = %P%D" generates: double memory word = 0000 4B2C%F
statement: FMT = "flat address EAX = %F" generates: flat address EAX = 00004B2C%Q
statement: FMT = "quad word from regs EAX and EBX = %Q" generates: quad word from regs EAX and EBX = 00004B2C 00000001%A
statement: FMT = "segmented address in SS:SP = %A" generates: segmented address in SS:SP = 00B7:0001 statement: FMT = "segmented address in memory = %P%A" generates: segmented address in memory = 00B7:0001%R
The action of %R differs between dynamic and static trace:
For dynamic trace records, %R will process the 3-byte memory prefix to determine the length of data to which repeat formatting applies. %R is used in place of the %P control.
For static trace records, %R applies itself to all the remaining data in the trace buffer. No 3-byte memory prefix is examined or processed.
statement: FMT = "log a variable number of words from memory = %R%W" generates: log a variable number of words from memory = 0001 0004%S
The prefix formatting control should always precede this for dynamic tracepoints because the data was logged from memory.
Note: If the tracepoint is static, then %P should not be used because the string is terminated with a null byte.
statement: FMT = "string = %P%S" generates: string = c:\os2\os2.ini%U
This will output the remaining of the traced data, including any prefix bytes.
statement: FMT = "garbage = %U" generates: garbage = [00 00 00 03 c2 c1 c4 ff 04 00 09 c0 18]
With fix pack 35 for OS/2 Warp V3.0, fix pack 10 of OS/2 Warp V4.0 and OS/2 Warp E-Server the TRACEFMT utility permits unformatted data to be displayed in dump format, where both the hexadecimal and ASCII representations of the data are displayed together with offsets. ASCII characters outside the range 0x20-0x7f are displayed as '.' for example:
Data [+0000 04 00 5A 00 00 0C 00 2B-DF F6 FF FF FF 00 00 01 ..Z....+........ ] Data [+0010 00 01 C0 ... ]%X
statement: FMT = "major code = %X" generates: major code = 00C2%Y
statement: FMT = "minor code = %Y" generates: minor code = 0081
Note to CMVC Users: To avoid conflicts with source file control information, all formatting specifications can be in upper or lower case. Also, prefix format specifications may be combined with data format specifications. For example, the following create the same format controls in the TFF:
FMT = "%P%W here" FMT = "%p%w here" FMT = " %P %W here"