The TP parameter is a required keyword parameter. If TP is specified more than once for a single tracepoint definition, the tracepoint is discarded. TP has three mutually exclusive definitions which can be coded as:
TP=@STATIC,
where:
STATIC
TP=@filename,linenum,
where:
filename
Note: Debug information must exist to use this option. The statement at the given source linenum may have been rearranged during compiler optimization, so the developer must use this with caution. If the linenum is not found in the debug information, the tracepoint is applied at the next linenum defined in the debug information and a warning message is issued to the user.
An example to apply a tracepoint to line 35 of file stubfile.c is:
TRACE MINOR=0x700A, /* puts tracepoint on code at line */ TP=@stubfile.c,35,..... /* 35 of source file stubfile.c */
TP=.name[{+|-}offs][,RETEP],
where:
name
If the procedure was compiled with debug support, Name is case sensitive. If not, C language functions will be case sensitive and begin with an underscore "_" character unless the function is declared with the Pascal calling convention, in which case the underscore is omitted and the name is capitalized.
The module must include information supplied by the debug compile option (see Symbolic Debug Support), meaning that the source language must have been C, otherwise an error message will be generated and this tracepoint discarded.
When the RETEP is used, the name must be a valid entry point to a procedure.
Note: The RETEP option depends upon the manner in which a C compiler generates its code. Therefore this option may not work will some of the new compilers.
Note: For ASM functions to accomplish tracing, a label must be made public to have a tracepoint applied. Therefore, to accomplish "POST" tracing, a label must be made public at the return statement.
The following are partial examples of Pre/Post tracing of DosOpen:
TRACE MINOR=0x0001, TP=.DosOpen,..... /* Pre-invocation tracing */ TRACE MINOR=0x8001, TP=.DosOpen,RETEP,..... /* Post-invocation tracing */
It is not possible to set dynamic tracepoints on the following machine instructions:
0x9C
TRCUST gives an error for these opcodes and the tracepoint is rejected.
In all cases, two tracepoints cannot be applied at the same address.