Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / info / gdb / GDB-MI-Thread-Commands.html
blobf9fc51b71447f166f9d1e2deb348830f5030dfab
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="GDB%2fMI%20Thread%20Commands">GDB/MI Thread Commands</a>,
13 Next:<a rel="next" accesskey="n" href="GDB-MI-Tracepoint-Commands.html#GDB%2fMI%20Tracepoint%20Commands">GDB/MI Tracepoint Commands</a>,
14 Previous:<a rel="previous" accesskey="p" href="GDB-MI-Target-Manipulation.html#GDB%2fMI%20Target%20Manipulation">GDB/MI Target Manipulation</a>,
15 Up:<a rel="up" accesskey="u" href="GDB-MI.html#GDB%2fMI">GDB/MI</a>
16 <hr><br>
17 </div>
19 <h3 class="section"><small>GDB/MI</small> Thread Commands</h3>
21 <h4 class="subheading">The <code>-thread-info</code> Command</h4>
23 <h5 class="subsubheading">Synopsis</h5>
25 <pre class="example"> -thread-info
26 </pre>
28 <h5 class="subsubheading">GDB command</h5>
30 <p>No equivalent.
32 <h5 class="subsubheading">Example</h5>
34 <p>N.A.
36 <h4 class="subheading">The <code>-thread-list-all-threads</code> Command</h4>
38 <h5 class="subsubheading">Synopsis</h5>
40 <pre class="example"> -thread-list-all-threads
41 </pre>
43 <h5 class="subsubheading">GDB Command</h5>
45 <p>The equivalent GDB command is <code>info threads</code>.
47 <h5 class="subsubheading">Example</h5>
49 <p>N.A.
51 <h4 class="subheading">The <code>-thread-list-ids</code> Command</h4>
53 <h5 class="subsubheading">Synopsis</h5>
55 <pre class="example"> -thread-list-ids
56 </pre>
58 <p>Produces a list of the currently known GDB thread ids. At the
59 end of the list it also prints the total number of such threads.
61 <h5 class="subsubheading">GDB Command</h5>
63 <p>Part of <code>info threads</code> supplies the same information.
65 <h5 class="subsubheading">Example</h5>
67 <p>No threads present, besides the main process:
69 <pre class="smallexample"> (gdb)
70 -thread-list-ids
71 ^done,thread-ids={},number-of-threads="0"
72 (gdb)
73 </pre>
75 <p>Several threads:
77 <pre class="smallexample"> (gdb)
78 -thread-list-ids
79 ^done,thread-ids={thread-id="3",thread-id="2",thread-id="1"},
80 number-of-threads="3"
81 (gdb)
82 </pre>
84 <h4 class="subheading">The <code>-thread-select</code> Command</h4>
86 <h5 class="subsubheading">Synopsis</h5>
88 <pre class="example"> -thread-select <var>threadnum</var>
89 </pre>
91 <p>Make <var>threadnum</var> the current thread. It prints the number of the new
92 current thread, and the topmost frame for that thread.
94 <h5 class="subsubheading">GDB Command</h5>
96 <p>The corresponding GDB command is <code>thread</code>.
98 <h5 class="subsubheading">Example</h5>
100 <pre class="smallexample"> (gdb)
101 -exec-next
102 ^running
103 (gdb)
104 *stopped,reason="end-stepping-range",thread-id="2",line="187",
105 file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
106 (gdb)
107 -thread-list-ids
108 ^done,
109 thread-ids={thread-id="3",thread-id="2",thread-id="1"},
110 number-of-threads="3"
111 (gdb)
112 -thread-select 3
113 ^done,new-thread-id="3",
114 frame={level="0 ",func="vprintf",
115 args=[{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""},
116 {name="arg",value="0x2"}],file="vprintf.c",line="31"}
117 (gdb)
118 </pre>
120 </body></html>