An obsolete tracepoint definition is similar to a when in or when at breakpoint, possibly combined with watching for a change of a variable's value:
obsolete_trace_breakpoint_definition_command
: trace [ variable_name ]
[ thread_filter ]
[ where_modifier ]
[ logical_filter ]
| trace function_name [ logical_filter ] [ breakpoint_actions ]
| trace line_specifier [ logical_filter ] [ breakpoint_actions ]
where_modifier
| at line_specifier
line_specifier
: quoted_filename:line_number
quoted_filename
: "filename"
| 'filename'
Following are the differences between an obsolete tracepoint and a when command:
The obsolete tracepoint command begins with trace instead of when.
If you specify a variable name, a trace identification line is displayed only when the value of the variable changes (and the logical filter evaluates to true).
The debugger implementation of trace for detecting variable changes tends to be slow - at each place where control might be stopped, as specified by the where modifier and filters, the value of the variable is compared to the value remembered at the time execution began.
The order of filters and modifiers is different.
For example:
(idb) trace in List<Node>::print
[#7: trace in void List<Node>::print(void)]
(idb) trace i in List<Node>::print
[#8: trace i in void List<Node>::print(void)]
(idb) trace List<Node>::print if i { print "Test 1" }
[#9: trace in void List<Node>::print(void) if i { print "Test 1" }]
If the trace command is given with no arguments, the debugger prints a trace identification line when each function in your program is entered. For example:
(idb) trace
[#10: trace]
(idb) status
#10 at procedure entry { trace-proc }
This is equivalent to the when every proc entry command (with equivalent performance degradation).