Any idea what this message means?
The meaning is exactly what the message says: the tracer is implemented only in gdbserver , and not in GDB itself, so you cannot use tstart when debugging initially (when GDB controls the bottom one (is debugged) directly).
Instead, you need to set up a remote debugging session (which can still be done on the same machine):
gdbserver :10000 ./a.out # start gdbserver listening on port 10000
In another window:
gdb -ex 'target remote :10000' ./a.out
Now you will have GDB with the remote target (which is located on gdbserver on the same host), and tstart , etc. will work.
Update:
But now I see the following messages:
(gdb) tstart
Target does not support this command.
(gdb) r
The "remote" target does not support "run".
Before you can use tstart , you need to set up the trace and actions as described here .
And you cannot run , because the lower process is already running. Use continue instead.
Update 2:
(gdb) trace testprog.c:273 Tracepoint 1 at 0x4578f7: file testprog.c, line 273. (gdb) passcount 2 1 Setting tracepoint 1 passcount to 2 (gdb) actions 1 Enter actions for tracepoint 1, one per line. End with a line saying just "end". > collect id1 > end (gdb) tstart Target does not support this command
It looks like your gdbserver old and does not actually support tracing.
What to do
gdb --version gdbserver --version
produce?
Update 3:
Apparently your gdbserver too old.
Although GDB itself supported trace points from version 4.17, gdbserver only just begun to support trace points with version 7.2
Update 4:
where to specify this option "-f filename", which my program accepts as input
Simple You can read the documentation for gdbserver, but I believe you are looking for this call:
gdbserver :10000 ./a.out -f filename