Next: Other GDB User Interface Buffers, Previous: Stack Buffer, Up: GDB Graphical Interface
If you want to see how a variable changes each time your program stops
then place the cursor over the variable name and click on the watch
icon in the tool bar (gud-watch
).
Each watch expression is displayed in the speedbar. Complex data types, such as arrays, structures and unions are represented in a tree format. Leaves and simple data types show the name of the expression and its value, and display the type as a tooltip. Higher levels show the name, type and address value for pointers and just the name and type otherwise.
To expand or contract a complex data type, click Mouse-2 on the tag to the left of the expression.
With the cursor over the root expression of a complex data type, type
D to delete it from the speedbar
(gdb-var-delete
).
With the cursor over a simple data type or an element of a complex
data type which holds a value, type <RET> or click Mouse-2 to edit
its value. A prompt for a new value appears in the mini-buffer
(gdb-edit-value
).
If you set the variable gdb-show-changed-values
to
non-nil
(the default value), Emacs will use
font-lock-warning-face to display values that have recently changed in
the speedbar.
If you set the variable gdb-use-colon-colon-notation
to a
non-nil
value then, in C, Emacs will use the
function::variable format to display variables in the
speedbar. Since this does not work for variables defined in compound
statements, the default value is nil
.