3 <title>Debugging with GDB
</title>
4 <meta http-equiv=
"Content-Type" content=
"text/html">
5 <meta name=
"description" content=
"Debugging with GDB">
6 <meta name=
"generator" content=
"makeinfo 4.3">
7 <link href=
"http://www.gnu.org/software/texinfo/" rel=
"generator-home">
12 Node:
<a name=
"Tracepoints">Tracepoints
</a>,
13 Next:
<a rel=
"next" accesskey=
"n" href=
"Overlays.html#Overlays">Overlays
</a>,
14 Previous:
<a rel=
"previous" accesskey=
"p" href=
"Data.html#Data">Data
</a>,
15 Up:
<a rel=
"up" accesskey=
"u" href=
"index.html#Top">Top
</a>
19 <h2 class=
"chapter">Tracepoints
</h2>
21 <p>In some applications, it is not feasible for the debugger to interrupt
22 the program's execution long enough for the developer to learn
23 anything helpful about its behavior. If the program's correctness
24 depends on its real-time behavior, delays introduced by a debugger
25 might cause the program to change its behavior drastically, or perhaps
26 fail, even when the code itself is correct. It is useful to be able
27 to observe the program's behavior without interrupting it.
29 <p>Using GDB's
<code>trace
</code> and
<code>collect
</code> commands, you can
30 specify locations in the program, called
<dfn>tracepoints
</dfn>, and
31 arbitrary expressions to evaluate when those tracepoints are reached.
32 Later, using the
<code>tfind
</code> command, you can examine the values
33 those expressions had when the program hit the tracepoints. The
34 expressions may also denote objects in memory--structures or arrays,
35 for example--whose values GDB should record; while visiting
36 a particular tracepoint, you may inspect those objects as if they were
37 in memory at that moment. However, because GDB records these
38 values without interacting with you, it can do so quickly and
39 unobtrusively, hopefully not disturbing the program's behavior.
41 <p>The tracepoint facility is currently available only for remote
42 targets. See
<a href=
"Targets.html#Targets">Targets
</a>. In addition, your remote target must know how
43 to collect trace data. This functionality is implemented in the remote
44 stub; however, none of the stubs distributed with GDB support
45 tracepoints as of this writing.
47 <p>This chapter describes the tracepoint commands and features.
50 <li><a accesskey=
"1" href=
"Set-Tracepoints.html#Set%20Tracepoints">Set Tracepoints
</a>:
51 <li><a accesskey=
"2" href=
"Analyze-Collected-Data.html#Analyze%20Collected%20Data">Analyze Collected Data
</a>:
52 <li><a accesskey=
"3" href=
"Tracepoint-Variables.html#Tracepoint%20Variables">Tracepoint Variables
</a>: