A Typical Trace Debugging Session
Specify “tracepoints” (analogous to breakpoints).
- trace tree.c:find
- trace main.c:123
Specify variables, registers etc. to collect at each tracepoint.
- collect tree->vector.p[tree->vector.n - 1]
- collect $d1, $a2
Replay at leisure the sequence of tracepoint ‘hits’, examining the collected data using any GDB command.
- tfind line 123
- display tree->vector.p[tree->vector.n - 1]
- tfind next