gdb.info: Starting and Stopping Trace Experiment

Go backward to Listing Tracepoints
Go up to Set Tracepoints
Go to the top op gdb

Starting and Stopping Trace Experiment

`tstart'
     This command takes no arguments.  It starts the trace experiment,
     and begins collecting data.  This has the side effect of
     discarding all the data collected in the trace buffer during the
     previous trace experiment.
`tstop'
     This 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 passcount is reached (*note
     Tracepoint Passcounts::), or if the trace buffer becomes full.
`tstatus'
     This 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) actions
     Enter actions for tracepoint #1, one per line.
     > collect $regs,$locals,$args
     > while-stepping 11
       > collect $regs
       > end
     > end
     (gdb) tstart
     	[time passes ...]
     (gdb) tstop