summaryrefslogtreecommitdiff
path: root/man/building.texi
diff options
context:
space:
mode:
Diffstat (limited to 'man/building.texi')
-rw-r--r--man/building.texi129
1 files changed, 67 insertions, 62 deletions
diff --git a/man/building.texi b/man/building.texi
index 5cadfbcc553..2985a04895c 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -398,7 +398,10 @@ commands of Shell mode are available (@pxref{Shell Mode}). GUD mode
also provides commands for setting and clearing breakpoints, for
selecting stack frames, and for stepping through the program. These
commands are available both in the GUD buffer and globally, but with
-different key bindings.
+different key bindings. It also has its own toolbar from which you
+can invoke the more common commands by clicking on the appropriate
+icon. This is particularly useful for repetitive commands like
+gud-next and gud-step and allows the user to hide the GUD buffer.
The breakpoint commands are normally used in source file buffers,
because that is the easiest way to specify where to set or clear the
@@ -535,6 +538,12 @@ be bizarre. See the GDB manual entry regarding @code{jump} for
details.
@end table
+If you started GDB with the command @code{gdba}, you can click
+@kbd{Mouse-1} on a line of the source buffer, in the fringe or display
+margin, to set a breakpoint there. If a breakpoint already exists on
+that line, this action will remove it.
+(@code{gdb-mouse-toggle-breakpoint}).
+
These commands interpret a numeric argument as a repeat count, when
that makes sense.
@@ -631,8 +640,7 @@ to know GDB commands.
@menu
* Breakpoints Buffer:: A breakpoint control panel.
* Stack Buffer:: Select a frame from the call stack.
-* Data Display:: Display and update expressions in their own buffer.
-* Display Buffer:: Control the displayed expressions.
+* Watch Expressions:: Monitor variable values in the speedbar.
* Other Buffers:: Input/output, locals, registers and assembler buffers.
* Layout:: Control the number of displayed buffers.
@end menu
@@ -681,59 +689,41 @@ associated source in the source buffer. Alternatively, click
locals buffer is displayed then its contents update to display the
variables that are local to the new frame.
-@node Data Display
-@subsubsection Data Display
-@cindex displaying expressions in GDB
+@node Watch Expressions
+@subsubsection Watch Expressions
+@cindex Watching expressions in GDB
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 display
-icon in the toolbar (@code{gud-display}).
-
-Each displayed expression has its own frame on a graphical display and
-its own buffer on a text-only terminal. Arrays and structures have
-their own display formats. To display an array as a slice, at the top
-of the display window, click @kbd{Mouse-2} on the array index that you
-want to restrict and you will be prompted in the mini-buffer for a
-start and a stop value. Click @kbd{Mouse-2} on a pointer to
-dereference it in the same frame/buffer. Click @kbd{S-Mouse-2} there
-to do the same thing but in a new frame/buffer. There are two special
-commands for these buffers:
-
-@table @kbd
-@item @kbd{v}
-@kindex v @r{(GDB data buffer)}
-@findex gdb-array-visualise
-Visualise an array using the graph program from plotutils if this is
-installed. This only works for one dimensional arrays
-(@code{gdb-array-visualise}).
-
-@item @kbd{q}
-@kindex q @r{(GDB data buffer)}
-@findex gdb-delete-expression
-Delete the displayed expression and the associated frame
-(@code{gdb-delete-expression}).
-@end table
-
-@node Display Buffer
-@subsubsection Display Buffer
-
-The display buffer shows the list of displayed expressions
-(@pxref{Auto Display,,, gdb, The GNU debugger}). As with the
-breakpoints, you can enable/disable or delete the displayed
-expressions:
-
-@table @kbd
-@item @key{SPC}
-@kindex SPC @r{(GDB display buffer)}
-@findex gdb-toggle-display
-Enable/disable the display at the current line
-(@code{gdb-toggle-display}).
-
-@item @kbd{d}
-@kindex d @r{(GDB display buffer)}
-@findex gdb-delete-display
-Delete the display at the current line (@code{gdb-delete-display}).
-@end table
+then place the cursor over the variable name and click on the watch
+icon in the toolbar (@code{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. To expand or contract a complex data type, click @kbd{Mouse-2}
+on the tag to the left of the expression.
+
+@kindex RET @r{(GDB speedbar)}
+@findex gdb-var-delete
+With the cursor over the root expression of a complex data type, type
+@key{D} to delete it from the speedbar
+(@code{gdb-var-delete}).
+
+@findex gdb-edit-value
+With the cursor over a simple data type or an element of a complex
+data type which holds a value, type @key{RET} or click @kbd{Mouse-2} to edit
+its value. A prompt for a new value appears in the mini-buffer
+(@code{gdb-edit-value}).
+
+If you set the variable @code{gdb-show-changed-values} to
+non-@code{nil} (the default value), then Emacs will use
+font-lock-warning-face to display values that have recently changed in
+the speedbar.
+
+If you set the variable @code{gdb-use-colon-colon-notation} to a
+non-@code{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 @code{nil}.
@node Other Buffers
@subsubsection Other Buffers
@@ -750,7 +740,7 @@ current frame for simple data types (@pxref{Frame Info,,, gdb, The GNU
debugger}).
Arrays and structures display their type only. You must display them
-separately to examine their values. @ref{Data Display}.
+separately to examine their values. @ref{Watch Expressions}.
@item Registers Buffer
The registers buffer displays the values held by the registers
@@ -761,18 +751,21 @@ The assembler buffer displays the current frame as machine code. An
overlay arrow points to the current instruction and you can set and
remove breakpoints as with the source buffer. Breakpoints also
appear in the margin.
+
+@item Threads Buffer
+
+The threads buffer displays a summary of all threads currently in your
+program.(@pxref{Threads,,, gdb, The GNU debugger}). Move point to
+any thread in the list and type @key{RET} to make it become the
+current thread (@code{gdb-threads-select}) and display the associated
+source in the source buffer. Alternatively, click @kbd{Mouse-2} to
+make the selected thread become the current one.
+
@end table
@node Layout
@subsubsection Layout
@cindex GDB User Interface layout
-You may choose to display the additional buffers described previously
-either in the same frame or a different one. Select GDB-windows or
-GDB-Frames from the menu-bar under the heading GUD. If the menu-bar
-is unavailable, type @code{M-x
-gdb-display-@var{buffertype}-buffer} or @code{M-x
-gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype}
-is the relevant buffer type e.g breakpoints.
@findex gdb-many-windows
@vindex gdb-many-windows
@@ -800,6 +793,14 @@ If you change the window layout, for example, while editing and
re-compiling your program, then you can restore it with
@code{gdb-restore-windows}.
+You may also choose which additional buffers you want to display,
+either in the same frame or a different one. Select GDB-windows or
+GDB-Frames from the menu-bar under the heading GUD. If the menu-bar
+is unavailable, type @code{M-x
+gdb-display-@var{buffertype}-buffer} or @code{M-x
+gdb-frame-@var{buffertype}-buffer} respectively, where @var{buffertype}
+is the relevant buffer type e.g breakpoints.
+
@node Executing Lisp
@section Executing Lisp Expressions
@@ -1088,3 +1089,7 @@ programs to be run in Emacs): in both modes it has the effect of installing
the function definition that point is in, but the way of doing so is
different according to where the relevant Lisp environment is found.
@xref{Executing Lisp}.
+
+@ignore
+ arch-tag: 9c3c2f71-b332-4144-8500-3ff9945a50ed
+@end ignore