@c This is part of the Emacs manual.
@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+@c 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node Building, Maintaining, Programs, Top
@chapter Compiling and Testing Programs
allowed. GUD assumes that the first argument not starting with a
@samp{-} is the executable file name.
+@c Running a debugger on a remote host
Tramp provides a facility to debug programs on remote hosts.
@xref{Running a debugger on a remote host, Running a debugger on a remote host,, tramp, The Tramp Manual}.
-@c Running a debugger on a remote host
+Both debugger and program are on the same remote host.
+This should not confused with debugging remote programs
+where the program runs on diferent machine to the debugger,
+as can be done with GDB, for example.
+@xref{Remote Debugging,, Debugging Remote Programs, gdb, The GNU debugger}.
@node Debugger Operation
@subsection Debugger Operation
@smallexample
@group
+--------------------------------+--------------------------------+
-| GUD buffer (I/O of GDB) | Locals buffer |
+| GUD buffer (I/O of GDB) | Locals/Registers buffer |
|--------------------------------+--------------------------------+
| Primary Source buffer | I/O buffer for debugged pgm |
|--------------------------------+--------------------------------+
-| Stack buffer | Breakpoints buffer |
+| Stack buffer | Breakpoints/thread buffer |
+--------------------------------+--------------------------------+
@end group
@end smallexample
Visit the source line for the breakpoint you click on.
@end table
+When @code{gdb-many-windows} is non-@code{nil}, the breakpoints buffer
+shares its window with the threads buffer. To switch from one to the
+other click with @kbd{mouse-1} on the relevant button in the header
+line.
+
@node Stack Buffer
@subsubsection Stack Buffer
locals buffer is visible, its contents update to display the variables
that are local in the new thread.
+When there is more than one main thread and the threads buffer is
+present, Emacs displays the selected thread number in the mode line of
+many of the GDB-UI Buffers.
+
@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.
+displays. Alternatively, use @kbd{S} or @kbd{N} respectively. Click
+@kbd{Mouse-3} on the header line to select the display format or unit
+size for these data items.
@end table
+When @code{gdb-many-windows} is non-@code{nil}, the threads buffer
+shares its window with the breakpoints buffer, and the locals buffer
+with the registers buffer. To switch from one to the other click with
+@kbd{mouse-1} on the relevant button in the header line.
+
@node Watch Expressions
@subsubsection Watch Expressions
@cindex Watching expressions in GDB