3 <title>GDB/MI library</title>
6 <H1>GDB/MI library</H1>
8 This document describes the functions of libmigdb library
12 This document applies to version 0.8.10 of the GDB/Machine interface
17 Most of the C++ interface is fully documented. But not all the C
18 interface is docummented.
22 The name of the high level C functions are derived from the corresponding
23 GDB/MI command. For this reason I recommend using the chapter 'GDB/MI' of
24 gdb documentation as main reference. As an example: The gdb command
25 '-thread-list-ids' is implemented in the gmi_thread_list_ids function. This
26 function uses the lowlevel function mi_thread_list_ids.
30 The mi_gdb.h header contains a lot of comments about what does each
31 function. And the examples show how to them together.
38 <li><a href="#Alphabetical List">Alphabetical list of functions</a>
39 <li><a href="#Classes">List by classes</a>
40 <li><a href="#Modules">List by modules</a>
41 <li><a href="#Files">List by files</a>
42 <li><a href="#Command">List by GDB/MI command</a>
48 <a name="Alphabetical List"></a>
49 <H1>Alphabetical List</H1>
52 <li><a href="#BreakDelete (MIDebugger)">BreakDelete (MIDebugger)</a>
53 <li><a href="#Breakpoint (MIDebugger)">Breakpoint (MIDebugger)</a>
54 <li><a href="#Breakpoint (MIDebugger) <1>">Breakpoint (MIDebugger) <1></a>
55 <li><a href="#BreakpointFull (MIDebugger)">BreakpointFull (MIDebugger)</a>
56 <li><a href="#CallStack (MIDebugger)">CallStack (MIDebugger)</a>
57 <li><a href="#Connect (MIDebugger)">Connect (MIDebugger)</a>
58 <li><a href="#Continue (MIDebugger)">Continue (MIDebugger)</a>
59 <li><a href="#Disconnect (MIDebugger)">Disconnect (MIDebugger)</a>
60 <li><a href="#EvalExpression (MIDebugger)">EvalExpression (MIDebugger)</a>
61 <li><a href="#FillTypeVal (MIDebugger)">FillTypeVal (MIDebugger)</a>
62 <li><a href="#FinishFun (MIDebugger)">FinishFun (MIDebugger)</a>
63 <li><a href="#gmi_break_delete">gmi_break_delete</a>
64 <li><a href="#gmi_break_insert">gmi_break_insert</a>
65 <li><a href="#gmi_break_insert_full">gmi_break_insert_full</a>
66 <li><a href="#gmi_break_insert_full_fl">gmi_break_insert_full_fl</a>
67 <li><a href="#gmi_break_set_condition">gmi_break_set_condition</a>
68 <li><a href="#gmi_break_set_times">gmi_break_set_times</a>
69 <li><a href="#gmi_break_state">gmi_break_state</a>
70 <li><a href="#gmi_break_watch">gmi_break_watch</a>
71 <li><a href="#gmi_data_evaluate_expression">gmi_data_evaluate_expression</a>
72 <li><a href="#gmi_dir">gmi_dir</a>
73 <li><a href="#gmi_end_aux_term">gmi_end_aux_term</a>
74 <li><a href="#gmi_end_pty">gmi_end_pty</a>
75 <li><a href="#gmi_exec_continue">gmi_exec_continue</a>
76 <li><a href="#gmi_exec_finish">gmi_exec_finish</a>
77 <li><a href="#gmi_exec_interrupt">gmi_exec_interrupt</a>
78 <li><a href="#gmi_exec_kill">gmi_exec_kill</a>
79 <li><a href="#gmi_exec_next">gmi_exec_next</a>
80 <li><a href="#gmi_exec_next_cnt">gmi_exec_next_cnt</a>
81 <li><a href="#gmi_exec_next_instruction">gmi_exec_next_instruction</a>
82 <li><a href="#gmi_exec_return">gmi_exec_return</a>
83 <li><a href="#gmi_exec_run">gmi_exec_run</a>
84 <li><a href="#gmi_exec_step">gmi_exec_step</a>
85 <li><a href="#gmi_exec_step_cnt">gmi_exec_step_cnt</a>
86 <li><a href="#gmi_exec_step_instruction">gmi_exec_step_instruction</a>
87 <li><a href="#gmi_exec_until">gmi_exec_until</a>
88 <li><a href="#gmi_exec_until_addr">gmi_exec_until_addr</a>
89 <li><a href="#gmi_file_symbol_file">gmi_file_symbol_file</a>
90 <li><a href="#gmi_full_var_create">gmi_full_var_create</a>
91 <li><a href="#gmi_gdb_exit">gmi_gdb_exit</a>
92 <li><a href="#gmi_gdb_set">gmi_gdb_set</a>
93 <li><a href="#gmi_gdb_show">gmi_gdb_show</a>
94 <li><a href="#gmi_gdb_version">gmi_gdb_version</a>
95 <li><a href="#gmi_look_for_free_pty">gmi_look_for_free_pty</a>
96 <li><a href="#gmi_look_for_free_vt">gmi_look_for_free_vt</a>
97 <li><a href="#gmi_set_exec">gmi_set_exec</a>
98 <li><a href="#gmi_stack_info_depth">gmi_stack_info_depth</a>
99 <li><a href="#gmi_stack_info_depth_get">gmi_stack_info_depth_get</a>
100 <li><a href="#gmi_stack_info_frame">gmi_stack_info_frame</a>
101 <li><a href="#gmi_stack_list_arguments">gmi_stack_list_arguments</a>
102 <li><a href="#gmi_stack_list_arguments_r">gmi_stack_list_arguments_r</a>
103 <li><a href="#gmi_stack_list_frames">gmi_stack_list_frames</a>
104 <li><a href="#gmi_stack_list_frames_r">gmi_stack_list_frames_r</a>
105 <li><a href="#gmi_stack_list_locals">gmi_stack_list_locals</a>
106 <li><a href="#gmi_stack_select_frame">gmi_stack_select_frame</a>
107 <li><a href="#gmi_start_xterm">gmi_start_xterm</a>
108 <li><a href="#gmi_target_attach">gmi_target_attach</a>
109 <li><a href="#gmi_target_detach">gmi_target_detach</a>
110 <li><a href="#gmi_target_select">gmi_target_select</a>
111 <li><a href="#gmi_target_terminal">gmi_target_terminal</a>
112 <li><a href="#gmi_thread_list_all_threads">gmi_thread_list_all_threads</a>
113 <li><a href="#gmi_thread_list_ids">gmi_thread_list_ids</a>
114 <li><a href="#gmi_thread_select">gmi_thread_select</a>
115 <li><a href="#gmi_var_assign">gmi_var_assign</a>
116 <li><a href="#gmi_var_create">gmi_var_create</a>
117 <li><a href="#gmi_var_create_nm">gmi_var_create_nm</a>
118 <li><a href="#gmi_var_delete">gmi_var_delete</a>
119 <li><a href="#gmi_var_evaluate_expression">gmi_var_evaluate_expression</a>
120 <li><a href="#gmi_var_info_expression">gmi_var_info_expression</a>
121 <li><a href="#gmi_var_info_num_children">gmi_var_info_num_children</a>
122 <li><a href="#gmi_var_info_type">gmi_var_info_type</a>
123 <li><a href="#gmi_var_list_children">gmi_var_list_children</a>
124 <li><a href="#gmi_var_set_format">gmi_var_set_format</a>
125 <li><a href="#gmi_var_show_attributes">gmi_var_show_attributes</a>
126 <li><a href="#gmi_var_show_format">gmi_var_show_format</a>
127 <li><a href="#gmi_var_update">gmi_var_update</a>
128 <li><a href="#GoTo (MIDebugger)">GoTo (MIDebugger)</a>
129 <li><a href="#GoTo (MIDebugger) <1>">GoTo (MIDebugger) <1></a>
130 <li><a href="#Kill (MIDebugger)">Kill (MIDebugger)</a>
131 <li><a href="#mi_connect_local">mi_connect_local</a>
132 <li><a href="#mi_disconnect">mi_disconnect</a>
133 <li><a href="#mi_force_version">mi_force_version</a>
134 <li><a href="#mi_get_error_str">mi_get_error_str</a>
135 <li><a href="#mi_get_workaround">mi_get_workaround</a>
136 <li><a href="#mi_look_for_free_pty">mi_look_for_free_pty</a>
137 <li><a href="#mi_look_for_free_vt">mi_look_for_free_vt</a>
138 <li><a href="#mi_set_workaround">mi_set_workaround</a>
139 <li><a href="#MIDebugger (MIDebugger)">MIDebugger (MIDebugger)</a>
140 <li><a href="#ModifyExpression (MIDebugger)">ModifyExpression (MIDebugger)</a>
141 <li><a href="#Poll (MIDebugger)">Poll (MIDebugger)</a>
142 <li><a href="#ReturnNow (MIDebugger)">ReturnNow (MIDebugger)</a>
143 <li><a href="#Run (MIDebugger)">Run (MIDebugger)</a>
144 <li><a href="#RunOrContinue (MIDebugger)">RunOrContinue (MIDebugger)</a>
145 <li><a href="#RunToMain (MIDebugger)">RunToMain (MIDebugger)</a>
146 <li><a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux (MIDebugger)</a>
147 <li><a href="#SelectTargetPID (MIDebugger)">SelectTargetPID (MIDebugger)</a>
148 <li><a href="#SelectTargetRemote (MIDebugger)">SelectTargetRemote (MIDebugger)</a>
149 <li><a href="#SelectTargetTTY (MIDebugger)">SelectTargetTTY (MIDebugger)</a>
150 <li><a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11 (MIDebugger)</a>
151 <li><a href="#Send (MIDebugger)">Send (MIDebugger)</a>
152 <li><a href="#StepOver (MIDebugger)">StepOver (MIDebugger)</a>
153 <li><a href="#Stop (MIDebugger)">Stop (MIDebugger)</a>
154 <li><a href="#TargetUnselect (MIDebugger)">TargetUnselect (MIDebugger)</a>
155 <li><a href="#TraceInto (MIDebugger)">TraceInto (MIDebugger)</a>
156 <li><a href="#WatchDelete (MIDebugger)">WatchDelete (MIDebugger)</a>
157 <li><a href="#Watchpoint (MIDebugger)">Watchpoint (MIDebugger)</a>
158 <li><a href="#~MIDebugger (MIDebugger)">~MIDebugger (MIDebugger)</a>
164 <a name="Classes"></a>
168 <li><a href="#MIDebugger (class)">MIDebugger</a>
173 <a name="MIDebugger (class)"></a>
179 <li><a href="#BreakDelete (MIDebugger)">BreakDelete (MIDebugger)</a>
180 <li><a href="#Breakpoint (MIDebugger)">Breakpoint (MIDebugger)</a>
181 <li><a href="#Breakpoint (MIDebugger) <1>">Breakpoint (MIDebugger) <1></a>
182 <li><a href="#BreakpointFull (MIDebugger)">BreakpointFull (MIDebugger)</a>
183 <li><a href="#CallStack (MIDebugger)">CallStack (MIDebugger)</a>
184 <li><a href="#Connect (MIDebugger)">Connect (MIDebugger)</a>
185 <li><a href="#Continue (MIDebugger)">Continue (MIDebugger)</a>
186 <li><a href="#Disconnect (MIDebugger)">Disconnect (MIDebugger)</a>
187 <li><a href="#EvalExpression (MIDebugger)">EvalExpression (MIDebugger)</a>
188 <li><a href="#FillTypeVal (MIDebugger)">FillTypeVal (MIDebugger)</a>
189 <li><a href="#FinishFun (MIDebugger)">FinishFun (MIDebugger)</a>
190 <li><a href="#GoTo (MIDebugger)">GoTo (MIDebugger)</a>
191 <li><a href="#GoTo (MIDebugger) <1>">GoTo (MIDebugger) <1></a>
192 <li><a href="#Kill (MIDebugger)">Kill (MIDebugger)</a>
193 <li><a href="#MIDebugger (MIDebugger)">MIDebugger (MIDebugger)</a>
194 <li><a href="#ModifyExpression (MIDebugger)">ModifyExpression (MIDebugger)</a>
195 <li><a href="#Poll (MIDebugger)">Poll (MIDebugger)</a>
196 <li><a href="#ReturnNow (MIDebugger)">ReturnNow (MIDebugger)</a>
197 <li><a href="#Run (MIDebugger)">Run (MIDebugger)</a>
198 <li><a href="#RunOrContinue (MIDebugger)">RunOrContinue (MIDebugger)</a>
199 <li><a href="#RunToMain (MIDebugger)">RunToMain (MIDebugger)</a>
200 <li><a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux (MIDebugger)</a>
201 <li><a href="#SelectTargetPID (MIDebugger)">SelectTargetPID (MIDebugger)</a>
202 <li><a href="#SelectTargetRemote (MIDebugger)">SelectTargetRemote (MIDebugger)</a>
203 <li><a href="#SelectTargetTTY (MIDebugger)">SelectTargetTTY (MIDebugger)</a>
204 <li><a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11 (MIDebugger)</a>
205 <li><a href="#Send (MIDebugger)">Send (MIDebugger)</a>
206 <li><a href="#StepOver (MIDebugger)">StepOver (MIDebugger)</a>
207 <li><a href="#Stop (MIDebugger)">Stop (MIDebugger)</a>
208 <li><a href="#TargetUnselect (MIDebugger)">TargetUnselect (MIDebugger)</a>
209 <li><a href="#TraceInto (MIDebugger)">TraceInto (MIDebugger)</a>
210 <li><a href="#WatchDelete (MIDebugger)">WatchDelete (MIDebugger)</a>
211 <li><a href="#Watchpoint (MIDebugger)">Watchpoint (MIDebugger)</a>
212 <li><a href="#~MIDebugger (MIDebugger)">~MIDebugger (MIDebugger)</a>
218 <a name="Modules"></a>
222 <li><a href="#Allocator.">Allocator.</a>
223 <li><a href="#Breakpoint table commands.">Breakpoint table commands.</a>
224 <li><a href="#C++ Interface.">C++ Interface.</a>
225 <li><a href="#Connect.">Connect.</a>
226 <li><a href="#Data manipulation.">Data manipulation.</a>
229 Translates error numbers into messages.">Error.
231 Translates error numbers into messages.</a>
232 <li><a href="#Linux VT.">Linux VT.</a>
233 <li><a href="#Miscellaneous commands.">Miscellaneous commands.</a>
234 <li><a href="#Parser.">Parser.</a>
235 <li><a href="#Program control.">Program control.</a>
236 <li><a href="#pseudo terminal">pseudo terminal</a>
237 <li><a href="#Stack manipulation.">Stack manipulation.</a>
238 <li><a href="#Symbol query.">Symbol query.</a>
239 <li><a href="#Target manipulation.">Target manipulation.</a>
240 <li><a href="#Thread commands.">Thread commands.</a>
241 <li><a href="#Variable objects.">Variable objects.</a>
246 <a name="Allocator."></a>
249 Most alloc/free routines are here. Free routines must accept NULL
250 pointers. Alloc functions must set mi_error.
260 <a name="Breakpoint table commands."></a>
261 <H1>Breakpoint table commands.</H1>
263 GDB/MI commands for the "Breakpoint Table Commands" section.
268 gdb command: Implemented?
275 -break-info N.A. (info break NUMBER) (*)
281 (*) I think the program should keep track of the breakpoints, so it will
282 be implemented when I have more time.
287 <li><a href="#gmi_break_delete">gmi_break_delete</a>
288 <li><a href="#gmi_break_insert">gmi_break_insert</a>
289 <li><a href="#gmi_break_insert_full">gmi_break_insert_full</a>
290 <li><a href="#gmi_break_insert_full_fl">gmi_break_insert_full_fl</a>
291 <li><a href="#gmi_break_set_condition">gmi_break_set_condition</a>
292 <li><a href="#gmi_break_set_times">gmi_break_set_times</a>
293 <li><a href="#gmi_break_state">gmi_break_state</a>
294 <li><a href="#gmi_break_watch">gmi_break_watch</a>
300 <a name="C++ Interface."></a>
301 <H1>C++ Interface.</H1>
303 Implements a very simple (naive ;-) C++ wrapper.
308 <li><a href="#BreakDelete (MIDebugger)">BreakDelete (MIDebugger)</a>
309 <li><a href="#Breakpoint (MIDebugger)">Breakpoint (MIDebugger)</a>
310 <li><a href="#Breakpoint (MIDebugger) <1>">Breakpoint (MIDebugger) <1></a>
311 <li><a href="#BreakpointFull (MIDebugger)">BreakpointFull (MIDebugger)</a>
312 <li><a href="#CallStack (MIDebugger)">CallStack (MIDebugger)</a>
313 <li><a href="#Connect (MIDebugger)">Connect (MIDebugger)</a>
314 <li><a href="#Continue (MIDebugger)">Continue (MIDebugger)</a>
315 <li><a href="#Disconnect (MIDebugger)">Disconnect (MIDebugger)</a>
316 <li><a href="#EvalExpression (MIDebugger)">EvalExpression (MIDebugger)</a>
317 <li><a href="#FillTypeVal (MIDebugger)">FillTypeVal (MIDebugger)</a>
318 <li><a href="#FinishFun (MIDebugger)">FinishFun (MIDebugger)</a>
319 <li><a href="#GoTo (MIDebugger)">GoTo (MIDebugger)</a>
320 <li><a href="#GoTo (MIDebugger) <1>">GoTo (MIDebugger) <1></a>
321 <li><a href="#Kill (MIDebugger)">Kill (MIDebugger)</a>
322 <li><a href="#MIDebugger (MIDebugger)">MIDebugger (MIDebugger)</a>
323 <li><a href="#ModifyExpression (MIDebugger)">ModifyExpression (MIDebugger)</a>
324 <li><a href="#Poll (MIDebugger)">Poll (MIDebugger)</a>
325 <li><a href="#ReturnNow (MIDebugger)">ReturnNow (MIDebugger)</a>
326 <li><a href="#Run (MIDebugger)">Run (MIDebugger)</a>
327 <li><a href="#RunOrContinue (MIDebugger)">RunOrContinue (MIDebugger)</a>
328 <li><a href="#RunToMain (MIDebugger)">RunToMain (MIDebugger)</a>
329 <li><a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux (MIDebugger)</a>
330 <li><a href="#SelectTargetPID (MIDebugger)">SelectTargetPID (MIDebugger)</a>
331 <li><a href="#SelectTargetRemote (MIDebugger)">SelectTargetRemote (MIDebugger)</a>
332 <li><a href="#SelectTargetTTY (MIDebugger)">SelectTargetTTY (MIDebugger)</a>
333 <li><a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11 (MIDebugger)</a>
334 <li><a href="#Send (MIDebugger)">Send (MIDebugger)</a>
335 <li><a href="#StepOver (MIDebugger)">StepOver (MIDebugger)</a>
336 <li><a href="#Stop (MIDebugger)">Stop (MIDebugger)</a>
337 <li><a href="#TargetUnselect (MIDebugger)">TargetUnselect (MIDebugger)</a>
338 <li><a href="#TraceInto (MIDebugger)">TraceInto (MIDebugger)</a>
339 <li><a href="#WatchDelete (MIDebugger)">WatchDelete (MIDebugger)</a>
340 <li><a href="#Watchpoint (MIDebugger)">Watchpoint (MIDebugger)</a>
341 <li><a href="#~MIDebugger (MIDebugger)">~MIDebugger (MIDebugger)</a>
347 <a name="Connect."></a>
350 This module handles the dialog with gdb, including starting and stopping
355 GDB Bug workaround for "file -readnow": I tried to workaround a bug using
356 it but looks like this option also have bugs!!!! so I have to use the
357 command line option --readnow.
358 It also have a bug!!!! when the binary is changed and gdb must reload it
359 this option is ignored. So it looks like we have no solution but 3 gdb bugs
363 <li><a href="#gmi_end_aux_term">gmi_end_aux_term</a>
364 <li><a href="#gmi_start_xterm">gmi_start_xterm</a>
365 <li><a href="#mi_connect_local">mi_connect_local</a>
366 <li><a href="#mi_disconnect">mi_disconnect</a>
367 <li><a href="#mi_force_version">mi_force_version</a>
368 <li><a href="#mi_get_workaround">mi_get_workaround</a>
369 <li><a href="#mi_set_workaround">mi_set_workaround</a>
375 <a name="Data manipulation."></a>
376 <H1>Data manipulation.</H1>
378 GDB/MI commands for the "Data manipulation" section.
383 gdb command: Implemented?
385 -data-disassemble Yes
386 -data-evaluate-expression Yes
387 -data-list-changed-registers No
388 -data-list-register-names Yes
389 -data-list-register-values No
391 -display-delete N.A. (delete display)
392 -display-disable N.A. (disable display)
393 -display-enable N.A. (enable display)
394 -display-insert N.A. (display)
395 -display-list N.A. (info display)
397 -environment-directory Yes, MI v1 implementation
405 1) -display* aren't implemented. You can use CLI command display, but the
406 results are sent to the console. So it looks like the best is to manually
407 use -data-evaluate-expression to emulate it.
411 2) GDB bug mi/1770: Affects gdb<=6.2, when you ask for the names of the
412 registers you get it plus the name of the "pseudo-registers", but if you
413 try to get the value of a pseudo-register you get an error saying the
414 register number is invalid. I reported to gdb-patches@sources.redhat.com
415 on 2004/08/25 and as I didn't get any answer I filled a bug report on
416 2004/09/02. The patch to fix this annoying bug is:
418 Index: gdb/mi/mi-main.c
419 ===================================================================
420 RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
421 retrieving revision 1.64
422 diff -u -r1.64 mi-main.c
423 --- gdb/mi/mi-main.c 3 Aug 2004 00:57:27 -0000 1.64
424 +++ gdb/mi/mi-main.c 25 Aug 2004 14:12:50 -0000
426 case, some entries of REGISTER_NAME will change depending upon
427 the particular processor being debugged.
429 - numregs = NUM_REGS;
430 + numregs = NUM_REGS + NUM_PSEUDO_REGS;
436 Note I had to remove an end of comment in the patch to include it here.
437 This bug forced me to create another set of functions. The only way is to
438 first get the values and then the names.
439 Fixed by Changelog entry:
441 2004-09-12 Salvador E. Tropea <set@users.sf.net>
442 Andrew Cagney <cagney@gnu.org>
444 * mi/mi-main.c (mi_cmd_data_list_changed_registers)
445 (mi_cmd_data_list_register_values)
446 (mi_cmd_data_write_register_values): Include the PSEUDO_REGS in
447 the register number computation.
450 <li><a href="#gmi_data_evaluate_expression">gmi_data_evaluate_expression</a>
451 <li><a href="#gmi_dir">gmi_dir</a>
459 Translates error numbers into messages."></a>
462 Translates error numbers into messages.</H1>
467 <li><a href="#mi_get_error_str">mi_get_error_str</a>
473 <a name="Linux VT."></a>
476 Helper to find a free VT. That's 100% Linux specific.
479 The code comes from "lconsole.c" from Allegro project and was originally
480 created by Marek Habersack and then modified by George Foot. I addapted it
481 to my needs and changed license from giftware to GPL.
486 <li><a href="#gmi_look_for_free_vt">gmi_look_for_free_vt</a>
487 <li><a href="#mi_look_for_free_vt">mi_look_for_free_vt</a>
493 <a name="Miscellaneous commands."></a>
494 <H1>Miscellaneous commands.</H1>
496 GDB/MI commands for the "Miscellaneous Commands" section.
501 gdb command: Implemented?
510 <li><a href="#gmi_gdb_exit">gmi_gdb_exit</a>
511 <li><a href="#gmi_gdb_set">gmi_gdb_set</a>
512 <li><a href="#gmi_gdb_show">gmi_gdb_show</a>
513 <li><a href="#gmi_gdb_version">gmi_gdb_version</a>
519 <a name="Parser."></a>
522 Parses the output of gdb. It basically converts the text from gdb into a
523 tree (could be a complex one) that we can easily interpret using C code.
531 <a name="Program control."></a>
532 <H1>Program control.</H1>
534 GDB/MI commands for the "Program Control" section.
539 gdb command: Implemented?
541 -exec-abort N.A. (*) (kill, but with non-interactive options)
543 -exec-continue Yes ASYNC
544 -exec-finish Yes ASYNC
545 -exec-interrupt Yes ASYNC
547 -exec-next-instruction Yes ASYNC
550 -exec-show-arguments N.A. (show args) see gmi_stack_info_frame
552 -exec-step-instruction Yes ASYNC
553 -exec-until Yes ASYNC
554 -file-exec-and-symbols Yes
556 -file-list-exec-sections N.A. (info file)
557 -file-list-exec-source-files N.A.
558 -file-list-shared-libraries N.A.
559 -file-list-symbol-files N.A.
560 -file-symbol-file Yes
563 (*) gmi_exec_kill implements it, but you should ensure that
564 gmi_gdb_set("confirm","off") was called.
568 GDB Bug workaround for -file-exec-and-symbols and -file-symbol-file: This
569 is complex, but a real bug. When you set a breakpoint you never know the
570 name of the file as it appears in the debug info. So you can be specifying
571 an absolute file name or a relative file name. The reference point could be
572 different than the one used in the debug info. To solve all the combinations
573 gdb does a search trying various combinations. GDB isn't very smart so you
574 must at least specify the working directory and the directory where the
575 binary is located to get a good chance (+ user options to solve the rest).
576 Once you did it gdb can find the file by doing transformations to the
577 "canonical" filename. This search works OK for already loaded symtabs
578 (symbol tables), but it have a bug when the search is done for psymtabs
579 (partial symtabs). The bug is in the use of source_full_path_of (source.c).
580 This function calls openp indicating try_cwd_first. It makes the search file
581 if the psymtab file name have at least one dirseparator. It means that
582 psymtabs for files compiled with relative paths will fail. The search for
583 symtabs uses symtab_to_filename, it calls open_source_file which finally
584 calls openp without try_cwd_first.<br>
585 To workaround this bug we must ensure gdb loads *all* the symtabs to memory.
586 And here comes another problem -file-exec-and-symbols doesn't support it
587 according to docs. In real life that's a wrapper for "file", but as nobody
588 can say it won't change we must use the CLI command.
591 <li><a href="#gmi_exec_continue">gmi_exec_continue</a>
592 <li><a href="#gmi_exec_finish">gmi_exec_finish</a>
593 <li><a href="#gmi_exec_interrupt">gmi_exec_interrupt</a>
594 <li><a href="#gmi_exec_kill">gmi_exec_kill</a>
595 <li><a href="#gmi_exec_next">gmi_exec_next</a>
596 <li><a href="#gmi_exec_next_cnt">gmi_exec_next_cnt</a>
597 <li><a href="#gmi_exec_next_instruction">gmi_exec_next_instruction</a>
598 <li><a href="#gmi_exec_return">gmi_exec_return</a>
599 <li><a href="#gmi_exec_run">gmi_exec_run</a>
600 <li><a href="#gmi_exec_step">gmi_exec_step</a>
601 <li><a href="#gmi_exec_step_cnt">gmi_exec_step_cnt</a>
602 <li><a href="#gmi_exec_step_instruction">gmi_exec_step_instruction</a>
603 <li><a href="#gmi_exec_until">gmi_exec_until</a>
604 <li><a href="#gmi_exec_until_addr">gmi_exec_until_addr</a>
605 <li><a href="#gmi_file_symbol_file">gmi_file_symbol_file</a>
606 <li><a href="#gmi_set_exec">gmi_set_exec</a>
607 <li><a href="#gmi_target_terminal">gmi_target_terminal</a>
613 <a name="pseudo terminal"></a>
614 <H1>pseudo terminal</H1>
616 Helper to find a free pseudo terminal. Use this if you need to manage
617 input *and* output to the target process. If you just need output then
618 define a handler for target output stream records (assuming that this
619 is working for your particular version of gdb).
622 mi_pty *pty = gmi_look_for_free_pty();
623 if (pty) gmi_target_terminal(mih, pty->slave);
625 * reading from pty->master will get stdout from target *
626 * writing to pty->master will send to target stdin *
628 Note: Contributed by Greg Watson (gwatson lanl gov)
631 <li><a href="#gmi_end_pty">gmi_end_pty</a>
632 <li><a href="#gmi_look_for_free_pty">gmi_look_for_free_pty</a>
633 <li><a href="#mi_look_for_free_pty">mi_look_for_free_pty</a>
639 <a name="Stack manipulation."></a>
640 <H1>Stack manipulation.</H1>
642 GDB/MI commands for the "Stack Manipulation" section.
647 gdb command: Implemented?
649 -stack-info-frame Yes, implemented as "frame"
650 -stack-info-depth Yes
651 -stack-list-arguments Yes
652 -stack-list-frames Yes
653 -stack-list-locals Yes
654 -stack-select-frame Yes
658 <li><a href="#gmi_stack_info_depth">gmi_stack_info_depth</a>
659 <li><a href="#gmi_stack_info_depth_get">gmi_stack_info_depth_get</a>
660 <li><a href="#gmi_stack_info_frame">gmi_stack_info_frame</a>
661 <li><a href="#gmi_stack_list_arguments">gmi_stack_list_arguments</a>
662 <li><a href="#gmi_stack_list_arguments_r">gmi_stack_list_arguments_r</a>
663 <li><a href="#gmi_stack_list_frames">gmi_stack_list_frames</a>
664 <li><a href="#gmi_stack_list_frames_r">gmi_stack_list_frames_r</a>
665 <li><a href="#gmi_stack_list_locals">gmi_stack_list_locals</a>
666 <li><a href="#gmi_stack_select_frame">gmi_stack_select_frame</a>
672 <a name="Symbol query."></a>
673 <H1>Symbol query.</H1>
675 GDB/MI commands for the "Symbol Query" section.
680 gdb command: Implemented?
681 -symbol-info-address N.A. (info address, human readable)
682 -symbol-info-file N.A.
683 -symbol-info-function N.A.
684 -symbol-info-line N.A. (info line, human readable)
685 -symbol-info-symbol N.A. (info symbol, human readable)
686 -symbol-list-functions N.A. (info functions, human readable)
687 -symbol-list-types N.A. (info types, human readable)
688 -symbol-list-variables N.A. (info variables, human readable)
689 -symbol-list-lines No (gdb 6.x)
691 -symbol-type N.A. (ptype, human readable)
698 Only one is implemented and not in gdb 5.x.
708 <a name="Target manipulation."></a>
709 <H1>Target manipulation.</H1>
711 GDB/MI commands for the "Target Manipulation" section.
716 -target-attach Yes (implemented using attach)
717 -target-compare-sections N.A. (compare-sections)
720 -target-exec-status N.A.
721 -target-list-available-targets N.A. (help target)
722 -target-list-current-targets N.A. (info file among other things)
723 -target-list-parameters N.A.
728 <li><a href="#gmi_target_attach">gmi_target_attach</a>
729 <li><a href="#gmi_target_detach">gmi_target_detach</a>
730 <li><a href="#gmi_target_select">gmi_target_select</a>
736 <a name="Thread commands."></a>
737 <H1>Thread commands.</H1>
739 GDB/MI commands for the "Thread Commands" section.
744 gdb command: Implemented?
746 -thread-list-all-threads Yes, implemented as "info threads"
752 <li><a href="#gmi_thread_list_all_threads">gmi_thread_list_all_threads</a>
753 <li><a href="#gmi_thread_list_ids">gmi_thread_list_ids</a>
754 <li><a href="#gmi_thread_select">gmi_thread_select</a>
760 <a name="Variable objects."></a>
761 <H1>Variable objects.</H1>
763 GDB/MI commands for the "Variable Objects" section.
768 gdb command: Imp? Description:
769 -var-create Yes create a variable object
770 -var-delete Yes delete the variable object and its children
771 -var-set-format Yes set the display format of this variable
772 -var-show-format Yes show the display format of this variable
773 -var-info-num-children Yes tells how many children this object has
774 -var-list-children Yes* return a list of the object's children
775 -var-info-type Yes show the type of this variable object
776 -var-info-expression Yes print what this variable object represents
777 -var-show-attributes Yes is this variable editable?
778 -var-evaluate-expression Yes get the value of this variable
779 -var-assign Yes set the value of this variable
780 -var-update Yes* update the variable and its children
786 1) I suggest letting gdb to choose the names for the variables.<br>
787 2) -var-list-children supports an optional "show values" argument in MI v2.
788 It isn't implemented.<br>
793 * MI v1 and v2 result formats supported.
798 <li><a href="#gmi_full_var_create">gmi_full_var_create</a>
799 <li><a href="#gmi_var_assign">gmi_var_assign</a>
800 <li><a href="#gmi_var_create">gmi_var_create</a>
801 <li><a href="#gmi_var_create_nm">gmi_var_create_nm</a>
802 <li><a href="#gmi_var_delete">gmi_var_delete</a>
803 <li><a href="#gmi_var_evaluate_expression">gmi_var_evaluate_expression</a>
804 <li><a href="#gmi_var_info_expression">gmi_var_info_expression</a>
805 <li><a href="#gmi_var_info_num_children">gmi_var_info_num_children</a>
806 <li><a href="#gmi_var_info_type">gmi_var_info_type</a>
807 <li><a href="#gmi_var_list_children">gmi_var_list_children</a>
808 <li><a href="#gmi_var_set_format">gmi_var_set_format</a>
809 <li><a href="#gmi_var_show_attributes">gmi_var_show_attributes</a>
810 <li><a href="#gmi_var_show_format">gmi_var_show_format</a>
811 <li><a href="#gmi_var_update">gmi_var_update</a>
821 <li><a href="#breakpoint.c">breakpoint.c</a>
822 <li><a href="#connect.c">connect.c</a>
823 <li><a href="#cpp_int.cc">cpp_int.cc</a>
824 <li><a href="#data_man.c">data_man.c</a>
825 <li><a href="#error.c">error.c</a>
826 <li><a href="#get_free_pty.c">get_free_pty.c</a>
827 <li><a href="#get_free_vt.c">get_free_vt.c</a>
828 <li><a href="#misc.c">misc.c</a>
829 <li><a href="#prg_control.c">prg_control.c</a>
830 <li><a href="#stack_man.c">stack_man.c</a>
831 <li><a href="#target_man.c">target_man.c</a>
832 <li><a href="#thread.c">thread.c</a>
833 <li><a href="#var_obj.c">var_obj.c</a>
838 <a name="breakpoint.c"></a>
839 <H1>breakpoint.c</H1>
844 <li><a href="#gmi_break_delete">gmi_break_delete</a>
845 <li><a href="#gmi_break_insert">gmi_break_insert</a>
846 <li><a href="#gmi_break_insert_full">gmi_break_insert_full</a>
847 <li><a href="#gmi_break_insert_full_fl">gmi_break_insert_full_fl</a>
848 <li><a href="#gmi_break_set_condition">gmi_break_set_condition</a>
849 <li><a href="#gmi_break_set_times">gmi_break_set_times</a>
850 <li><a href="#gmi_break_state">gmi_break_state</a>
851 <li><a href="#gmi_break_watch">gmi_break_watch</a>
857 <a name="connect.c"></a>
863 <li><a href="#gmi_end_aux_term">gmi_end_aux_term</a>
864 <li><a href="#gmi_start_xterm">gmi_start_xterm</a>
865 <li><a href="#mi_connect_local">mi_connect_local</a>
866 <li><a href="#mi_disconnect">mi_disconnect</a>
867 <li><a href="#mi_force_version">mi_force_version</a>
868 <li><a href="#mi_get_workaround">mi_get_workaround</a>
869 <li><a href="#mi_set_workaround">mi_set_workaround</a>
875 <a name="cpp_int.cc"></a>
881 <li><a href="#BreakDelete (MIDebugger)">BreakDelete (MIDebugger)</a>
882 <li><a href="#Breakpoint (MIDebugger)">Breakpoint (MIDebugger)</a>
883 <li><a href="#Breakpoint (MIDebugger) <1>">Breakpoint (MIDebugger) <1></a>
884 <li><a href="#BreakpointFull (MIDebugger)">BreakpointFull (MIDebugger)</a>
885 <li><a href="#CallStack (MIDebugger)">CallStack (MIDebugger)</a>
886 <li><a href="#Connect (MIDebugger)">Connect (MIDebugger)</a>
887 <li><a href="#Continue (MIDebugger)">Continue (MIDebugger)</a>
888 <li><a href="#Disconnect (MIDebugger)">Disconnect (MIDebugger)</a>
889 <li><a href="#EvalExpression (MIDebugger)">EvalExpression (MIDebugger)</a>
890 <li><a href="#FillTypeVal (MIDebugger)">FillTypeVal (MIDebugger)</a>
891 <li><a href="#FinishFun (MIDebugger)">FinishFun (MIDebugger)</a>
892 <li><a href="#GoTo (MIDebugger)">GoTo (MIDebugger)</a>
893 <li><a href="#GoTo (MIDebugger) <1>">GoTo (MIDebugger) <1></a>
894 <li><a href="#Kill (MIDebugger)">Kill (MIDebugger)</a>
895 <li><a href="#MIDebugger (MIDebugger)">MIDebugger (MIDebugger)</a>
896 <li><a href="#ModifyExpression (MIDebugger)">ModifyExpression (MIDebugger)</a>
897 <li><a href="#Poll (MIDebugger)">Poll (MIDebugger)</a>
898 <li><a href="#ReturnNow (MIDebugger)">ReturnNow (MIDebugger)</a>
899 <li><a href="#Run (MIDebugger)">Run (MIDebugger)</a>
900 <li><a href="#RunOrContinue (MIDebugger)">RunOrContinue (MIDebugger)</a>
901 <li><a href="#RunToMain (MIDebugger)">RunToMain (MIDebugger)</a>
902 <li><a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux (MIDebugger)</a>
903 <li><a href="#SelectTargetPID (MIDebugger)">SelectTargetPID (MIDebugger)</a>
904 <li><a href="#SelectTargetRemote (MIDebugger)">SelectTargetRemote (MIDebugger)</a>
905 <li><a href="#SelectTargetTTY (MIDebugger)">SelectTargetTTY (MIDebugger)</a>
906 <li><a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11 (MIDebugger)</a>
907 <li><a href="#Send (MIDebugger)">Send (MIDebugger)</a>
908 <li><a href="#StepOver (MIDebugger)">StepOver (MIDebugger)</a>
909 <li><a href="#Stop (MIDebugger)">Stop (MIDebugger)</a>
910 <li><a href="#TargetUnselect (MIDebugger)">TargetUnselect (MIDebugger)</a>
911 <li><a href="#TraceInto (MIDebugger)">TraceInto (MIDebugger)</a>
912 <li><a href="#WatchDelete (MIDebugger)">WatchDelete (MIDebugger)</a>
913 <li><a href="#Watchpoint (MIDebugger)">Watchpoint (MIDebugger)</a>
914 <li><a href="#~MIDebugger (MIDebugger)">~MIDebugger (MIDebugger)</a>
920 <a name="data_man.c"></a>
926 <li><a href="#gmi_data_evaluate_expression">gmi_data_evaluate_expression</a>
927 <li><a href="#gmi_dir">gmi_dir</a>
933 <a name="error.c"></a>
939 <li><a href="#mi_get_error_str">mi_get_error_str</a>
945 <a name="get_free_pty.c"></a>
946 <H1>get_free_pty.c</H1>
951 <li><a href="#gmi_end_pty">gmi_end_pty</a>
952 <li><a href="#gmi_look_for_free_pty">gmi_look_for_free_pty</a>
953 <li><a href="#mi_look_for_free_pty">mi_look_for_free_pty</a>
959 <a name="get_free_vt.c"></a>
960 <H1>get_free_vt.c</H1>
965 <li><a href="#gmi_look_for_free_vt">gmi_look_for_free_vt</a>
966 <li><a href="#mi_look_for_free_vt">mi_look_for_free_vt</a>
972 <a name="misc.c"></a>
978 <li><a href="#gmi_gdb_exit">gmi_gdb_exit</a>
979 <li><a href="#gmi_gdb_set">gmi_gdb_set</a>
980 <li><a href="#gmi_gdb_show">gmi_gdb_show</a>
981 <li><a href="#gmi_gdb_version">gmi_gdb_version</a>
987 <a name="prg_control.c"></a>
988 <H1>prg_control.c</H1>
993 <li><a href="#gmi_exec_continue">gmi_exec_continue</a>
994 <li><a href="#gmi_exec_finish">gmi_exec_finish</a>
995 <li><a href="#gmi_exec_interrupt">gmi_exec_interrupt</a>
996 <li><a href="#gmi_exec_kill">gmi_exec_kill</a>
997 <li><a href="#gmi_exec_next">gmi_exec_next</a>
998 <li><a href="#gmi_exec_next_cnt">gmi_exec_next_cnt</a>
999 <li><a href="#gmi_exec_next_instruction">gmi_exec_next_instruction</a>
1000 <li><a href="#gmi_exec_return">gmi_exec_return</a>
1001 <li><a href="#gmi_exec_run">gmi_exec_run</a>
1002 <li><a href="#gmi_exec_step">gmi_exec_step</a>
1003 <li><a href="#gmi_exec_step_cnt">gmi_exec_step_cnt</a>
1004 <li><a href="#gmi_exec_step_instruction">gmi_exec_step_instruction</a>
1005 <li><a href="#gmi_exec_until">gmi_exec_until</a>
1006 <li><a href="#gmi_exec_until_addr">gmi_exec_until_addr</a>
1007 <li><a href="#gmi_file_symbol_file">gmi_file_symbol_file</a>
1008 <li><a href="#gmi_set_exec">gmi_set_exec</a>
1009 <li><a href="#gmi_target_terminal">gmi_target_terminal</a>
1015 <a name="stack_man.c"></a>
1016 <H1>stack_man.c</H1>
1021 <li><a href="#gmi_stack_info_depth">gmi_stack_info_depth</a>
1022 <li><a href="#gmi_stack_info_depth_get">gmi_stack_info_depth_get</a>
1023 <li><a href="#gmi_stack_info_frame">gmi_stack_info_frame</a>
1024 <li><a href="#gmi_stack_list_arguments">gmi_stack_list_arguments</a>
1025 <li><a href="#gmi_stack_list_arguments_r">gmi_stack_list_arguments_r</a>
1026 <li><a href="#gmi_stack_list_frames">gmi_stack_list_frames</a>
1027 <li><a href="#gmi_stack_list_frames_r">gmi_stack_list_frames_r</a>
1028 <li><a href="#gmi_stack_list_locals">gmi_stack_list_locals</a>
1029 <li><a href="#gmi_stack_select_frame">gmi_stack_select_frame</a>
1035 <a name="target_man.c"></a>
1036 <H1>target_man.c</H1>
1041 <li><a href="#gmi_target_attach">gmi_target_attach</a>
1042 <li><a href="#gmi_target_detach">gmi_target_detach</a>
1043 <li><a href="#gmi_target_select">gmi_target_select</a>
1049 <a name="thread.c"></a>
1055 <li><a href="#gmi_thread_list_all_threads">gmi_thread_list_all_threads</a>
1056 <li><a href="#gmi_thread_list_ids">gmi_thread_list_ids</a>
1057 <li><a href="#gmi_thread_select">gmi_thread_select</a>
1063 <a name="var_obj.c"></a>
1069 <li><a href="#gmi_full_var_create">gmi_full_var_create</a>
1070 <li><a href="#gmi_var_assign">gmi_var_assign</a>
1071 <li><a href="#gmi_var_create">gmi_var_create</a>
1072 <li><a href="#gmi_var_create_nm">gmi_var_create_nm</a>
1073 <li><a href="#gmi_var_delete">gmi_var_delete</a>
1074 <li><a href="#gmi_var_evaluate_expression">gmi_var_evaluate_expression</a>
1075 <li><a href="#gmi_var_info_expression">gmi_var_info_expression</a>
1076 <li><a href="#gmi_var_info_num_children">gmi_var_info_num_children</a>
1077 <li><a href="#gmi_var_info_type">gmi_var_info_type</a>
1078 <li><a href="#gmi_var_list_children">gmi_var_list_children</a>
1079 <li><a href="#gmi_var_set_format">gmi_var_set_format</a>
1080 <li><a href="#gmi_var_show_attributes">gmi_var_show_attributes</a>
1081 <li><a href="#gmi_var_show_format">gmi_var_show_format</a>
1082 <li><a href="#gmi_var_update">gmi_var_update</a>
1088 <a name="Command"></a>
1092 <li><a href="#-break-after">-break-after</a>
1093 <li><a href="#-break-condition">-break-condition</a>
1094 <li><a href="#-break-delete">-break-delete</a>
1095 <li><a href="#-break-enable + -break-disable">-break-enable + -break-disable</a>
1096 <li><a href="#-break-insert">-break-insert</a>
1097 <li><a href="#-break-insert [ops] file:line">-break-insert [ops] file:line</a>
1098 <li><a href="#-break-insert file:line">-break-insert file:line</a>
1099 <li><a href="#-break-watch">-break-watch</a>
1100 <li><a href="#-data-evaluate-expression">-data-evaluate-expression</a>
1101 <li><a href="#-environment-directory">-environment-directory</a>
1102 <li><a href="#-exec-abort [using kill]">-exec-abort [using kill]</a>
1103 <li><a href="#-exec-continue">-exec-continue</a>
1104 <li><a href="#-exec-finish">-exec-finish</a>
1105 <li><a href="#-exec-interrupt [replacement]">-exec-interrupt [replacement]</a>
1106 <li><a href="#-exec-next">-exec-next</a>
1107 <li><a href="#-exec-next count">-exec-next count</a>
1108 <li><a href="#-exec-next-instruction">-exec-next-instruction</a>
1109 <li><a href="#-exec-return">-exec-return</a>
1110 <li><a href="#-exec-run">-exec-run</a>
1111 <li><a href="#-exec-step">-exec-step</a>
1112 <li><a href="#-exec-step count">-exec-step count</a>
1113 <li><a href="#-exec-step-instruction">-exec-step-instruction</a>
1114 <li><a href="#-exec-until">-exec-until</a>
1115 <li><a href="#-exec-until (using *address)">-exec-until (using *address)</a>
1116 <li><a href="#-file-exec-and-symbols + -exec-arguments">-file-exec-and-symbols + -exec-arguments</a>
1117 <li><a href="#-file-symbol-file">-file-symbol-file</a>
1118 <li><a href="#-gdb-exit">-gdb-exit</a>
1119 <li><a href="#-gdb-set">-gdb-set</a>
1120 <li><a href="#-gdb-show">-gdb-show</a>
1121 <li><a href="#-gdb-version">-gdb-version</a>
1122 <li><a href="#-stack-info-depth">-stack-info-depth</a>
1123 <li><a href="#-stack-info-depth [no args]">-stack-info-depth [no args]</a>
1124 <li><a href="#-stack-info-frame [using frame]">-stack-info-frame [using frame]</a>
1125 <li><a href="#-stack-list-arguments">-stack-list-arguments</a>
1126 <li><a href="#-stack-list-frames">-stack-list-frames</a>
1127 <li><a href="#-stack-list-locals">-stack-list-locals</a>
1128 <li><a href="#-stack-select-frame">-stack-select-frame</a>
1129 <li><a href="#-target-attach [using attach]">-target-attach [using attach]</a>
1130 <li><a href="#-target-detach">-target-detach</a>
1131 <li><a href="#-target-select">-target-select</a>
1132 <li><a href="#-thread-list-all-threads">-thread-list-all-threads</a>
1133 <li><a href="#-thread-list-ids">-thread-list-ids</a>
1134 <li><a href="#-thread-select">-thread-select</a>
1135 <li><a href="#-var-assign">-var-assign</a>
1136 <li><a href="#-var-create">-var-create</a>
1137 <li><a href="#-var-create + -var-info-expression + -var-show-attributes">-var-create + -var-info-expression + -var-show-attributes</a>
1138 <li><a href="#-var-create [auto name]">-var-create [auto name]</a>
1139 <li><a href="#-var-delete">-var-delete</a>
1140 <li><a href="#-var-evaluate-expression">-var-evaluate-expression</a>
1141 <li><a href="#-var-info-expression">-var-info-expression</a>
1142 <li><a href="#-var-info-num-children">-var-info-num-children</a>
1143 <li><a href="#-var-info-type">-var-info-type</a>
1144 <li><a href="#-var-list-children">-var-list-children</a>
1145 <li><a href="#-var-set-format">-var-set-format</a>
1146 <li><a href="#-var-show-attributes">-var-show-attributes</a>
1147 <li><a href="#-var-show-format">-var-show-format</a>
1148 <li><a href="#-var-update">-var-update</a>
1149 <li><a href="#tty">tty</a>
1154 <a name="-break-after"></a>
1155 <H1>-break-after</H1>
1160 <li><a href="#gmi_break_set_times">gmi_break_set_times</a>
1166 <a name="-break-condition"></a>
1167 <H1>-break-condition</H1>
1172 <li><a href="#gmi_break_set_condition">gmi_break_set_condition</a>
1178 <a name="-break-delete"></a>
1179 <H1>-break-delete</H1>
1184 <li><a href="#gmi_break_delete">gmi_break_delete</a>
1190 <a name="-break-enable + -break-disable"></a>
1191 <H1>-break-enable + -break-disable</H1>
1196 <li><a href="#gmi_break_state">gmi_break_state</a>
1202 <a name="-break-insert"></a>
1203 <H1>-break-insert</H1>
1208 <li><a href="#gmi_break_insert_full">gmi_break_insert_full</a>
1214 <a name="-break-insert [ops] file:line"></a>
1215 <H1>-break-insert [ops] file:line</H1>
1220 <li><a href="#gmi_break_insert_full_fl">gmi_break_insert_full_fl</a>
1226 <a name="-break-insert file:line"></a>
1227 <H1>-break-insert file:line</H1>
1232 <li><a href="#gmi_break_insert">gmi_break_insert</a>
1238 <a name="-break-watch"></a>
1239 <H1>-break-watch</H1>
1244 <li><a href="#gmi_break_watch">gmi_break_watch</a>
1250 <a name="-data-evaluate-expression"></a>
1251 <H1>-data-evaluate-expression</H1>
1256 <li><a href="#gmi_data_evaluate_expression">gmi_data_evaluate_expression</a>
1262 <a name="-environment-directory"></a>
1263 <H1>-environment-directory</H1>
1268 <li><a href="#gmi_dir">gmi_dir</a>
1274 <a name="-exec-abort [using kill]"></a>
1275 <H1>-exec-abort [using kill]</H1>
1280 <li><a href="#gmi_exec_kill">gmi_exec_kill</a>
1286 <a name="-exec-continue"></a>
1287 <H1>-exec-continue</H1>
1292 <li><a href="#gmi_exec_continue">gmi_exec_continue</a>
1298 <a name="-exec-finish"></a>
1299 <H1>-exec-finish</H1>
1304 <li><a href="#gmi_exec_finish">gmi_exec_finish</a>
1310 <a name="-exec-interrupt [replacement]"></a>
1311 <H1>-exec-interrupt [replacement]</H1>
1316 <li><a href="#gmi_exec_interrupt">gmi_exec_interrupt</a>
1322 <a name="-exec-next"></a>
1328 <li><a href="#gmi_exec_next">gmi_exec_next</a>
1334 <a name="-exec-next count"></a>
1335 <H1>-exec-next count</H1>
1340 <li><a href="#gmi_exec_next_cnt">gmi_exec_next_cnt</a>
1346 <a name="-exec-next-instruction"></a>
1347 <H1>-exec-next-instruction</H1>
1352 <li><a href="#gmi_exec_next_instruction">gmi_exec_next_instruction</a>
1358 <a name="-exec-return"></a>
1359 <H1>-exec-return</H1>
1364 <li><a href="#gmi_exec_return">gmi_exec_return</a>
1370 <a name="-exec-run"></a>
1376 <li><a href="#gmi_exec_run">gmi_exec_run</a>
1382 <a name="-exec-step"></a>
1388 <li><a href="#gmi_exec_step">gmi_exec_step</a>
1394 <a name="-exec-step count"></a>
1395 <H1>-exec-step count</H1>
1400 <li><a href="#gmi_exec_step_cnt">gmi_exec_step_cnt</a>
1406 <a name="-exec-step-instruction"></a>
1407 <H1>-exec-step-instruction</H1>
1412 <li><a href="#gmi_exec_step_instruction">gmi_exec_step_instruction</a>
1418 <a name="-exec-until"></a>
1419 <H1>-exec-until</H1>
1424 <li><a href="#gmi_exec_until">gmi_exec_until</a>
1430 <a name="-exec-until (using *address)"></a>
1431 <H1>-exec-until (using *address)</H1>
1436 <li><a href="#gmi_exec_until_addr">gmi_exec_until_addr</a>
1442 <a name="-file-exec-and-symbols + -exec-arguments"></a>
1443 <H1>-file-exec-and-symbols + -exec-arguments</H1>
1448 <li><a href="#gmi_set_exec">gmi_set_exec</a>
1454 <a name="-file-symbol-file"></a>
1455 <H1>-file-symbol-file</H1>
1460 <li><a href="#gmi_file_symbol_file">gmi_file_symbol_file</a>
1466 <a name="-gdb-exit"></a>
1472 <li><a href="#gmi_gdb_exit">gmi_gdb_exit</a>
1478 <a name="-gdb-set"></a>
1484 <li><a href="#gmi_gdb_set">gmi_gdb_set</a>
1490 <a name="-gdb-show"></a>
1496 <li><a href="#gmi_gdb_show">gmi_gdb_show</a>
1502 <a name="-gdb-version"></a>
1503 <H1>-gdb-version</H1>
1508 <li><a href="#gmi_gdb_version">gmi_gdb_version</a>
1514 <a name="-stack-info-depth"></a>
1515 <H1>-stack-info-depth</H1>
1520 <li><a href="#gmi_stack_info_depth">gmi_stack_info_depth</a>
1526 <a name="-stack-info-depth [no args]"></a>
1527 <H1>-stack-info-depth [no args]</H1>
1532 <li><a href="#gmi_stack_info_depth_get">gmi_stack_info_depth_get</a>
1538 <a name="-stack-info-frame [using frame]"></a>
1539 <H1>-stack-info-frame [using frame]</H1>
1544 <li><a href="#gmi_stack_info_frame">gmi_stack_info_frame</a>
1550 <a name="-stack-list-arguments"></a>
1551 <H1>-stack-list-arguments</H1>
1556 <li><a href="#gmi_stack_list_arguments">gmi_stack_list_arguments</a>
1557 <li><a href="#gmi_stack_list_arguments_r">gmi_stack_list_arguments_r</a>
1563 <a name="-stack-list-frames"></a>
1564 <H1>-stack-list-frames</H1>
1569 <li><a href="#gmi_stack_list_frames">gmi_stack_list_frames</a>
1570 <li><a href="#gmi_stack_list_frames_r">gmi_stack_list_frames_r</a>
1576 <a name="-stack-list-locals"></a>
1577 <H1>-stack-list-locals</H1>
1582 <li><a href="#gmi_stack_list_locals">gmi_stack_list_locals</a>
1588 <a name="-stack-select-frame"></a>
1589 <H1>-stack-select-frame</H1>
1594 <li><a href="#gmi_stack_select_frame">gmi_stack_select_frame</a>
1600 <a name="-target-attach [using attach]"></a>
1601 <H1>-target-attach [using attach]</H1>
1606 <li><a href="#gmi_target_attach">gmi_target_attach</a>
1612 <a name="-target-detach"></a>
1613 <H1>-target-detach</H1>
1618 <li><a href="#gmi_target_detach">gmi_target_detach</a>
1624 <a name="-target-select"></a>
1625 <H1>-target-select</H1>
1630 <li><a href="#gmi_target_select">gmi_target_select</a>
1636 <a name="-thread-list-all-threads"></a>
1637 <H1>-thread-list-all-threads</H1>
1642 <li><a href="#gmi_thread_list_all_threads">gmi_thread_list_all_threads</a>
1648 <a name="-thread-list-ids"></a>
1649 <H1>-thread-list-ids</H1>
1654 <li><a href="#gmi_thread_list_ids">gmi_thread_list_ids</a>
1660 <a name="-thread-select"></a>
1661 <H1>-thread-select</H1>
1666 <li><a href="#gmi_thread_select">gmi_thread_select</a>
1672 <a name="-var-assign"></a>
1673 <H1>-var-assign</H1>
1678 <li><a href="#gmi_var_assign">gmi_var_assign</a>
1684 <a name="-var-create"></a>
1685 <H1>-var-create</H1>
1690 <li><a href="#gmi_var_create_nm">gmi_var_create_nm</a>
1696 <a name="-var-create + -var-info-expression + -var-show-attributes"></a>
1697 <H1>-var-create + -var-info-expression + -var-show-attributes</H1>
1702 <li><a href="#gmi_full_var_create">gmi_full_var_create</a>
1708 <a name="-var-create [auto name]"></a>
1709 <H1>-var-create [auto name]</H1>
1714 <li><a href="#gmi_var_create">gmi_var_create</a>
1720 <a name="-var-delete"></a>
1721 <H1>-var-delete</H1>
1726 <li><a href="#gmi_var_delete">gmi_var_delete</a>
1732 <a name="-var-evaluate-expression"></a>
1733 <H1>-var-evaluate-expression</H1>
1738 <li><a href="#gmi_var_evaluate_expression">gmi_var_evaluate_expression</a>
1744 <a name="-var-info-expression"></a>
1745 <H1>-var-info-expression</H1>
1750 <li><a href="#gmi_var_info_expression">gmi_var_info_expression</a>
1756 <a name="-var-info-num-children"></a>
1757 <H1>-var-info-num-children</H1>
1762 <li><a href="#gmi_var_info_num_children">gmi_var_info_num_children</a>
1768 <a name="-var-info-type"></a>
1769 <H1>-var-info-type</H1>
1774 <li><a href="#gmi_var_info_type">gmi_var_info_type</a>
1780 <a name="-var-list-children"></a>
1781 <H1>-var-list-children</H1>
1786 <li><a href="#gmi_var_list_children">gmi_var_list_children</a>
1792 <a name="-var-set-format"></a>
1793 <H1>-var-set-format</H1>
1798 <li><a href="#gmi_var_set_format">gmi_var_set_format</a>
1804 <a name="-var-show-attributes"></a>
1805 <H1>-var-show-attributes</H1>
1810 <li><a href="#gmi_var_show_attributes">gmi_var_show_attributes</a>
1816 <a name="-var-show-format"></a>
1817 <H1>-var-show-format</H1>
1822 <li><a href="#gmi_var_show_format">gmi_var_show_format</a>
1828 <a name="-var-update"></a>
1829 <H1>-var-update</H1>
1834 <li><a href="#gmi_var_update">gmi_var_update</a>
1846 <li><a href="#gmi_target_terminal">gmi_target_terminal</a>
1854 <a name="gmi_break_insert"></a>
1855 <center><Font Size=+2>gmi_break_insert</Font> (breakpoint.c 133)</center>
1857 <Font Size=+1><u>Syntax</u></Font><p>
1862 gmi_break_insert(mi_h *h, const char *file, int line);
1868 <Font Size=+1><u>Description</u></Font><p>
1870 Insert a breakpoint at file:line.
1874 <Font Size=+1><u>Return Value</u></Font><p>
1876 A new mi_bkpt structure with info about the breakpoint. NULL on
1883 <a name="gmi_break_insert_full"></a>
1884 <center><Font Size=+2>gmi_break_insert_full</Font> (breakpoint.c 150)</center>
1886 <Font Size=+1><u>Syntax</u></Font><p>
1891 gmi_break_insert_full(mi_h *h, int temporary, int hard_assist, const char *cond, int count, int thread, const char *where);
1897 <Font Size=+1><u>Description</u></Font><p>
1899 Insert a breakpoint, all available options.
1903 <Font Size=+1><u>Return Value</u></Font><p>
1905 A new mi_bkpt structure with info about the breakpoint. NULL on
1912 <a name="gmi_break_insert_full_fl"></a>
1913 <center><Font Size=+2>gmi_break_insert_full_fl</Font> (breakpoint.c 169)</center>
1915 <Font Size=+1><u>Syntax</u></Font><p>
1920 gmi_break_insert_full_fl(mi_h *h, const char *file, int line, int temporary, int hard_assist, const char *cond, int count, int thread);
1926 <Font Size=+1><u>Description</u></Font><p>
1928 Insert a breakpoint, all available options.
1932 <Font Size=+1><u>Return Value</u></Font><p>
1934 A new mi_bkpt structure with info about the breakpoint. NULL on
1941 <a name="gmi_break_delete"></a>
1942 <center><Font Size=+2>gmi_break_delete</Font> (breakpoint.c 188)</center>
1944 <Font Size=+1><u>Syntax</u></Font><p>
1949 gmi_break_delete(mi_h *h, int number);
1955 <Font Size=+1><u>Description</u></Font><p>
1957 Remove a breakpoint.
1961 <Font Size=+1><u>Return Value</u></Font><p>
1963 !=0 OK. Note that gdb always says OK, but errors can be sent to the
1970 <a name="gmi_break_set_times"></a>
1971 <center><Font Size=+2>gmi_break_set_times</Font> (breakpoint.c 205)</center>
1973 <Font Size=+1><u>Syntax</u></Font><p>
1978 gmi_break_set_times(mi_h *h, int number, int count);
1984 <Font Size=+1><u>Description</u></Font><p>
1986 Modify the "ignore" count for a breakpoint.
1990 <Font Size=+1><u>Return Value</u></Font><p>
1992 !=0 OK. Note that gdb always says OK, but errors can be sent to the
1999 <a name="gmi_break_set_condition"></a>
2000 <center><Font Size=+2>gmi_break_set_condition</Font> (breakpoint.c 221)</center>
2002 <Font Size=+1><u>Syntax</u></Font><p>
2007 gmi_break_set_condition(mi_h *h, int number, const char *condition);
2013 <Font Size=+1><u>Description</u></Font><p>
2015 Associate a condition with the breakpoint.
2019 <Font Size=+1><u>Return Value</u></Font><p>
2027 <a name="gmi_break_state"></a>
2028 <center><Font Size=+2>gmi_break_state</Font> (breakpoint.c 238)</center>
2030 <Font Size=+1><u>Syntax</u></Font><p>
2035 gmi_break_state(mi_h *h, int number, int enable);
2041 <Font Size=+1><u>Description</u></Font><p>
2043 Enable or disable a breakpoint.
2047 <Font Size=+1><u>Return Value</u></Font><p>
2049 !=0 OK. Note that gdb always says OK, but errors can be sent to the
2056 <a name="gmi_break_watch"></a>
2057 <center><Font Size=+2>gmi_break_watch</Font> (breakpoint.c 258)</center>
2059 <Font Size=+1><u>Syntax</u></Font><p>
2064 gmi_break_watch(mi_h *h, enum mi_wp_mode mode, const char *exp);
2070 <Font Size=+1><u>Description</u></Font><p>
2072 Set a watchpoint. It doesn't work for remote targets!
2076 <Font Size=+1><u>Return Value</u></Font><p>
2078 A new mi_wp structure with info about the watchpoint. NULL on
2085 <a name="mi_connect_local"></a>
2086 <center><Font Size=+2>mi_connect_local</Font> (connect.c 330)</center>
2088 <Font Size=+1><u>Syntax</u></Font><p>
2099 <Font Size=+1><u>Description</u></Font><p>
2101 Connect to a local copy of gdb. Note that the mi_h structure is something
2102 similar to a "FILE *" for stdio.
2106 <Font Size=+1><u>Return Value</u></Font><p>
2108 A new mi_h structure or NULL on error.
2114 <a name="mi_disconnect"></a>
2115 <center><Font Size=+2>mi_disconnect</Font> (connect.c 410)</center>
2117 <Font Size=+1><u>Syntax</u></Font><p>
2122 mi_disconnect(mi_h *h);
2128 <Font Size=+1><u>Description</u></Font><p>
2130 Close connection. You should ask gdb to quit first <a href="#gmi_gdb_exit">gmi_gdb_exit</a>.
2137 <a name="gmi_start_xterm"></a>
2138 <center><Font Size=+2>gmi_start_xterm</Font> (connect.c 647)</center>
2140 <Font Size=+1><u>Syntax</u></Font><p>
2151 <Font Size=+1><u>Description</u></Font><p>
2153 Opens a new xterm to be used by the child process to debug.
2157 <Font Size=+1><u>Return Value</u></Font><p>
2159 A new mi_aux_term structure, you can use <a href="#gmi_end_aux_term">gmi_end_aux_term</a> to
2166 <a name="gmi_end_aux_term"></a>
2167 <center><Font Size=+2>gmi_end_aux_term</Font> (connect.c 764)</center>
2169 <Font Size=+1><u>Syntax</u></Font><p>
2174 gmi_end_aux_term(mi_aux_term *t);
2180 <Font Size=+1><u>Description</u></Font><p>
2182 Closes the auxiliar terminal and releases the allocated memory.
2189 <a name="mi_force_version"></a>
2190 <center><Font Size=+2>mi_force_version</Font> (connect.c 781)</center>
2192 <Font Size=+1><u>Syntax</u></Font><p>
2197 mi_force_version(mi_h *h, unsigned vMajor, unsigned vMiddle, unsigned vMinor);
2203 <Font Size=+1><u>Description</u></Font><p>
2205 Forces the MI version. Currently the library can't detect it so you must
2206 force it manually. GDB 5.x implemented MI v1 and 6.x v2.
2213 <a name="mi_set_workaround"></a>
2214 <center><Font Size=+2>mi_set_workaround</Font> (connect.c 794)</center>
2216 <Font Size=+1><u>Syntax</u></Font><p>
2221 mi_set_workaround(unsigned wa, int enable);
2227 <Font Size=+1><u>Description</u></Font><p>
2229 Dis/Enables the @var{wa} workaround for a bug in gdb.
2236 <a name="mi_get_workaround"></a>
2237 <center><Font Size=+2>mi_get_workaround</Font> (connect.c 813)</center>
2239 <Font Size=+1><u>Syntax</u></Font><p>
2244 mi_get_workaround(unsigned wa);
2250 <Font Size=+1><u>Description</u></Font><p>
2252 Finds if the @var{wa} workaround for a bug in gdb is enabled.
2256 <Font Size=+1><u>Return Value</u></Font><p>
2264 <a name="MIDebugger (MIDebugger)"></a>
2265 <center><Font Size=+2>MIDebugger</Font> (cpp_int.cc 22)</center>
2267 <Font Size=+1><u>Syntax</u></Font><p>
2272 MIDebugger::MIDebugger();
2276 <Font Size=+1><u>Member of the class:</u></Font>
2282 <Font Size=+1><u>Description</u></Font><p>
2284 Initializes a debugger object. It starts in the "disconnected" state.
2285 Use <a href="#Connect (MIDebugger)">Connect</a> after it.
2292 <a name="~MIDebugger (MIDebugger)"></a>
2293 <center><Font Size=+2>~MIDebugger</Font> (cpp_int.cc 40)</center>
2295 <Font Size=+1><u>Syntax</u></Font><p>
2300 MIDebugger::~MIDebugger();
2304 <Font Size=+1><u>Member of the class:</u></Font>
2310 <Font Size=+1><u>Description</u></Font><p>
2312 This is the destructor for the class. It tries to change the state to
2313 "disconnected" doing the needed actions.
2320 <a name="Connect (MIDebugger)"></a>
2321 <center><Font Size=+2>Connect</Font> (cpp_int.cc 79)</center>
2323 <Font Size=+1><u>Syntax</u></Font><p>
2328 MIDebugger::Connect(bool);
2332 <Font Size=+1><u>Member of the class:</u></Font>
2338 <Font Size=+1><u>Description</u></Font><p>
2340 Connects to gdb. Currently only local connections are supported, that's
2341 a gdb limitation. Call it when in "unconnected" state, on success it will
2342 change to the "connected" state. After it you should call one of the
2343 SelectTarget members. <a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11</a>, <a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux</a> or
2344 <a href="#SelectTargetRemote (MIDebugger)">SelectTargetRemote</a>. To finish the connection use <a href="#Disconnect (MIDebugger)">Disconnect</a>.
2348 <Font Size=+1><u>Return Value</u></Font><p>
2356 <a name="Disconnect (MIDebugger)"></a>
2357 <center><Font Size=+2>Disconnect</Font> (cpp_int.cc 105)</center>
2359 <Font Size=+1><u>Syntax</u></Font><p>
2364 MIDebugger::Disconnect();
2368 <Font Size=+1><u>Member of the class:</u></Font>
2374 <Font Size=+1><u>Description</u></Font><p>
2376 Finishes the connection to gdb. Call when in "connected" state, on success
2377 it will change to "disconnected" state. This function first tries to exit
2378 from gdb and then close the connection. But if gdb fails to exit it will be
2383 <Font Size=+1><u>Return Value</u></Font><p>
2391 <a name="SelectTargetTTY (MIDebugger)"></a>
2392 <center><Font Size=+2>SelectTargetTTY</Font> (cpp_int.cc 127)</center>
2394 <Font Size=+1><u>Syntax</u></Font><p>
2399 MIDebugger::SelectTargetTTY(const char *exec, const char *args, const char *auxtty, dMode m);
2403 <Font Size=+1><u>Member of the class:</u></Font>
2409 <Font Size=+1><u>Description</u></Font><p>
2411 Protected member that implements <a href="#SelectTargetX11 (MIDebugger)">SelectTargetX11</a> and
2412 <a href="#SelectTargetLinux (MIDebugger)">SelectTargetLinux</a>.
2416 <Font Size=+1><u>Return Value</u></Font><p>
2424 <a name="SelectTargetX11 (MIDebugger)"></a>
2425 <center><Font Size=+2>SelectTargetX11</Font> (cpp_int.cc 180)</center>
2427 <Font Size=+1><u>Syntax</u></Font><p>
2432 MIDebugger::SelectTargetX11(const char *exec, const char *args, const char *auxtty);
2436 <Font Size=+1><u>Member of the class:</u></Font>
2442 <Font Size=+1><u>Description</u></Font><p>
2444 Starts a debug session for X11. It opens an xterm console for the program
2445 to debug and tells gdb which executable to debug and the command line
2446 options to pass. You can specify an already existing tty console to be used.
2447 Can be called when the state is "connected". On success will change to the
2448 "target_specified" state. After it you can use <a href="#Run (MIDebugger)">Run</a> or use the members
2449 to define breakpoints and similar stuff. To finish it use
2450 <a href="#TargetUnselect (MIDebugger)">TargetUnselect</a>.
2454 <Font Size=+1><u>Return Value</u></Font><p>
2462 <a name="SelectTargetLinux (MIDebugger)"></a>
2463 <center><Font Size=+2>SelectTargetLinux</Font> (cpp_int.cc 202)</center>
2465 <Font Size=+1><u>Syntax</u></Font><p>
2470 MIDebugger::SelectTargetLinux(const char *exec, const char *args, const char *auxtty);
2474 <Font Size=+1><u>Member of the class:</u></Font>
2480 <Font Size=+1><u>Description</u></Font><p>
2482 Starts a debug session for Linux console. It selects an empty VT for the
2483 program to debug and tells gdb which executable to debug and the command line
2484 options to pass. You can specify an already existing tty console to be used.
2485 Can be called when the state is "connected". On success will change to the
2486 "target_specified" state. After it you can use <a href="#Run (MIDebugger)">Run</a> or use the members
2487 to define breakpoints and similar stuff. To finish it use
2488 <a href="#TargetUnselect (MIDebugger)">TargetUnselect</a>.
2492 <Font Size=+1><u>Return Value</u></Font><p>
2500 <a name="SelectTargetRemote (MIDebugger)"></a>
2501 <center><Font Size=+2>SelectTargetRemote</Font> (cpp_int.cc 228)</center>
2503 <Font Size=+1><u>Syntax</u></Font><p>
2508 MIDebugger::SelectTargetRemote(const char *exec, const char *rparams, const char *rtype);
2512 <Font Size=+1><u>Member of the class:</u></Font>
2518 <Font Size=+1><u>Description</u></Font><p>
2520 Starts a remote session. The other end should be running gdbserver. You
2521 must specify a local copy of the program to debug with debug info. The remote
2522 copy can be stripped. The @var{rtype} and @var{rparams} selects the protocol
2523 and the remote machine. Read gdb docs to know more about the available
2524 options. If @var{rtype} is omitted "extended-remote" protocol is used.
2525 Can be called when the state is "connected". On success will change to the
2526 "target_specified" state. After it you can use <a href="#Run (MIDebugger)">Run</a> or use the members
2527 to define breakpoints and similar stuff. To finish it use
2528 <a href="#TargetUnselect (MIDebugger)">TargetUnselect</a>. Note that when gdb uses remote debugging the remote
2529 program starts running. The <a href="#Run (MIDebugger)">Run</a> member knows about it.
2533 <Font Size=+1><u>Return Value</u></Font><p>
2539 <Font Size=+1><u>Example</u></Font><p>
2541 o->SelectTargetRemote("./exec_file","192.168.1.65:5000");
2546 <a name="SelectTargetPID (MIDebugger)"></a>
2547 <center><Font Size=+2>SelectTargetPID</Font> (cpp_int.cc 258)</center>
2549 <Font Size=+1><u>Syntax</u></Font><p>
2554 MIDebugger::SelectTargetPID(const char *exec, int pid);
2558 <Font Size=+1><u>Member of the class:</u></Font>
2564 <Font Size=+1><u>Description</u></Font><p>
2566 Starts a local session using an already running process.
2570 <Font Size=+1><u>Return Value</u></Font><p>
2578 <a name="TargetUnselect (MIDebugger)"></a>
2579 <center><Font Size=+2>TargetUnselect</Font> (cpp_int.cc 295)</center>
2581 <Font Size=+1><u>Syntax</u></Font><p>
2586 MIDebugger::TargetUnselect();
2590 <Font Size=+1><u>Member of the class:</u></Font>
2596 <Font Size=+1><u>Description</u></Font><p>
2598 Used to unselect the current target. When X11 mode it closes the auxiliar
2599 terminal. For remote debugging it uses "detach". Can be called when in
2600 "target_specified" state. On success it changes to "connected" state.
2604 <Font Size=+1><u>Return Value</u></Font><p>
2612 <a name="Run (MIDebugger)"></a>
2613 <center><Font Size=+2>Run</Font> (cpp_int.cc 335)</center>
2615 <Font Size=+1><u>Syntax</u></Font><p>
2624 <Font Size=+1><u>Member of the class:</u></Font>
2630 <Font Size=+1><u>Description</u></Font><p>
2632 Starts running the program. You should set breakpoint before it. Can be
2633 called when state is "target_specified". On success will change to "running"
2634 state. After it you should poll for async responses using <a href="#Poll (MIDebugger)">Poll</a>. The
2635 program can stop for many reasons asynchronously and also exit. This
2636 information is known using Poll. You can stop the program using <a href="#Stop (MIDebugger)">Stop</a>.
2640 <Font Size=+1><u>Return Value</u></Font><p>
2648 <a name="Stop (MIDebugger)"></a>
2649 <center><Font Size=+2>Stop</Font> (cpp_int.cc 365)</center>
2651 <Font Size=+1><u>Syntax</u></Font><p>
2660 <Font Size=+1><u>Member of the class:</u></Font>
2666 <Font Size=+1><u>Description</u></Font><p>
2668 Stops the program execution. GDB sends an interrupt signal to the program.
2669 Can be called when the state is "running". It won't switch to "stopped"
2670 state automatically. Instead you must poll for async events and wait for a
2671 stopped notification. After it you can call <a href="#Continue (MIDebugger)">Continue</a> to resume
2676 <Font Size=+1><u>Return Value</u></Font><p>
2682 <Font Size=+1><u>Example</u></Font><p>
2689 <a name="Poll (MIDebugger)"></a>
2690 <center><Font Size=+2>Poll</Font> (cpp_int.cc 386)</center>
2692 <Font Size=+1><u>Syntax</u></Font><p>
2697 MIDebugger::Poll(mi_stop *&rs);
2701 <Font Size=+1><u>Member of the class:</u></Font>
2707 <Font Size=+1><u>Description</u></Font><p>
2709 Polls gdb looking for async responses. Currently it just looks for
2710 "stopped" messages. You must call it when the state is "running". But the
2711 function will poll gdb even if the state isn't "running". When a stopped
2712 message is received the state changes to stopped or target_specified (the
2713 last is when we get some exit).
2717 <Font Size=+1><u>Return Value</u></Font><p>
2719 !=0 if we got a response. The @var{rs} pointer will point to an
2720 mi_stop structure if we got it or will be NULL if we didn't.
2726 <a name="Continue (MIDebugger)"></a>
2727 <center><Font Size=+2>Continue</Font> (cpp_int.cc 432)</center>
2729 <Font Size=+1><u>Syntax</u></Font><p>
2734 MIDebugger::Continue();
2738 <Font Size=+1><u>Member of the class:</u></Font>
2744 <Font Size=+1><u>Description</u></Font><p>
2746 Resumes execution after the program "stopped". Can be called when the state
2747 is stopped. On success will change to "running" state.
2751 <Font Size=+1><u>Return Value</u></Font><p>
2759 <a name="RunOrContinue (MIDebugger)"></a>
2760 <center><Font Size=+2>RunOrContinue</Font> (cpp_int.cc 454)</center>
2762 <Font Size=+1><u>Syntax</u></Font><p>
2767 MIDebugger::RunOrContinue();
2771 <Font Size=+1><u>Member of the class:</u></Font>
2777 <Font Size=+1><u>Description</u></Font><p>
2779 Starts program execution or resumes it. When the state is target_specified
2780 it calls <a href="#Run (MIDebugger)">Run</a> otherwise it uses <a href="#Continue (MIDebugger)">Continue</a>. Can be called when the
2781 state is "target_specified" or "stopped". On success will change to
2786 <Font Size=+1><u>Return Value</u></Font><p>
2794 <a name="Kill (MIDebugger)"></a>
2795 <center><Font Size=+2>Kill</Font> (cpp_int.cc 473)</center>
2797 <Font Size=+1><u>Syntax</u></Font><p>
2806 <Font Size=+1><u>Member of the class:</u></Font>
2812 <Font Size=+1><u>Description</u></Font><p>
2814 Kills the program you are debugging. Can be called when the state is
2815 "stopped" or "running". On success changes the state to "target_specified".
2816 Note that if you want to restart the program you can just call <a href="#Run (MIDebugger)">Run</a> and
2817 if you want to just stop the program call <a href="#Stop (MIDebugger)">Stop</a>.
2821 <Font Size=+1><u>Return Value</u></Font><p>
2829 <a name="Breakpoint (MIDebugger)"></a>
2830 <center><Font Size=+2>Breakpoint</Font> (cpp_int.cc 520)</center>
2832 <Font Size=+1><u>Syntax</u></Font><p>
2837 MIDebugger::Breakpoint(const char *file, int line);
2841 <Font Size=+1><u>Member of the class:</u></Font>
2847 <Font Size=+1><u>Description</u></Font><p>
2849 Inserts a breakpoint at @var{file} and @var{line}. Can be called when the
2850 state is "stopped" or "target_specified".
2854 <Font Size=+1><u>Return Value</u></Font><p>
2856 An mi_bkpt structure or NULL if error.
2862 <a name="Breakpoint (MIDebugger) <1>"></a>
2863 <center><Font Size=+2>Breakpoint</Font> (cpp_int.cc 537)</center>
2865 <Font Size=+1><u>Syntax</u></Font><p>
2870 MIDebugger::Breakpoint(const char *where, bool temporary, const char *cond, int count, int thread, bool hard_assist);
2874 <Font Size=+1><u>Member of the class:</u></Font>
2880 <Font Size=+1><u>Description</u></Font><p>
2882 Inserts a breakpoint at @var{where}, all options available. Can be called
2883 when the state is "stopped" or "target_specified".
2887 <Font Size=+1><u>Return Value</u></Font><p>
2889 An mi_bkpt structure or NULL if error.
2895 <a name="BreakpointFull (MIDebugger)"></a>
2896 <center><Font Size=+2>BreakpointFull</Font> (cpp_int.cc 585)</center>
2898 <Font Size=+1><u>Syntax</u></Font><p>
2903 MIDebugger::BreakpointFull(const char *file, int line, bool temporary, const char *cond, int count, int thread, bool hard_assist);
2907 <Font Size=+1><u>Member of the class:</u></Font>
2913 <Font Size=+1><u>Description</u></Font><p>
2915 Inserts a breakpoint at @var{file} and @var{line} all options available.
2916 Can be called when the state is "stopped" or "target_specified".
2920 <Font Size=+1><u>Return Value</u></Font><p>
2922 An mi_bkpt structure or NULL if error.
2928 <a name="BreakDelete (MIDebugger)"></a>
2929 <center><Font Size=+2>BreakDelete</Font> (cpp_int.cc 605)</center>
2931 <Font Size=+1><u>Syntax</u></Font><p>
2936 MIDebugger::BreakDelete(mi_bkpt *b);
2940 <Font Size=+1><u>Member of the class:</u></Font>
2946 <Font Size=+1><u>Description</u></Font><p>
2948 Removes the specified breakpoint. It doesn't free the structure. Can be
2949 called when the state is "stopped" or "target_specified".
2953 <Font Size=+1><u>Return Value</u></Font><p>
2961 <a name="Watchpoint (MIDebugger)"></a>
2962 <center><Font Size=+2>Watchpoint</Font> (cpp_int.cc 622)</center>
2964 <Font Size=+1><u>Syntax</u></Font><p>
2969 MIDebugger::Watchpoint(enum mi_wp_mode mode, const char *exp);
2973 <Font Size=+1><u>Member of the class:</u></Font>
2979 <Font Size=+1><u>Description</u></Font><p>
2981 Inserts a watchpoint for the specified expression. Can be called when the
2982 state is "stopped" or "target_specified".
2986 <Font Size=+1><u>Return Value</u></Font><p>
2988 An mi_wp structure or NULL if error.
2994 <a name="WatchDelete (MIDebugger)"></a>
2995 <center><Font Size=+2>WatchDelete</Font> (cpp_int.cc 639)</center>
2997 <Font Size=+1><u>Syntax</u></Font><p>
3002 MIDebugger::WatchDelete(mi_wp *w);
3006 <Font Size=+1><u>Member of the class:</u></Font>
3012 <Font Size=+1><u>Description</u></Font><p>
3014 Removes the specified watchpoint. It doesn't free the structure. Can be
3015 called when the state is "stopped" or "target_specified".
3019 <Font Size=+1><u>Return Value</u></Font><p>
3027 <a name="RunToMain (MIDebugger)"></a>
3028 <center><Font Size=+2>RunToMain</Font> (cpp_int.cc 657)</center>
3030 <Font Size=+1><u>Syntax</u></Font><p>
3035 MIDebugger::RunToMain();
3039 <Font Size=+1><u>Member of the class:</u></Font>
3045 <Font Size=+1><u>Description</u></Font><p>
3047 Puts a temporal breakpoint in main function and starts running. Can be
3048 called when the state is "target_specified". If successful the state will
3049 change to "running".
3053 <Font Size=+1><u>Return Value</u></Font><p>
3061 <a name="StepOver (MIDebugger)"></a>
3062 <center><Font Size=+2>StepOver</Font> (cpp_int.cc 681)</center>
3064 <Font Size=+1><u>Syntax</u></Font><p>
3069 MIDebugger::StepOver(bool inst);
3073 <Font Size=+1><u>Member of the class:</u></Font>
3079 <Font Size=+1><u>Description</u></Font><p>
3081 Executes upto the next line, doesn't follow function calls. The @var{inst}
3082 argument is for assembler. If the state is "target_specified" it will go to
3083 the first line in the main function. If the state is "stopped" will use the
3084 next command. If successfully the state will change to "running".
3088 <Font Size=+1><u>Return Value</u></Font><p>
3096 <a name="GoTo (MIDebugger)"></a>
3097 <center><Font Size=+2>GoTo</Font> (cpp_int.cc 713)</center>
3099 <Font Size=+1><u>Syntax</u></Font><p>
3104 MIDebugger::GoTo(const char *file, int line);
3108 <Font Size=+1><u>Member of the class:</u></Font>
3114 <Font Size=+1><u>Description</u></Font><p>
3116 Executes until the specified point. If the state is "target_specified" it
3117 uses a temporal breakpoint. If the state is "stopped" it uses -exec-until.
3118 Fails for any other state.
3122 <Font Size=+1><u>Return Value</u></Font><p>
3130 <a name="GoTo (MIDebugger) <1>"></a>
3131 <center><Font Size=+2>GoTo</Font> (cpp_int.cc 751)</center>
3133 <Font Size=+1><u>Syntax</u></Font><p>
3138 MIDebugger::GoTo(void *addr);
3142 <Font Size=+1><u>Member of the class:</u></Font>
3148 <Font Size=+1><u>Description</u></Font><p>
3150 Executes until the specified point. If the state is "target_specified" it
3151 uses a temporal breakpoint. If the state is "stopped" it uses -exec-until.
3152 Fails for any other state.
3156 <Font Size=+1><u>Return Value</u></Font><p>
3164 <a name="FinishFun (MIDebugger)"></a>
3165 <center><Font Size=+2>FinishFun</Font> (cpp_int.cc 788)</center>
3167 <Font Size=+1><u>Syntax</u></Font><p>
3172 MIDebugger::FinishFun();
3176 <Font Size=+1><u>Member of the class:</u></Font>
3182 <Font Size=+1><u>Description</u></Font><p>
3184 Resumes execution until the end of the current funtion is reached. Only
3185 usable when we are in the "stopped" state.
3189 <Font Size=+1><u>Return Value</u></Font><p>
3197 <a name="ReturnNow (MIDebugger)"></a>
3198 <center><Font Size=+2>ReturnNow</Font> (cpp_int.cc 808)</center>
3200 <Font Size=+1><u>Syntax</u></Font><p>
3205 MIDebugger::ReturnNow();
3209 <Font Size=+1><u>Member of the class:</u></Font>
3215 <Font Size=+1><u>Description</u></Font><p>
3221 <Font Size=+1><u>Return Value</u></Font><p>
3223 !=NULL OK, the returned frame is the current location. That's a
3224 synchronous function.
3230 <a name="CallStack (MIDebugger)"></a>
3231 <center><Font Size=+2>CallStack</Font> (cpp_int.cc 824)</center>
3233 <Font Size=+1><u>Syntax</u></Font><p>
3238 MIDebugger::CallStack(bool args);
3242 <Font Size=+1><u>Member of the class:</u></Font>
3248 <Font Size=+1><u>Description</u></Font><p>
3254 <Font Size=+1><u>Return Value</u></Font><p>
3256 !=NULL OK, the list of frames is returned.
3262 <a name="TraceInto (MIDebugger)"></a>
3263 <center><Font Size=+2>TraceInto</Font> (cpp_int.cc 860)</center>
3265 <Font Size=+1><u>Syntax</u></Font><p>
3270 MIDebugger::TraceInto(bool inst);
3274 <Font Size=+1><u>Member of the class:</u></Font>
3280 <Font Size=+1><u>Description</u></Font><p>
3282 Executes upto the next line, it follows function calls. The @var{inst}
3283 argument is for assembler. If the state is "target_specified" it will go to
3284 the first line in the main function. If the state is "stopped" will use the
3285 next command. If successfully the state will change to "running".
3289 <Font Size=+1><u>Return Value</u></Font><p>
3297 <a name="EvalExpression (MIDebugger)"></a>
3298 <center><Font Size=+2>EvalExpression</Font> (cpp_int.cc 892)</center>
3300 <Font Size=+1><u>Syntax</u></Font><p>
3305 MIDebugger::EvalExpression(const char *exp);
3309 <Font Size=+1><u>Member of the class:</u></Font>
3315 <Font Size=+1><u>Description</u></Font><p>
3317 Evaluates the provided expression. If we get an error the error
3318 description is returned instead. Can't be called if "disconnected" or
3323 <Font Size=+1><u>Return Value</u></Font><p>
3325 The result of the expression (use free) or NULL.
3331 <a name="ModifyExpression (MIDebugger)"></a>
3332 <center><Font Size=+2>ModifyExpression</Font> (cpp_int.cc 918)</center>
3334 <Font Size=+1><u>Syntax</u></Font><p>
3339 MIDebugger::ModifyExpression(char *exp, char *newVal);
3343 <Font Size=+1><u>Member of the class:</u></Font>
3349 <Font Size=+1><u>Description</u></Font><p>
3351 Modifies the provided expression. If we get an error the error
3352 description is returned instead. Can't be called if "disconnected" or
3357 <Font Size=+1><u>Return Value</u></Font><p>
3359 The result of the expression (use free) or NULL.
3365 <a name="Send (MIDebugger)"></a>
3366 <center><Font Size=+2>Send</Font> (cpp_int.cc 950)</center>
3368 <Font Size=+1><u>Syntax</u></Font><p>
3373 MIDebugger::Send(const char *command);
3377 <Font Size=+1><u>Member of the class:</u></Font>
3383 <Font Size=+1><u>Description</u></Font><p>
3385 Sends a command to gdb.
3389 <Font Size=+1><u>Return Value</u></Font><p>
3397 <a name="FillTypeVal (MIDebugger)"></a>
3398 <center><Font Size=+2>FillTypeVal</Font> (cpp_int.cc 970)</center>
3400 <Font Size=+1><u>Syntax</u></Font><p>
3405 MIDebugger::FillTypeVal(mi_gvar *var);
3409 <Font Size=+1><u>Member of the class:</u></Font>
3415 <Font Size=+1><u>Description</u></Font><p>
3417 Fills the type and value fields of the mi_gvar provided list.
3421 <Font Size=+1><u>Return Value</u></Font><p>
3429 <a name="gmi_data_evaluate_expression"></a>
3430 <center><Font Size=+2>gmi_data_evaluate_expression</Font> (data_man.c 163)</center>
3432 <Font Size=+1><u>Syntax</u></Font><p>
3437 gmi_data_evaluate_expression(mi_h *h, const char *expression);
3443 <Font Size=+1><u>Description</u></Font><p>
3445 Evaluate an expression. Returns a parsed tree.
3449 <Font Size=+1><u>Return Value</u></Font><p>
3451 The resulting value (as plain text) or NULL on error.
3457 <a name="gmi_dir"></a>
3458 <center><Font Size=+2>gmi_dir</Font> (data_man.c 180)</center>
3460 <Font Size=+1><u>Syntax</u></Font><p>
3465 gmi_dir(mi_h *h, const char *path);
3471 <Font Size=+1><u>Description</u></Font><p>
3473 Path for sources. You must use it to indicate where are the sources for
3474 the program to debug. Only the MI v1 implementation is available.
3478 <Font Size=+1><u>Return Value</u></Font><p>
3486 <a name="mi_get_error_str"></a>
3487 <center><Font Size=+2>mi_get_error_str</Font> (error.c 10)</center>
3489 <Font Size=+1><u>Syntax</u></Font><p>
3504 <a name="mi_look_for_free_pty"></a>
3505 <center><Font Size=+2>mi_look_for_free_pty</Font> (get_free_pty.c 41)</center>
3507 <Font Size=+1><u>Syntax</u></Font><p>
3512 mi_look_for_free_pty(int *master, char **slave);
3518 <Font Size=+1><u>Description</u></Font><p>
3520 Look for a free and usable pseudo terminal. Low level, use
3521 <a href="#gmi_look_for_free_pty">gmi_look_for_free_pty</a>.
3525 <Font Size=+1><u>Return Value</u></Font><p>
3527 A file descriptor connected to the master pty and the name of the slave device, or <0 on error.
3533 <a name="gmi_look_for_free_pty"></a>
3534 <center><Font Size=+2>gmi_look_for_free_pty</Font> (get_free_pty.c 92)</center>
3536 <Font Size=+1><u>Syntax</u></Font><p>
3541 gmi_look_for_free_pty();
3547 <Font Size=+1><u>Description</u></Font><p>
3549 Look for a free and usable pseudo terminal to be used by the child.
3553 <Font Size=+1><u>Return Value</u></Font><p>
3555 A new mi_pty structure, you can use <a href="#gmi_end_pty">gmi_end_pty</a> to
3562 <a name="gmi_end_pty"></a>
3563 <center><Font Size=+2>gmi_end_pty</Font> (get_free_pty.c 124)</center>
3565 <Font Size=+1><u>Syntax</u></Font><p>
3570 gmi_end_pty(mi_pty *p);
3576 <Font Size=+1><u>Description</u></Font><p>
3578 Closes the pseudo termial master and releases the allocated memory.
3585 <a name="mi_look_for_free_vt"></a>
3586 <center><Font Size=+2>mi_look_for_free_vt</Font> (get_free_vt.c 51)</center>
3588 <Font Size=+1><u>Syntax</u></Font><p>
3593 mi_look_for_free_vt() 53;
3599 <Font Size=+1><u>Description</u></Font><p>
3601 Look for a free and usable Linux VT. Low level, use
3602 <a href="#gmi_look_for_free_vt">gmi_look_for_free_vt</a>.
3606 <Font Size=+1><u>Return Value</u></Font><p>
3608 The VT number or <0 on error.
3614 <a name="gmi_look_for_free_vt"></a>
3615 <center><Font Size=+2>gmi_look_for_free_vt</Font> (get_free_vt.c 135)</center>
3617 <Font Size=+1><u>Syntax</u></Font><p>
3622 gmi_look_for_free_vt() 137;
3628 <Font Size=+1><u>Description</u></Font><p>
3630 Look for a free and usable Linux VT to be used by the child.
3634 <Font Size=+1><u>Return Value</u></Font><p>
3636 A new mi_aux_term structure, you can use <a href="#gmi_end_aux_term">gmi_end_aux_term</a> to
3643 <a name="gmi_gdb_exit"></a>
3644 <center><Font Size=+2>gmi_gdb_exit</Font> (misc.c 54)</center>
3646 <Font Size=+1><u>Syntax</u></Font><p>
3651 gmi_gdb_exit(mi_h *h);
3657 <Font Size=+1><u>Description</u></Font><p>
3659 Exit gdb killing the child is it is running.
3666 <a name="gmi_gdb_version"></a>
3667 <center><Font Size=+2>gmi_gdb_version</Font> (misc.c 70)</center>
3669 <Font Size=+1><u>Syntax</u></Font><p>
3674 gmi_gdb_version(mi_h *h);
3680 <Font Size=+1><u>Description</u></Font><p>
3682 Send the version to the console.
3686 <Font Size=+1><u>Return Value</u></Font><p>
3694 <a name="gmi_gdb_set"></a>
3695 <center><Font Size=+2>gmi_gdb_set</Font> (misc.c 86)</center>
3697 <Font Size=+1><u>Syntax</u></Font><p>
3702 gmi_gdb_set(mi_h *h, const char *var, const char *val);
3708 <Font Size=+1><u>Description</u></Font><p>
3714 <Font Size=+1><u>Return Value</u></Font><p>
3722 <a name="gmi_gdb_show"></a>
3723 <center><Font Size=+2>gmi_gdb_show</Font> (misc.c 102)</center>
3725 <Font Size=+1><u>Syntax</u></Font><p>
3730 gmi_gdb_show(mi_h *h, const char *var);
3736 <Font Size=+1><u>Description</u></Font><p>
3742 <Font Size=+1><u>Return Value</u></Font><p>
3744 The current value of the variable or NULL on error.
3750 <a name="gmi_set_exec"></a>
3751 <center><Font Size=+2>gmi_set_exec</Font> (prg_control.c 172)</center>
3753 <Font Size=+1><u>Syntax</u></Font><p>
3758 gmi_set_exec(mi_h *h, const char *file, const char *args);
3764 <Font Size=+1><u>Description</u></Font><p>
3766 Specify the executable and arguments for local debug.
3770 <Font Size=+1><u>Return Value</u></Font><p>
3778 <a name="gmi_exec_run"></a>
3779 <center><Font Size=+2>gmi_exec_run</Font> (prg_control.c 193)</center>
3781 <Font Size=+1><u>Syntax</u></Font><p>
3786 gmi_exec_run(mi_h *h);
3792 <Font Size=+1><u>Description</u></Font><p>
3794 Start running the executable. Remote sessions starts running.
3798 <Font Size=+1><u>Return Value</u></Font><p>
3806 <a name="gmi_exec_continue"></a>
3807 <center><Font Size=+2>gmi_exec_continue</Font> (prg_control.c 209)</center>
3809 <Font Size=+1><u>Syntax</u></Font><p>
3814 gmi_exec_continue(mi_h *h);
3820 <Font Size=+1><u>Description</u></Font><p>
3822 Continue the execution after a "stop".
3826 <Font Size=+1><u>Return Value</u></Font><p>
3834 <a name="gmi_target_terminal"></a>
3835 <center><Font Size=+2>gmi_target_terminal</Font> (prg_control.c 226)</center>
3837 <Font Size=+1><u>Syntax</u></Font><p>
3842 gmi_target_terminal(mi_h *h, const char *tty_name);
3848 <Font Size=+1><u>Description</u></Font><p>
3850 Indicate which terminal will use the target program. For local sessions.
3854 <Font Size=+1><u>Return Value</u></Font><p>
3860 <Font Size=+1><u>Example</u></Font><p>
3867 <a name="gmi_file_symbol_file"></a>
3868 <center><Font Size=+2>gmi_file_symbol_file</Font> (prg_control.c 242)</center>
3870 <Font Size=+1><u>Syntax</u></Font><p>
3875 gmi_file_symbol_file(mi_h *h, const char *file);
3881 <Font Size=+1><u>Description</u></Font><p>
3883 Specify what's the local copy that have debug info. For remote sessions.
3887 <Font Size=+1><u>Return Value</u></Font><p>
3895 <a name="gmi_exec_finish"></a>
3896 <center><Font Size=+2>gmi_exec_finish</Font> (prg_control.c 259)</center>
3898 <Font Size=+1><u>Syntax</u></Font><p>
3903 gmi_exec_finish(mi_h *h);
3909 <Font Size=+1><u>Description</u></Font><p>
3911 Continue until function return, the return value is included in the async
3916 <Font Size=+1><u>Return Value</u></Font><p>
3924 <a name="gmi_exec_interrupt"></a>
3925 <center><Font Size=+2>gmi_exec_interrupt</Font> (prg_control.c 278)</center>
3927 <Font Size=+1><u>Syntax</u></Font><p>
3932 gmi_exec_interrupt(mi_h *h);
3938 <Font Size=+1><u>Description</u></Font><p>
3940 Stop the program using SIGINT. The corresponding command should be
3941 -exec-interrupt but not even gdb 6.1.1 can do it because the "async" mode
3942 isn't really working.
3946 <Font Size=+1><u>Return Value</u></Font><p>
3952 <Font Size=+1><u>Example</u></Font><p>
3959 <a name="gmi_exec_next"></a>
3960 <center><Font Size=+2>gmi_exec_next</Font> (prg_control.c 299)</center>
3962 <Font Size=+1><u>Syntax</u></Font><p>
3967 gmi_exec_next(mi_h *h);
3973 <Font Size=+1><u>Description</u></Font><p>
3979 <Font Size=+1><u>Return Value</u></Font><p>
3987 <a name="gmi_exec_next_cnt"></a>
3988 <center><Font Size=+2>gmi_exec_next_cnt</Font> (prg_control.c 315)</center>
3990 <Font Size=+1><u>Syntax</u></Font><p>
3995 gmi_exec_next_cnt(mi_h *h, int count);
4001 <Font Size=+1><u>Description</u></Font><p>
4003 Skip count lines of code.
4007 <Font Size=+1><u>Return Value</u></Font><p>
4015 <a name="gmi_exec_next_instruction"></a>
4016 <center><Font Size=+2>gmi_exec_next_instruction</Font> (prg_control.c 331)</center>
4018 <Font Size=+1><u>Syntax</u></Font><p>
4023 gmi_exec_next_instruction(mi_h *h);
4029 <Font Size=+1><u>Description</u></Font><p>
4031 Next line of assembler code.
4035 <Font Size=+1><u>Return Value</u></Font><p>
4043 <a name="gmi_exec_step"></a>
4044 <center><Font Size=+2>gmi_exec_step</Font> (prg_control.c 347)</center>
4046 <Font Size=+1><u>Syntax</u></Font><p>
4051 gmi_exec_step(mi_h *h);
4057 <Font Size=+1><u>Description</u></Font><p>
4059 Next line of code. Get inside functions.
4063 <Font Size=+1><u>Return Value</u></Font><p>
4071 <a name="gmi_exec_step_cnt"></a>
4072 <center><Font Size=+2>gmi_exec_step_cnt</Font> (prg_control.c 363)</center>
4074 <Font Size=+1><u>Syntax</u></Font><p>
4079 gmi_exec_step_cnt(mi_h *h, int count);
4085 <Font Size=+1><u>Description</u></Font><p>
4087 Next count lines of code. Get inside functions.
4091 <Font Size=+1><u>Return Value</u></Font><p>
4099 <a name="gmi_exec_step_instruction"></a>
4100 <center><Font Size=+2>gmi_exec_step_instruction</Font> (prg_control.c 379)</center>
4102 <Font Size=+1><u>Syntax</u></Font><p>
4107 gmi_exec_step_instruction(mi_h *h);
4113 <Font Size=+1><u>Description</u></Font><p>
4115 Next line of assembler code. Get inside calls.
4119 <Font Size=+1><u>Return Value</u></Font><p>
4127 <a name="gmi_exec_until"></a>
4128 <center><Font Size=+2>gmi_exec_until</Font> (prg_control.c 396)</center>
4130 <Font Size=+1><u>Syntax</u></Font><p>
4135 gmi_exec_until(mi_h *h, const char *file, int line);
4141 <Font Size=+1><u>Description</u></Font><p>
4143 Execute until location is reached. If file is NULL then is until next
4148 <Font Size=+1><u>Return Value</u></Font><p>
4156 <a name="gmi_exec_until_addr"></a>
4157 <center><Font Size=+2>gmi_exec_until_addr</Font> (prg_control.c 412)</center>
4159 <Font Size=+1><u>Syntax</u></Font><p>
4164 gmi_exec_until_addr(mi_h *h, void *addr);
4170 <Font Size=+1><u>Description</u></Font><p>
4172 Execute until location is reached.
4176 <Font Size=+1><u>Return Value</u></Font><p>
4184 <a name="gmi_exec_return"></a>
4185 <center><Font Size=+2>gmi_exec_return</Font> (prg_control.c 429)</center>
4187 <Font Size=+1><u>Syntax</u></Font><p>
4192 gmi_exec_return(mi_h *h);
4198 <Font Size=+1><u>Description</u></Font><p>
4204 <Font Size=+1><u>Return Value</u></Font><p>
4206 A pointer to a new mi_frames structure indicating the current
4207 location. NULL on error.
4213 <a name="gmi_exec_kill"></a>
4214 <center><Font Size=+2>gmi_exec_kill</Font> (prg_control.c 447)</center>
4216 <Font Size=+1><u>Syntax</u></Font><p>
4221 gmi_exec_kill(mi_h *h);
4227 <Font Size=+1><u>Description</u></Font><p>
4229 Just kill the program. That's what -exec-abort should do, but it isn't
4230 implemented by gdb. This implementation only works if the interactive mode
4231 is disabled (gmi_gdb_set("confirm","off")).
4235 <Font Size=+1><u>Return Value</u></Font><p>
4243 <a name="gmi_stack_list_frames"></a>
4244 <center><Font Size=+2>gmi_stack_list_frames</Font> (stack_man.c 76)</center>
4246 <Font Size=+1><u>Syntax</u></Font><p>
4251 gmi_stack_list_frames(mi_h *h);
4257 <Font Size=+1><u>Description</u></Font><p>
4259 List of frames. Arguments aren't filled.
4263 <Font Size=+1><u>Return Value</u></Font><p>
4265 A new list of mi_frames or NULL on error.
4271 <a name="gmi_stack_list_frames_r"></a>
4272 <center><Font Size=+2>gmi_stack_list_frames_r</Font> (stack_man.c 93)</center>
4274 <Font Size=+1><u>Syntax</u></Font><p>
4279 gmi_stack_list_frames_r(mi_h *h, int from, int to);
4285 <Font Size=+1><u>Description</u></Font><p>
4287 List of frames. Arguments aren't filled. Only the frames in the @var{from}
4288 - @var{to} range are returned.
4292 <Font Size=+1><u>Return Value</u></Font><p>
4294 A new list of mi_frames or NULL on error.
4300 <a name="gmi_stack_list_arguments"></a>
4301 <center><Font Size=+2>gmi_stack_list_arguments</Font> (stack_man.c 109)</center>
4303 <Font Size=+1><u>Syntax</u></Font><p>
4308 gmi_stack_list_arguments(mi_h *h, int show);
4314 <Font Size=+1><u>Description</u></Font><p>
4316 List arguments. Only @var{level} and @var{args} filled.
4320 <Font Size=+1><u>Return Value</u></Font><p>
4322 A new list of mi_frames or NULL on error.
4328 <a name="gmi_stack_list_arguments_r"></a>
4329 <center><Font Size=+2>gmi_stack_list_arguments_r</Font> (stack_man.c 126)</center>
4331 <Font Size=+1><u>Syntax</u></Font><p>
4336 gmi_stack_list_arguments_r(mi_h *h, int show, int from, int to);
4342 <Font Size=+1><u>Description</u></Font><p>
4344 List arguments. Only @var{level} and @var{args} filled. Only for the
4345 frames in the @var{from} - @var{to} range.
4349 <Font Size=+1><u>Return Value</u></Font><p>
4351 A new list of mi_frames or NULL on error.
4357 <a name="gmi_stack_info_frame"></a>
4358 <center><Font Size=+2>gmi_stack_info_frame</Font> (stack_man.c 142)</center>
4360 <Font Size=+1><u>Syntax</u></Font><p>
4365 gmi_stack_info_frame(mi_h *h);
4371 <Font Size=+1><u>Description</u></Font><p>
4373 Information about the current frame, including args.
4377 <Font Size=+1><u>Return Value</u></Font><p>
4379 A new mi_frames or NULL on error.
4385 <a name="gmi_stack_info_depth"></a>
4386 <center><Font Size=+2>gmi_stack_info_depth</Font> (stack_man.c 158)</center>
4388 <Font Size=+1><u>Syntax</u></Font><p>
4393 gmi_stack_info_depth(mi_h *h, int max_depth);
4399 <Font Size=+1><u>Description</u></Font><p>
4405 <Font Size=+1><u>Return Value</u></Font><p>
4407 The depth or -1 on error.
4413 <a name="gmi_stack_info_depth_get"></a>
4414 <center><Font Size=+2>gmi_stack_info_depth_get</Font> (stack_man.c 184)</center>
4416 <Font Size=+1><u>Syntax</u></Font><p>
4421 gmi_stack_info_depth_get(mi_h *h);
4427 <Font Size=+1><u>Description</u></Font><p>
4429 Set stack info depth.
4433 <Font Size=+1><u>Return Value</u></Font><p>
4435 The depth or -1 on error.
4439 <Font Size=+1><u>Example</u></Font><p>
4446 <a name="gmi_stack_select_frame"></a>
4447 <center><Font Size=+2>gmi_stack_select_frame</Font> (stack_man.c 199)</center>
4449 <Font Size=+1><u>Syntax</u></Font><p>
4454 gmi_stack_select_frame(mi_h *h, int framenum);
4460 <Font Size=+1><u>Description</u></Font><p>
4462 Change current frame.
4466 <Font Size=+1><u>Return Value</u></Font><p>
4474 <a name="gmi_stack_list_locals"></a>
4475 <center><Font Size=+2>gmi_stack_list_locals</Font> (stack_man.c 215)</center>
4477 <Font Size=+1><u>Syntax</u></Font><p>
4482 gmi_stack_list_locals(mi_h *h, int show);
4488 <Font Size=+1><u>Description</u></Font><p>
4494 <Font Size=+1><u>Return Value</u></Font><p>
4496 A new mi_results tree containing the variables or NULL on error.
4502 <a name="gmi_target_select"></a>
4503 <center><Font Size=+2>gmi_target_select</Font> (target_man.c 54)</center>
4505 <Font Size=+1><u>Syntax</u></Font><p>
4510 gmi_target_select(mi_h *h, const char *type, const char *params);
4516 <Font Size=+1><u>Description</u></Font><p>
4518 Connect to a remote gdbserver using the specified methode.
4522 <Font Size=+1><u>Return Value</u></Font><p>
4530 <a name="gmi_target_attach"></a>
4531 <center><Font Size=+2>gmi_target_attach</Font> (target_man.c 70)</center>
4533 <Font Size=+1><u>Syntax</u></Font><p>
4538 gmi_target_attach(mi_h *h, pid_t pid);
4544 <Font Size=+1><u>Description</u></Font><p>
4546 Attach to an already running process.
4550 <Font Size=+1><u>Return Value</u></Font><p>
4552 The frame of the current location, NULL on error.
4558 <a name="gmi_target_detach"></a>
4559 <center><Font Size=+2>gmi_target_detach</Font> (target_man.c 87)</center>
4561 <Font Size=+1><u>Syntax</u></Font><p>
4566 gmi_target_detach(mi_h *h);
4572 <Font Size=+1><u>Description</u></Font><p>
4574 Detach from an attached process.
4578 <Font Size=+1><u>Return Value</u></Font><p>
4586 <a name="gmi_thread_list_ids"></a>
4587 <center><Font Size=+2>gmi_thread_list_ids</Font> (thread.c 49)</center>
4589 <Font Size=+1><u>Syntax</u></Font><p>
4594 gmi_thread_list_ids(mi_h *h, int **list);
4600 <Font Size=+1><u>Description</u></Font><p>
4602 List available thread ids.
4606 <Font Size=+1><u>Return Value</u></Font><p>
4614 <a name="gmi_thread_select"></a>
4615 <center><Font Size=+2>gmi_thread_select</Font> (thread.c 65)</center>
4617 <Font Size=+1><u>Syntax</u></Font><p>
4622 gmi_thread_select(mi_h *h, int id);
4628 <Font Size=+1><u>Description</u></Font><p>
4634 <Font Size=+1><u>Return Value</u></Font><p>
4636 A new mi_frames or NULL on error.
4642 <a name="gmi_thread_list_all_threads"></a>
4643 <center><Font Size=+2>gmi_thread_list_all_threads</Font> (thread.c 82)</center>
4645 <Font Size=+1><u>Syntax</u></Font><p>
4650 gmi_thread_list_all_threads(mi_h *h);
4656 <Font Size=+1><u>Description</u></Font><p>
4658 Get a list of frames for each available thread. Implemented using "info
4663 <Font Size=+1><u>Return Value</u></Font><p>
4665 A kist of frames, NULL on error
4671 <a name="gmi_var_create_nm"></a>
4672 <center><Font Size=+2>gmi_var_create_nm</Font> (var_obj.c 122)</center>
4674 <Font Size=+1><u>Syntax</u></Font><p>
4679 gmi_var_create_nm(mi_h *h, const char *name, int frame, const char *exp);
4685 <Font Size=+1><u>Description</u></Font><p>
4687 Create a variable object. I recommend using <a href="#gmi_var_create">gmi_var_create</a> and letting
4688 gdb choose the names.
4692 <Font Size=+1><u>Return Value</u></Font><p>
4694 A new mi_gvar strcture or NULL on error.
4700 <a name="gmi_var_create"></a>
4701 <center><Font Size=+2>gmi_var_create</Font> (var_obj.c 139)</center>
4703 <Font Size=+1><u>Syntax</u></Font><p>
4708 gmi_var_create(mi_h *h, int frame, const char *exp);
4714 <Font Size=+1><u>Description</u></Font><p>
4716 Create a variable object. The name is selected by gdb. Alternative:
4717 <a href="#gmi_full_var_create">gmi_full_var_create</a>.
4721 <Font Size=+1><u>Return Value</u></Font><p>
4723 A new mi_gvar strcture or NULL on error.
4729 <a name="gmi_var_delete"></a>
4730 <center><Font Size=+2>gmi_var_delete</Font> (var_obj.c 154)</center>
4732 <Font Size=+1><u>Syntax</u></Font><p>
4737 gmi_var_delete(mi_h *h, mi_gvar *var);
4743 <Font Size=+1><u>Description</u></Font><p>
4745 Delete a variable object. Doesn't free the mi_gvar data.
4749 <Font Size=+1><u>Return Value</u></Font><p>
4757 <a name="gmi_var_set_format"></a>
4758 <center><Font Size=+2>gmi_var_set_format</Font> (var_obj.c 170)</center>
4760 <Font Size=+1><u>Syntax</u></Font><p>
4765 gmi_var_set_format(mi_h *h, mi_gvar *var, enum mi_gvar_fmt format);
4771 <Font Size=+1><u>Description</u></Font><p>
4773 Set the format used to represent the result.
4777 <Font Size=+1><u>Return Value</u></Font><p>
4785 <a name="gmi_var_show_format"></a>
4786 <center><Font Size=+2>gmi_var_show_format</Font> (var_obj.c 191)</center>
4788 <Font Size=+1><u>Syntax</u></Font><p>
4793 gmi_var_show_format(mi_h *h, mi_gvar *var);
4799 <Font Size=+1><u>Description</u></Font><p>
4801 Fill the format field with info from gdb.
4805 <Font Size=+1><u>Return Value</u></Font><p>
4813 <a name="gmi_var_info_num_children"></a>
4814 <center><Font Size=+2>gmi_var_info_num_children</Font> (var_obj.c 207)</center>
4816 <Font Size=+1><u>Syntax</u></Font><p>
4821 gmi_var_info_num_children(mi_h *h, mi_gvar *var);
4827 <Font Size=+1><u>Description</u></Font><p>
4829 Fill the numchild field with info from gdb.
4833 <Font Size=+1><u>Return Value</u></Font><p>
4841 <a name="gmi_var_info_type"></a>
4842 <center><Font Size=+2>gmi_var_info_type</Font> (var_obj.c 223)</center>
4844 <Font Size=+1><u>Syntax</u></Font><p>
4849 gmi_var_info_type(mi_h *h, mi_gvar *var);
4855 <Font Size=+1><u>Description</u></Font><p>
4857 Fill the type field with info from gdb.
4861 <Font Size=+1><u>Return Value</u></Font><p>
4869 <a name="gmi_var_info_expression"></a>
4870 <center><Font Size=+2>gmi_var_info_expression</Font> (var_obj.c 240)</center>
4872 <Font Size=+1><u>Syntax</u></Font><p>
4877 gmi_var_info_expression(mi_h *h, mi_gvar *var);
4883 <Font Size=+1><u>Description</u></Font><p>
4885 Fill the expression and lang fields with info from gdb. Note that lang
4886 isn't filled during creation.
4890 <Font Size=+1><u>Return Value</u></Font><p>
4898 <a name="gmi_var_show_attributes"></a>
4899 <center><Font Size=+2>gmi_var_show_attributes</Font> (var_obj.c 258)</center>
4901 <Font Size=+1><u>Syntax</u></Font><p>
4906 gmi_var_show_attributes(mi_h *h, mi_gvar *var);
4912 <Font Size=+1><u>Description</u></Font><p>
4914 Fill the attr field with info from gdb. Note that attr isn't filled
4919 <Font Size=+1><u>Return Value</u></Font><p>
4927 <a name="gmi_full_var_create"></a>
4928 <center><Font Size=+2>gmi_full_var_create</Font> (var_obj.c 275)</center>
4930 <Font Size=+1><u>Syntax</u></Font><p>
4935 gmi_full_var_create(mi_h *h, int frame, const char *exp);
4941 <Font Size=+1><u>Description</u></Font><p>
4943 Create the variable and also fill the lang and attr fields. The name is
4948 <Font Size=+1><u>Return Value</u></Font><p>
4950 A new mi_gvar strcture or NULL on error.
4956 <a name="gmi_var_update"></a>
4957 <center><Font Size=+2>gmi_var_update</Font> (var_obj.c 297)</center>
4959 <Font Size=+1><u>Syntax</u></Font><p>
4964 gmi_var_update(mi_h *h, mi_gvar *var, mi_gvar_chg **changed);
4970 <Font Size=+1><u>Description</u></Font><p>
4972 Update variable. Use NULL for all. Note that *changed can be NULL if none
4977 <Font Size=+1><u>Return Value</u></Font><p>
4979 !=0 OK. The @var{changed} list contains the list of changed vars.
4985 <a name="gmi_var_assign"></a>
4986 <center><Font Size=+2>gmi_var_assign</Font> (var_obj.c 313)</center>
4988 <Font Size=+1><u>Syntax</u></Font><p>
4993 gmi_var_assign(mi_h *h, mi_gvar *var, const char *expression);
4999 <Font Size=+1><u>Description</u></Font><p>
5001 Change variable. The new value replaces the @var{value} field.
5005 <Font Size=+1><u>Return Value</u></Font><p>
5013 <a name="gmi_var_evaluate_expression"></a>
5014 <center><Font Size=+2>gmi_var_evaluate_expression</Font> (var_obj.c 337)</center>
5016 <Font Size=+1><u>Syntax</u></Font><p>
5021 gmi_var_evaluate_expression(mi_h *h, mi_gvar *var);
5027 <Font Size=+1><u>Description</u></Font><p>
5029 Fill the value field getting the current value for a variable.
5033 <Font Size=+1><u>Return Value</u></Font><p>
5035 !=0 OK, value contains the result.
5041 <a name="gmi_var_list_children"></a>
5042 <center><Font Size=+2>gmi_var_list_children</Font> (var_obj.c 362)</center>
5044 <Font Size=+1><u>Syntax</u></Font><p>
5049 gmi_var_list_children(mi_h *h, mi_gvar *var);
5055 <Font Size=+1><u>Description</u></Font><p>
5057 List children. It ONLY returns the first level information. :-(<br>
5058 On success the child field contains the list of children.
5062 <Font Size=+1><u>Return Value</u></Font><p>