Debugging with GDB (September 2007)
x Debugging with GDB
21 The gdb/mi Interface . . . . . . . . . . . . . . . . . . . 265
Function and purp os e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
Notation and terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
21.1 gdb/mi Command Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
21.1.1 gdb/mi Input syntax . . . . . . . . . . . . . . . . . . . . . . . . 265
21.1.2 gdb/mi Output syntax . . . . . . . . . . . . . . . . . . . . . . 266
21.1.3 Simple examples of gdb/mi interaction. . . . . . . . 268
21.2 gdb/mi compatibility with CLI . . . . . . . . . . . . . . . . . . . . . . . 268
21.3 gdb/mi output records . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
21.3.1 gdb/mi result records . . . . . . . . . . . . . . . . . . . . . . . 269
21.3.2 gdb/mi stream records . . . . . . . . . . . . . . . . . . . . . . 269
21.3.3 gdb/mi out-of-band records . . . . . . . . . . . . . . . . . . 269
21.4 gdb/mi command description format . . . . . . . . . . . . . . . . . . 270
21.5 gdb/mi breakpoint table commands . . . . . . . . . . . . . . . . . . . 271
21.6 gdb/mi Data manipulation . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
21.7 gdb/mi program control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
21.8 Miscellaneous GDB commands in gdb/mi. . . . . . . . . . . . . . 300
21.9 gdb/mi Stack Manipulation Commands . . . . . . . . . . . . . . . 302
21.10 gdb/mi Symbol query commands . . . . . . . . . . . . . . . . . . . . 307
21.11 gdb/mi Target Manipulation Commands . . . . . . . . . . . . . 310
21.12 gdb/mi thread commands . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
21.13 gdb/mi tracepoint commands. . . . . . . . . . . . . . . . . . . . . . . . 317
21.14 gdb/mi variable objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
22 Reporting Bugs in GDB . . . . . . . . . . . . . . . . 323
22.1 Have you found a bug? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
22.2 How to report bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
Appendix A Installing GDB . . . . . . . . . . . . . . . . 327
A.1 Compiling GDB in another directory . . . . . . . . . . . . . . . . . . . 328
A.2 Specifying names for hosts and targets . . . . . . . . . . . . . . . . . 329
A.3 configure options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333