Buy the book!
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
tracecommand is very similar to the
breakcommand. Its argument can be a source line, a function name, or an address in the target program. See section 5.1.1 Setting breakpoints. The
tracecommand defines a tracepoint, which is a point in the target program where the debugger will briefly stop, collect some data, and then allow the program to continue. Setting a tracepoint or changing its commands doesn't take effect until the next
tstartcommand; thus, you cannot change the tracepoint attributes once a trace experiment is running.
Here are some examples of using the
(gdb) trace foo.c:121 // a source file and line number (gdb) trace +2 // 2 lines forward (gdb) trace my_function // first source line of function (gdb) trace *my_function // EXACT start address of function (gdb) trace *0x2117c4 // an address
You can abbreviate
The convenience variable
$tpnum records the tracepoint number
of the most recently set tracepoint.
delete tracepoint [num]
(gdb) delete trace 1 2 3 // remove three tracepoints (gdb) delete trace // remove all tracepoints
You can abbreviate this command as
|webmaster||delorie software privacy|
|Copyright © 2003 by The Free Software Foundation||Updated Jun 2003|