Chapter 12. Tracepoints 9712.1.6. Starting and Stopping Trace ExperimenttstartThis command takes no arguments. It starts the trace experiment, and begins collecting data. Thishas the side effect of discarding all the data collected in the trace buffer during the previous traceexperiment.tstopThis command takes no arguments. It ends the trace experiment, and stops collecting data.Note: a trace experiment and data collection may stop automatically if any tracepoint’s passcountis reached (refer to Section 12.1.3 Tracepoint Passcounts), or if the trace buffer becomes full.tstatusThis command displays the status of the current trace data collection.Here is an example of the commands we described so far:(gdb) trace gdb_c_test(gdb) actionsEnter actions for tracepoint #1, one per line.'collect $regs,$locals,$args'while-stepping 11'collect $regs'end'end(gdb) tstart[time passes ...](gdb) tstop12.2. Using the collected dataAfter the tracepoint experiment ends, you use gdb commands for examining the trace data. The basicidea is that each tracepoint collects a trace snapshot every time it is hit and another snapshot everytime it single-steps. All these snapshots are consecutively numbered from zero and go into a buffer,and you can examine them later. The way you examine them is to focus on a specific trace snapshot.When the remote stub is focused on a trace snapshot, it will respond to all gdb requests for memoryand registers by reading from the buffer which belongs to that snapshot, rather than from real mem-ory or registers of the program being debugged. This means that all gdb commands (print, inforegisters, backtrace, etc.) will behave as if we were currently debugging the program state as itwas when the tracepoint occurred. Any requests for data that are not in the buffer will fail.12.2.1. tfind nThe basic command for selecting a trace snapshot from the buffer is tfind n, which finds tracesnapshot number n, counting from zero. If no argument n is given, the next snapshot is selected.Here are the various forms of using the tfind command.