+@menu
+* GDB User Interface Layout:: Control the number of displayed buffers.
+* Breakpoints Buffer:: A breakpoint control panel.
+* Stack Buffer:: Select a frame from the call stack.
+* Watch Expressions:: Monitor variable values in the speedbar.
+* Other GDB User Interface Buffers:: Input/output, locals, registers,
+ assembler, threads and memory buffers.
+@end menu
+
+@node GDB User Interface Layout
+@subsubsection GDB User Interface Layout
+@cindex GDB User Interface layout
+
+@vindex gdb-many-windows
+ If the variable @code{gdb-many-windows} is @code{nil} (the default
+value) then @kbd{M-x gdb} normally displays only the GUD buffer.
+However, if the variable @code{gdb-show-main} is also non-@code{nil},
+it starts with two windows: one displaying the GUD buffer, and the
+other showing the source for the @code{main} function of the program
+you are debugging.
+
+ If @code{gdb-many-windows} is non-@code{nil}, then @kbd{M-x gdb}
+displays the following frame layout:
+
+@example
++--------------------------------+--------------------------------+
+| | |
+| GUD buffer (I/O of GDB) | Locals buffer |
+| | |
+|--------------------------------+--------------------------------+
+| | |
+| Source buffer | I/O buffer for debugged pgm |
+| | |
+|--------------------------------+--------------------------------+
+| | |
+| Stack buffer | Breakpoints buffer |
+| | |
++--------------------------------+--------------------------------+
+@end example
+
+ However, if @code{gdb-use-separate-io-buffer} is @code{nil}, the I/O
+buffer does not appear and the source buffer occupies the full width
+of the frame.
+
+@findex gdb-restore-windows
+ If you change the window layout, for example, while editing and
+re-compiling your program, then you can restore this standard window
+layout with the command @code{gdb-restore-windows}.
+
+@findex gdb-many-windows
+ To switch between this standard layout and a simple layout
+containing just the GUD buffer and a source file, type @kbd{M-x
+gdb-many-windows}.
+
+ You may also specify additional GUD-related buffers to display,
+either in the same frame or a different one. Select the buffers you
+want with the @samp{GUD->GDB-windows} and @samp{GUD->GDB-Frames}
+sub-menus. 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, such as
+@samp{breakpoints}. Most of these buffers are read-only, and typing
+@kbd{q} in them kills them.
+
+ When you finish debugging, kill the GUD buffer with @kbd{C-x k},
+which will also kill all the buffers associated with the session.
+However you need not do this if, after editing and re-compiling your
+source code within Emacs, you wish continue debugging. When you
+restart execution, GDB will automatically find your new executable.
+Keeping the GUD buffer has the advantage of keeping the shell history
+as well as GDB's breakpoints. You do need to check that the
+breakpoints in recently edited source files are still in the right
+places.
+
+@node Breakpoints Buffer
+@subsubsection Breakpoints Buffer
+
+ The breakpoints buffer shows the existing breakpoints and
+watchpoints (@pxref{Breakpoints,,, gdb, The GNU debugger}). It has
+these special commands, which mostly apply to the @dfn{current
+breakpoint}, the breakpoint which point is on.
+
+@table @kbd
+@item @key{SPC}
+@kindex SPC @r{(GDB breakpoints buffer)}
+@findex gdb-toggle-breakpoint
+Enable/disable the current breakpoint (@code{gdb-toggle-breakpoint}).
+On a graphical display, this changes the color of a bullet in the
+margin of the source buffer at the relevant line. This is red when
+the breakpoint is enabled and grey when it is disabled. Text-only
+terminals correspondingly display a @samp{B} or @samp{b}.
+
+@item D
+@kindex D @r{(GDB breakpoints buffer)}
+@findex gdb-delete-breakpoint
+Delete the current breakpoint (@code{gdb-delete-breakpoint}).
+
+@item @key{RET}
+@kindex RET @r{(GDB breakpoints buffer)}
+@findex gdb-goto-breakpoint
+Visit the source line for the current breakpoint
+(@code{gdb-goto-breakpoint}).
+
+@item Mouse-2
+@kindex Mouse-2 @r{(GDB breakpoints buffer)}
+Visit the source line for the breakpoint you click on.
+@end table
+
+@node Stack Buffer
+@subsubsection Stack Buffer
+
+ The stack buffer displays a @dfn{call stack}, with one line for each
+of the nested subroutine calls (@dfn{stack frames}) now active in the
+program. @xref{Backtrace,, Backtraces, gdb, The GNU debugger}.
+
+@findex gdb-frames-select
+ The selected frame number is displayed in reverse contrast. To
+select a frame in GDB, move point in the stack buffer to that stack
+frame and type @key{RET} (@code{gdb-frames-select}), or click
+@kbd{Mouse-2} on a stack frame. If the locals buffer is visible,
+selecting a stack frame updates it to display the local variables of
+the new frame.
+
+@node Watch Expressions
+@subsubsection Watch Expressions
+@cindex Watching expressions in GDB
+
+@findex gud-watch
+@kindex C-x C-a C-w @r{(GUD)}
+ If you want to see how a variable changes each time your program
+stops, move point into the variable name and click on the watch icon
+in the tool bar (@code{gud-watch}) or type @kbd{C-x C-a C-w}. If you
+specify a prefix argument, you can enter the variable name in the
+minibuffer.
+
+ 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, when the speedbar frame is selected, display the
+type as a tooltip. Higher levels show the name, type and address
+value for pointers and just the name and type otherwise. Root expressions
+also display the frame address as a tooltip to help identify the frame
+in which they were defined.
+
+ To expand or contract a complex data type, click @kbd{Mouse-2}
+on the tag to the left of the expression.
+
+@kindex D @r{(GDB speedbar)}
+@findex gdb-var-delete
+ To delete a complex watch expression, move point to the root
+expression in the speedbar and type @kbd{D} (@code{gdb-var-delete}).
+
+@kindex RET @r{(GDB speedbar)}
+@findex gdb-edit-value
+ To edit a variable with a simple data type, or a simple element of a
+complex data type, move point there in the speedbar and type @key{RET}
+(@code{gdb-edit-value}). Or you can click @kbd{Mouse-2} on a value to
+edit it. Either way, this reads the new value using the minibuffer.
+
+@vindex gdb-show-changed-values
+ If you set the variable @code{gdb-show-changed-values} to
+non-@code{nil} (the default value), Emacs uses
+@code{font-lock-warning-face} to highlight values that have recently
+changed and @code{shadow} face to make variables which have gone out of
+scope less noticeable. When a variable goes out of scope you can't
+edit its value.
+
+@vindex gdb-use-colon-colon-notation
+ If the variable @code{gdb-use-colon-colon-notation} is
+non-@code{nil}, Emacs uses the @samp{@var{function}::@var{variable}}
+format. This allows the user to display watch expressions which share
+the same variable name. The default value is @code{nil}.
+
+@vindex gdb-speedbar-auto-raise
+To automatically raise the speedbar every time the display of watch
+expressions updates, set @code{gdb-speedbar-auto-raise} to
+non-@code{nil}. This can be useful if you are debugging with a full
+screen Emacs frame.
+
+@node Other GDB User Interface Buffers
+@subsubsection Other Buffers
+
+@table @asis
+@item Input/Output Buffer
+@vindex gdb-use-separate-io-buffer
+If the variable @code{gdb-use-separate-io-buffer} is non-@code{nil},
+the executable program that is being debugged takes its input and
+displays its output here. Otherwise it uses the GUD buffer for that.
+To toggle whether GUD mode uses this buffer, do @kbd{M-x
+gdb-use-separate-io-buffer}. That takes effect when you next
+restart the program you are debugging.
+
+The history and replay commands from Shell mode are available here,
+as are the commands to send signals to the program you are debugging.
+@xref{Shell Mode}.
+
+@item Locals Buffer
+The locals buffer displays the values of local variables of the
+current frame for simple data types (@pxref{Frame Info, Frame Info,
+Information on a frame, gdb, The GNU debugger}).
+
+Arrays and structures display their type only. With GDB 6.4 or later,
+move point to their name and press @key{RET}, or alternatively click
+@kbd{Mouse-2} there, to examine their values. With earlier versions
+of GDB, use @kbd{Mouse-2} or @key{RET} on the type description
+(@samp{[struct/union]} or @samp{[array]}). @xref{Watch Expressions}.
+
+@item Registers Buffer
+@findex toggle-gdb-all-registers
+The registers buffer displays the values held by the registers
+(@pxref{Registers,,, gdb, The GNU debugger}). Press @key{RET} or
+click @kbd{Mouse-2} on a register if you want to change its value.
+With GDB 6.4 or later, recently changed register values display with
+@code{font-lock-warning-face}. With earlier versions of GDB, you can
+press @key{SPC} to toggle the display of floating point registers
+(@code{toggle-gdb-all-registers}).
+
+@item Assembler Buffer
+The assembler buffer displays the current frame as machine code. An
+arrow points to the current instruction, and you can set and remove
+breakpoints as in a source buffer. Breakpoint icons also appear in
+the fringe or margin.
+
+@item Threads Buffer
+@findex gdb-threads-select
+The threads buffer displays a summary of all threads currently in your
+program (@pxref{Threads, Threads, Debugging programs with multiple
+threads, gdb, The GNU debugger}). Move point to any thread in the
+list and press @key{RET} to select it (@code{gdb-threads-select}) and
+display the associated source in the source buffer. Alternatively,
+click @kbd{Mouse-2} on a thread to select it. If the locals buffer is
+visible, its contents update to display the variables that are local
+in the new thread.
+
+@item Memory Buffer
+The memory buffer lets you examine sections of program memory
+(@pxref{Memory, Memory, Examining memory, gdb, The GNU debugger}).
+Click @kbd{Mouse-1} on the appropriate part of the header line to
+change the starting address or number of data items that the buffer
+displays. Click @kbd{Mouse-3} on the header line to select the
+display format or unit size for these data items.
+
+@end table