Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / info / gdb / Tracepoint-Variables.html
blob6718d571cbc1ab59aeb980e6d7047e4a96ca3a8b
1 <html lang="en">
2 <head>
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">
8 </head>
9 <body>
10 <div class="node">
11 <p>
12 Node:<a name="Tracepoint%20Variables">Tracepoint Variables</a>,
13 Previous:<a rel="previous" accesskey="p" href="Analyze-Collected-Data.html#Analyze%20Collected%20Data">Analyze Collected Data</a>,
14 Up:<a rel="up" accesskey="u" href="Tracepoints.html#Tracepoints">Tracepoints</a>
15 <hr><br>
16 </div>
18 <h3 class="section">Convenience Variables for Tracepoints</h3>
20 <dl>
21 <dt><code>(int) $trace_frame</code>
22 <dd>The current trace snapshot (a.k.a. <dfn>frame</dfn>) number, or -1 if no
23 snapshot is selected.
25 <br><dt><code>(int) $tracepoint</code>
26 <dd>The tracepoint for the current trace snapshot.
28 <br><dt><code>(int) $trace_line</code>
29 <dd>The line number for the current trace snapshot.
31 <br><dt><code>(char []) $trace_file</code>
32 <dd>The source file for the current trace snapshot.
34 <br><dt><code>(char []) $trace_func</code>
35 <dd>The name of the function containing <code>$tracepoint</code>.
36 </dl>
38 <p>Note: <code>$trace_file</code> is not suitable for use in <code>printf</code>,
39 use <code>output</code> instead.
41 <p>Here's a simple example of using these convenience variables for
42 stepping through all the trace snapshots and printing some of their
43 data.
45 <pre class="smallexample"> (gdb) <b>tfind start</b>
47 (gdb) <b>while $trace_frame != -1</b>
48 &gt; output $trace_file
49 &gt; printf ", line %d (tracepoint #%d)\n", $trace_line, $tracepoint
50 &gt; tfind
51 &gt; end
52 </pre>
54 </body></html>