270
Chapter 26. The gdb/mi Interface
args=[{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""},
{name="arg",value="0x2"}],file="vprintf.c",line="31"}
(gdb)
26.17. gdb/mi Tracepoint Commands
The tracepoint commands are not yet implemented.
26.18. gdb/mi Variable Objects
26.18.1. Motivation for Variable Objects in gdb/mi
For the implementation of a variable debugger window (locals, watched expressions, etc.), we are
proposing the adaptation of the existing code used by
Insight
.
The two main reasons for that are:
1. It has been proven in practice (it is already on its second generation).
2. It will shorten development time (needless to say how important it is now).
The original interface was designed to be used by Tcl code, so it was slightly changed so it could be
used through gdb/mi. This section describes the gdb/mi operations that will be available and gives
some hints about their use.
Note
: In addition to the set of operations described here, we expect the gui implementation of a
variable window to require, at least, the following operations:
•
-gdb-show output-radix
•
-stack-list-arguments
•
-stack-list-locals
•
-stack-select-frame
26.18.2. Introduction to Variable Objects in gdb/mi
The basic idea behind variable objects is the creation of a named object to represent a variable, an
expression, a memory location or even a CPU register. For each object created, a set of operations is
available for examining or changing its properties.
Furthermore, complex data types, such as C structures, are represented in a tree format. For instance,
the
struct
type variable is the root and the children will represent the struct members. If a child is
itself of a complex type, it will also have children of its own. Appropriate language differences are
handled for C, C
++
and Java.
When returning the actual values of the objects, this facility allows for the individual selection of the
display format used in the result creation. It can be chosen among: binary, decimal, hexadecimal, octal
and natural. Natural refers to a default format automatically chosen based on the variable type (like
decimal for an
int
, hex for pointers, etc.).
The following is the complete set of gdb/mi operations defined to access this functionality:
Summary of Contents for ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Page 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......