Index: testsuite/ChangeLog
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index 43f6e368f0c120a749784220016d0bf5364627f3..7bb99c630fa077a5a60929aa6d9a7e16d08534dd 100644 (file)
@@ -1,6 +1,6 @@
 \input texinfo      @c -*-texinfo-*-
 @c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 1999, 2000, 2001, 2002
+@c 1999, 2000, 2001, 2002, 2003
 @c Free Software Foundation, Inc.
 @c
 @c %**start of header
 @syncodeindex fn cp
 
 @c !!set GDB manual's edition---not the same as GDB version!
+@c This is updated by GNU Press.
 @set EDITION Ninth
 
-@c !!set GDB manual's revision date
-@set DATE December 2001
+@c !!set GDB edit command default editor
+@set EDITOR /bin/ex
 
-@c THIS MANUAL REQUIRES TEXINFO 3.12 OR LATER.
+@c THIS MANUAL REQUIRES TEXINFO 4.0 OR LATER.
 
 @c This is a dir.info fragment to support semi-automated addition of
 @c manuals to an info tree.
 This file documents the @sc{gnu} debugger @value{GDBN}.
 
 
-This is the @value{EDITION} Edition, @value{DATE},
-of @cite{Debugging with @value{GDBN}: the @sc{gnu} Source-Level Debugger}
-for @value{GDBN} Version @value{GDBVN}.
+This is the @value{EDITION} Edition, of @cite{Debugging with
+@value{GDBN}: the @sc{gnu} Source-Level Debugger} for @value{GDBN}
+Version @value{GDBVN}.
 
 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
-              1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+              1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the GNU Free Documentation License, Version 1.1 or
@@ -71,7 +72,6 @@ development.''
 @subtitle The @sc{gnu} Source-Level Debugger
 @sp 1
 @subtitle @value{EDITION} Edition, for @value{GDBN} version @value{GDBVN}
-@subtitle @value{DATE}
 @author Richard Stallman, Roland Pesch, Stan Shebs, et al.
 @page
 @tex
@@ -84,7 +84,7 @@ development.''
 
 @vskip 0pt plus 1filll
 Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
-1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+1996, 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
 @sp 2
 Published by the Free Software Foundation @*
 59 Temple Place - Suite 330, @*
@@ -105,72 +105,17 @@ development.''
 @end titlepage
 @page
 
-@ifinfo
+@ifnottex
 @node Top, Summary, (dir), (dir)
 
 @top Debugging with @value{GDBN}
 
 This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
 
-This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
-@value{GDBVN}.
-
-Copyright (C) 1988-2002 Free Software Foundation, Inc.
-
-@menu
-* Summary::                     Summary of @value{GDBN}
-* Sample Session::              A sample @value{GDBN} session
-
-* Invocation::                  Getting in and out of @value{GDBN}
-* Commands::                    @value{GDBN} commands
-* Running::                     Running programs under @value{GDBN}
-* Stopping::                    Stopping and continuing
-* Stack::                       Examining the stack
-* Source::                      Examining source files
-* Data::                        Examining data
-* Tracepoints::                 Debugging remote targets non-intrusively
-* Overlays::                    Debugging programs that use overlays
-
-* Languages::                   Using @value{GDBN} with different languages
-
-* Symbols::                     Examining the symbol table
-* Altering::                    Altering execution
-* GDB Files::                   @value{GDBN} files
-* Targets::                     Specifying a debugging target
-* Configurations::              Configuration-specific information
-* Controlling GDB::             Controlling @value{GDBN}
-* Sequences::                   Canned sequences of commands
-* TUI::                         @value{GDBN} Text User Interface
-* Emacs::                       Using @value{GDBN} under @sc{gnu} Emacs
-* Annotations::                 @value{GDBN}'s annotation interface.
-* GDB/MI::                      @value{GDBN}'s Machine Interface.
-
-* GDB Bugs::                    Reporting bugs in @value{GDBN}
-* Formatting Documentation::    How to format and print @value{GDBN} documentation
-
-* Command Line Editing::        Command Line Editing
-* Using History Interactively:: Using History Interactively
-* Installing GDB::              Installing GDB
-* Maintenance Commands::        Maintenance Commands
-* GNU Free Documentation License::  The license for this documentation
-* Index::                       Index
-@end menu
-
-@end ifinfo
-
-@c the replication sucks, but this avoids a texinfo 3.12 lameness
-
-@ifhtml
-@node Top
-
-@top Debugging with @value{GDBN}
-
-This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
-
-This is the @value{EDITION} Edition, @value{DATE}, for @value{GDBN} Version
+This is the @value{EDITION} Edition, for @value{GDBN} Version
 @value{GDBVN}.
 
-Copyright (C) 1988-2000 Free Software Foundation, Inc.
+Copyright (C) 1988-2003 Free Software Foundation, Inc.
 
 @menu
 * Summary::                     Summary of @value{GDBN}
@@ -183,6 +128,7 @@ Copyright (C) 1988-2000 Free Software Foundation, Inc.
 * Stack::                       Examining the stack
 * Source::                      Examining source files
 * Data::                        Examining data
+* Macros::                      Preprocessor Macros
 * Tracepoints::                 Debugging remote targets non-intrusively
 * Overlays::                    Debugging programs that use overlays
 
@@ -192,10 +138,12 @@ Copyright (C) 1988-2000 Free Software Foundation, Inc.
 * Altering::                    Altering execution
 * GDB Files::                   @value{GDBN} files
 * Targets::                     Specifying a debugging target
+* Remote Debugging::            Debugging remote programs
 * Configurations::              Configuration-specific information
 * Controlling GDB::             Controlling @value{GDBN}
 * Sequences::                   Canned sequences of commands
 * TUI::                         @value{GDBN} Text User Interface
+* Interpreters::               Command Interpreters
 * Emacs::                       Using @value{GDBN} under @sc{gnu} Emacs
 * Annotations::                 @value{GDBN}'s annotation interface.
 * GDB/MI::                      @value{GDBN}'s Machine Interface.
@@ -207,16 +155,16 @@ Copyright (C) 1988-2000 Free Software Foundation, Inc.
 * Using History Interactively:: Using History Interactively
 * Installing GDB::              Installing GDB
 * Maintenance Commands::        Maintenance Commands
+* Remote Protocol::             GDB Remote Serial Protocol
+* Copying::                    GNU General Public License says
+                                how you can copy and share GDB
 * GNU Free Documentation License::  The license for this documentation
 * Index::                       Index
 @end menu
 
-@end ifhtml
+@end ifnottex
 
-@c TeX can handle the contents at the start but makeinfo 3.12 can not
-@iftex
 @contents
-@end iftex
 
 @node Summary
 @unnumbered Summary of @value{GDBN}
@@ -247,10 +195,9 @@ You can use @value{GDBN} to debug programs written in C and C++.
 For more information, see @ref{Support,,Supported languages}.
 For more information, see @ref{C,,C and C++}.
 
-@cindex Chill
 @cindex Modula-2
-Support for Modula-2 and Chill is partial.  For information on Modula-2,
-see @ref{Modula-2,,Modula-2}.  For information on Chill, see @ref{Chill}.
+Support for Modula-2 is partial.  For information on Modula-2, see
+@ref{Modula-2,,Modula-2}.
 
 @cindex Pascal
 Debugging Pascal programs which use sets, subranges, file variables, or
@@ -396,7 +343,7 @@ omitted from this list, we would like to add your names!
 So that they may not regard their many labors as thankless, we
 particularly thank those who shepherded @value{GDBN} through major
 releases:
-Andrew Cagney (releases 5.0 and 5.1);
+Andrew Cagney (releases 5.3, 5.2, 5.1 and 5.0);
 Jim Blandy (release 4.18);
 Jason Molenda (release 4.17);
 Stan Shebs (release 4.14);
@@ -422,7 +369,7 @@ Henkel-Wallace, Rich Pixley, Steve Chamberlain, and John Gilmore.
 David Johnson wrote the original COFF support; Pace Willison did
 the original support for encapsulated COFF.
 
-Brent Benson of Harris Computer Systems contributed DWARF2 support.
+Brent Benson of Harris Computer Systems contributed DWARF 2 support.
 
 Adam de Boor and Bradley Davis contributed the ISI Optimum V support.
 Per Bothner, Noboyuki Hikichi, and Alessandro Forin contributed MIPS
@@ -442,8 +389,9 @@ Michael Tiemann contributed SPARC support.
 Tim Tucker contributed support for the Gould NP1 and Gould Powernode.
 Pace Willison contributed Intel 386 support.
 Jay Vosburgh contributed Symmetry support.
+Marko Mlinar contributed OpenRISC 1000 support.
 
-Andreas Schwab contributed M68K Linux support.
+Andreas Schwab contributed M68K @sc{gnu}/Linux support.
 
 Rich Schaefer and Peter Schauer helped with support of SunOS shared
 libraries.
@@ -516,6 +464,8 @@ Romig-Koch, Rob Savoye, Jamie Smith, Mike Stump, Ian Taylor, Angela
 Thomas, Michael Tiemann, Tom Tromey, Ron Unrau, Jim Wilson, and David
 Zuhn have made contributions both large and small.
 
+Jim Blandy added support for preprocessor macros, while working for Red
+Hat.
 
 @node Sample Session
 @chapter A Sample @value{GDBN} Session
@@ -821,24 +771,24 @@ options may effectively be unavailable.
 The most usual way to start @value{GDBN} is with one argument,
 specifying an executable program:
 
-@example
+@smallexample
 @value{GDBP} @var{program}
-@end example
+@end smallexample
 
 @noindent
 You can also start with both an executable program and a core file
 specified:
 
-@example
+@smallexample
 @value{GDBP} @var{program} @var{core}
-@end example
+@end smallexample
 
 You can, instead, specify a process ID as a second argument, if you want
 to debug a running process:
 
-@example
+@smallexample
 @value{GDBP} @var{program} 1234
-@end example
+@end smallexample
 
 @noindent
 would attach @value{GDBN} to process @code{1234} (unless you also have a file
@@ -853,9 +803,9 @@ will warn you if it is unable to attach or to read core dumps.
 You can optionally have @code{@value{GDBP}} pass any arguments after the
 executable file to the inferior using @code{--args}.  This option stops
 option processing.
-@example
+@smallexample
 gdb --args gcc -O2 -c foo.c
-@end example
+@end smallexample
 This will cause @code{@value{GDBP}} to debug @code{gcc}, and to set
 @code{gcc}'s command-line arguments (@pxref{Arguments}) to @samp{-O2 -c foo.c}.
 
@@ -873,9 +823,9 @@ options.  @value{GDBN} itself can remind you of the options available.
 @noindent
 Type
 
-@example
+@smallexample
 @value{GDBP} -help
-@end example
+@end smallexample
 
 @noindent
 to display all available options and briefly describe their use
@@ -1004,9 +954,9 @@ information.  (@xref{Files,,Commands to specify files}, for information
 on @file{.syms} files.)  A simple @value{GDBN} invocation to do nothing
 but build a @file{.syms} file for future use is:
 
-@example
+@smallexample
 gdb -batch -nx -mapped -readnow programname
-@end example
+@end smallexample
 
 @node Mode Options
 @subsection Choosing modes
@@ -1045,9 +995,9 @@ Batch mode may be useful for running @value{GDBN} as a filter, for
 example to download and run a program on another computer; in order to
 make this more useful, the message
 
-@example
+@smallexample
 Program exited normally.
-@end example
+@end smallexample
 
 @noindent
 (which is ordinarily issued whenever a program running under
@@ -1172,11 +1122,14 @@ Do not use this option if you run @value{GDBN} from Emacs
 Use the interpreter @var{interp} for interface with the controlling
 program or device.  This option is meant to be set by programs which
 communicate with @value{GDBN} using it as a back end.
+@xref{Interpreters, , Command Interpreters}.
 
-@samp{--interpreter=mi} (or @samp{--interpreter=mi1}) causes
-@value{GDBN} to use the @dfn{gdb/mi interface} (@pxref{GDB/MI, , The
-@sc{gdb/mi} Interface}). The older @sc{gdb/mi} interface, included in
-@value{GDBN} version 5.0 can be selected with @samp{--interpreter=mi0}.
+@samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes
+@value{GDBN} to use the current @dfn{@sc{gdb/mi} interface}
+(@pxref{GDB/MI, , The @sc{gdb/mi} Interface}).  The previous @sc{gdb/mi}
+interface, included in @value{GDBN} version 5.3, can be selected with
+@samp{--interpreter=mi1}.  Earlier @sc{gdb/mi} interfaces
+are not supported.
 
 @item -write
 @cindex @code{--write}
@@ -1337,17 +1290,17 @@ enter it).  For example, if you type
 @c complete accuracy in these examples; space introduced for clarity.
 @c If texinfo enhancements make it unnecessary, it would be nice to
 @c replace " @key" by "@key" in the following...
-@example
+@smallexample
 (@value{GDBP}) info bre @key{TAB}
-@end example
+@end smallexample
 
 @noindent
 @value{GDBN} fills in the rest of the word @samp{breakpoints}, since that is
 the only @code{info} subcommand beginning with @samp{bre}:
 
-@example
+@smallexample
 (@value{GDBP}) info breakpoints
-@end example
+@end smallexample
 
 @noindent
 You can either press @key{RET} at this point, to run the @code{info
@@ -1367,7 +1320,7 @@ just sounds the bell.  Typing @key{TAB} again displays all the
 function names in your program that begin with those characters, for
 example:
 
-@example
+@smallexample
 (@value{GDBP}) b make_ @key{TAB}
 @exdent @value{GDBN} sounds bell; press @key{TAB} again, to see:
 make_a_section_from_file     make_environ
@@ -1376,7 +1329,7 @@ make_blockvector             make_pointer_type
 make_cleanup                 make_reference_type
 make_command                 make_symbol_completion_list
 (@value{GDBP}) b make_
-@end example
+@end smallexample
 
 @noindent
 After displaying the available possibilities, @value{GDBN} copies your
@@ -1409,22 +1362,22 @@ word-completion facilities in this situation, type a single quote
 @value{GDBN} that it may need to consider more information than usual
 when you press @key{TAB} or @kbd{M-?} to request word completion:
 
-@example
+@smallexample
 (@value{GDBP}) b 'bubble( @kbd{M-?}
 bubble(double,double)    bubble(int,int)
 (@value{GDBP}) b 'bubble(
-@end example
+@end smallexample
 
 In some cases, @value{GDBN} can tell that completing a name requires using
 quotes.  When this happens, @value{GDBN} inserts the quote for you (while
 completing as much as it can) if you do not type the quote in the first
 place:
 
-@example
+@smallexample
 (@value{GDBP}) b bub @key{TAB}
 @exdent @value{GDBN} alters your input line to the following, and rings a bell:
 (@value{GDBP}) b 'bubble(
-@end example
+@end smallexample
 
 @noindent
 In general, @value{GDBN} can tell that a quote is needed (and inserts it) if
@@ -1663,6 +1616,16 @@ and addresses in the executable code.
 To request debugging information, specify the @samp{-g} option when you run
 the compiler.
 
+Most compilers do not include information about preprocessor macros in
+the debugging information if you specify the @option{-g} flag alone,
+because this information is rather large.  Version 3.1 of @value{NGCC},
+the @sc{gnu} C compiler, provides macro information if you specify the
+options @option{-gdwarf-2} and @option{-g3}; the former option requests
+debugging information in the Dwarf 2 format, and the latter requests
+``extra information''.  In the future, we hope to find more compact ways
+to represent macro information, so that it can be included with
+@option{-g} alone.
+
 Many C compilers are unable to handle the @samp{-g} and @samp{-O}
 options together.  Using those compilers, you cannot generate optimized
 executables containing debugging information.
@@ -1860,9 +1823,9 @@ null value.
 
 For example, this command:
 
-@example
+@smallexample
 set env USER = foo
-@end example
+@end smallexample
 
 @noindent
 tells the debugged program, when subsequently run, that its user is named
@@ -1933,9 +1896,9 @@ program is using.
 You can redirect your program's input and/or output using shell
 redirection with the @code{run} command.  For example,
 
-@example
+@smallexample
 run > outfile
-@end example
+@end smallexample
 
 @noindent
 starts your program, diverting its output to the file @file{outfile}.
@@ -1948,9 +1911,9 @@ argument, and causes this file to be the default for future @code{run}
 commands.  It also resets the controlling terminal for the child
 process, for future @code{run} commands.  For example,
 
-@example
+@smallexample
 tty /dev/ttyb
-@end example
+@end smallexample
 
 @noindent
 directs that processes started with subsequent @code{run} commands
@@ -2109,9 +2072,9 @@ form @samp{[New @var{systag}]}.  @var{systag} is a thread identifier
 whose form varies depending on the particular system.  For example, on
 LynxOS, you might see
 
-@example
+@smallexample
 [New process 35 thread 27]
-@end example
+@end smallexample
 
 @noindent
 when @value{GDBN} notices a new thread.  In contrast, on an SGI system,
@@ -2120,7 +2083,7 @@ further qualifier.
 
 @c FIXME!! (1) Does the [New...] message appear even for the very first
 @c         thread of a program, or does it only appear for the
-@c         second---i.e., when it becomes obvious we have a multithread
+@c         second---i.e.@: when it becomes obvious we have a multithread
 @c         program?
 @c         (2) *Is* there necessarily a first thread always?  Or do some
 @c         multithread systems permit starting a program with multiple
@@ -2180,9 +2143,9 @@ form @samp{[New @var{systag}]}.  @var{systag} is a thread identifier
 whose form varies depending on the particular system.  For example, on
 HP-UX, you see
 
-@example
+@smallexample
 [New thread 2 (system thread 26594)]
-@end example
+@end smallexample
 
 @noindent
 when @value{GDBN} notices a new thread.
@@ -2209,7 +2172,7 @@ For example,
 @end table
 @c end table here to get a little more width for example
 
-@example
+@smallexample
 (@value{GDBP}) info threads
     * 3 system thread 26607  worker (wptr=0x7b09c318 "@@") \@*
                                at quicksort.c:137
@@ -2217,7 +2180,7 @@ For example,
                                from /usr/lib/libc.2
       1 system thread 27905  0x7b003498 in _brk () \@*
                                from /usr/lib/libc.2
-@end example
+@end smallexample
 
 @table @code
 @kindex thread @var{threadno}
@@ -2548,6 +2511,8 @@ example, on the DSU, only two data breakpoints can be set at a time, and
 @value{GDBN} will reject this command if more than two are used.  Delete
 or disable unused hardware breakpoints before setting new ones
 (@pxref{Disabling, ,Disabling}).  @xref{Conditions, ,Break conditions}.
+@xref{set remote hardware-breakpoint-limit}.
+
 
 @kindex thbreak
 @item thbreak @var{args}
@@ -2658,7 +2623,7 @@ times slower than normal execution.  (But this may still be worth it, to
 catch errors where you have no clue what part of your program is the
 culprit.)
 
-On some systems, such as HP-UX, Linux and some other x86-based targets,
+On some systems, such as HP-UX, @sc{gnu}/Linux and some other x86-based targets,
 @value{GDBN} includes support for
 hardware watchpoints, which do not slow down the running of your
 program.
@@ -2693,9 +2658,9 @@ statement, not the instruction, after the change occurs.
 
 When you issue the @code{watch} command, @value{GDBN} reports
 
-@example
+@smallexample
 Hardware watchpoint @var{num}: @var{expr}
-@end example
+@end smallexample
 
 @noindent
 if it was able to set a hardware watchpoint.
@@ -2784,6 +2749,8 @@ when a non-current thread's activity changes the expression.  (Hardware
 watchpoints, in contrast, watch an expression in all threads.)
 @end quotation
 
+@xref{set remote hardware-watchpoint-limit}.
+
 @node Set Catchpoints
 @subsection Setting catchpoints
 @cindex catchpoints, setting
@@ -2874,11 +2841,11 @@ knowledge of the implementation.  In the case of @sc{gnu} C@t{++}, exceptions ar
 raised by calling a library function named @code{__raise_exception}
 which has the following ANSI C interface:
 
-@example
+@smallexample
     /* @var{addr} is where the exception identifier is stored.
        @var{id} is the exception identifier.  */
     void __raise_exception (void **addr, void *id);
-@end example
+@end smallexample
 
 @noindent
 To make the debugger catch all exceptions before any stack
@@ -3071,9 +3038,9 @@ referents in the context of your breakpoint.  If @var{expression} uses
 symbols not referenced in the context of the breakpoint, @value{GDBN}
 prints an error message:
 
-@example
+@smallexample
 No symbol "foo" in current context.
-@end example
+@end smallexample
 
 @noindent
 @value{GDBN} does
@@ -3182,14 +3149,14 @@ breakpoints.  @xref{Output, ,Commands for controlled output}.
 For example, here is how you could use breakpoint commands to print the
 value of @code{x} at entry to @code{foo} whenever @code{x} is positive.
 
-@example
+@smallexample
 break foo if x>0
 commands
 silent
 printf "x is %d\n",x
 cont
 end
-@end example
+@end smallexample
 
 One application for breakpoint commands is to compensate for one bug so
 you can test for another.  Put a breakpoint just after the erroneous line
@@ -3199,14 +3166,14 @@ to any variables that need them.  End with the @code{continue} command
 so that your program does not stop, and start with the @code{silent}
 command so that no output is produced.  Here is an example:
 
-@example
+@smallexample
 break 403
 commands
 silent
 set x = y + 4
 cont
 end
-@end example
+@end smallexample
 
 @node Breakpoint Menus
 @subsection Breakpoint menus
@@ -3265,10 +3232,10 @@ any other process is running that program.  In this situation,
 attempting to run or continue a program with a breakpoint causes
 @value{GDBN} to print an error message:
 
-@example
+@smallexample
 Cannot insert breakpoints.
 The same program may be running in another process.
-@end example
+@end smallexample
 
 When this happens, you have three ways to proceed:
 
@@ -3473,13 +3440,13 @@ example, in the following excerpt from a debugging session, the @code{f}
 (@code{frame}) command shows that execution is stopped at line
 @code{206}; yet when we use @code{until}, we get to line @code{195}:
 
-@example
+@smallexample
 (@value{GDBP}) f
 #0  main (argc=4, argv=0xf7fffae8) at m4.c:206
 206                 expand_input();
 (@value{GDBP}) until
 195             for ( ; argc > 0; NEXTARG) @{
-@end example
+@end smallexample
 
 This happened because, for execution efficiency, the compiler had
 generated code for the loop closure test at the end, rather than the
@@ -3498,8 +3465,35 @@ argument.
 Continue running your program until either the specified location is
 reached, or the current stack frame returns.  @var{location} is any of
 the forms of argument acceptable to @code{break} (@pxref{Set Breaks,
-,Setting breakpoints}).  This form of the command uses breakpoints,
-and hence is quicker than @code{until} without an argument.
+,Setting breakpoints}).  This form of the command uses breakpoints, and
+hence is quicker than @code{until} without an argument.  The specified
+location is actually reached only if it is in the current frame.  This
+implies that @code{until} can be used to skip over recursive function
+invocations.  For instance in the code below, if the current location is
+line @code{96}, issuing @code{until 99} will execute the program up to
+line @code{99} in the same invocation of factorial, i.e. after the inner
+invocations have returned.
+
+@smallexample
+94     int factorial (int value)
+95     @{
+96         if (value > 1) @{
+97            value *= factorial (value - 1);
+98         @}
+99         return (value);
+100     @}
+@end smallexample
+
+
+@kindex advance @var{location}
+@itemx advance @var{location}
+Continue running the program up to the given location.  An argument is
+required, anything of the same form as arguments for the @code{break}
+command.  Execution will also stop upon exit from the current stack
+frame.  This command is similar to @code{until}, but @code{advance} will
+not skip over recursive function calls, and the target location doesn't
+have to be in the same frame as the current one.
+
 
 @kindex stepi
 @kindex si @r{(@code{stepi})}
@@ -3801,9 +3795,9 @@ frames in @value{GDBN} commands.
 @cindex frameless execution
 Some compilers provide a way to compile functions so that they operate
 without stack frames.  (For example, the @value{GCC} option
-@example
+@smallexample
 @samp{-fomit-frame-pointer}
-@end example
+@end smallexample
 generates functions without a frame.)
 This is occasionally done with heavily used library functions to save
 the frame setup time.  @value{GDBN} has limited facilities for dealing
@@ -3893,6 +3887,29 @@ The display for frame zero does not begin with a program counter
 value, indicating that your program has stopped at the beginning of the
 code for line @code{993} of @code{builtin.c}.
 
+@kindex set backtrace-below-main
+@kindex show backtrace-below-main
+
+Most programs have a standard entry point---a place where system libraries
+and startup code transition into user code.  For C this is @code{main}.
+When @value{GDBN} finds the entry function in a backtrace it will terminate
+the backtrace, to avoid tracing into highly system-specific (and generally
+uninteresting) code.  If you need to examine the startup code, then you can
+change this behavior.
+
+@table @code
+@item set backtrace-below-main off
+Backtraces will stop when they encounter the user entry point.  This is the
+default.
+
+@item set backtrace-below-main
+@itemx set backtrace-below-main on
+Backtraces will continue past the user entry point to the top of the stack.
+
+@item show backtrace-below-main
+Display the current backtrace policy.
+@end table
+
 @node Selection
 @section Selecting a frame
 
@@ -3965,7 +3982,10 @@ For example:
 
 After such a printout, the @code{list} command with no arguments
 prints ten lines centered on the point of execution in the frame.
-@xref{List, ,Printing source lines}.
+You can also edit the program at the point of execution with your favorite
+editing program by typing @code{edit}.
+@xref{List, ,Printing source lines},
+for details.
 
 @table @code
 @kindex down-silently
@@ -4072,6 +4092,7 @@ prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
 
 @menu
 * List::                        Printing source lines
+* Edit::                        Editing source files
 * Search::                      Searching source files
 * Source Path::                 Specifying source directories
 * Machine Code::                Source and machine code
@@ -4194,6 +4215,69 @@ Specifies the line containing the program address @var{address}.
 @var{address} may be any expression.
 @end table
 
+@node Edit
+@section Editing source files
+@cindex editing source files
+
+@kindex edit
+@kindex e @r{(@code{edit})}
+To edit the lines in a source file, use the @code{edit} command.
+The editing program of your choice
+is invoked with the current line set to
+the active line in the program.
+Alternatively, there are several ways to specify what part of the file you
+want to print if you want to see other parts of the program.
+
+Here are the forms of the @code{edit} command most commonly used:
+
+@table @code
+@item edit
+Edit the current source file at the active line number in the program.
+
+@item edit @var{number}
+Edit the current source file with @var{number} as the active line number.
+
+@item edit @var{function}
+Edit the file containing @var{function} at the beginning of its definition.
+
+@item edit @var{filename}:@var{number}
+Specifies line @var{number} in the source file @var{filename}.
+
+@item edit @var{filename}:@var{function}
+Specifies the line that begins the body of the
+function @var{function} in the file @var{filename}.  You only need the
+file name with a function name to avoid ambiguity when there are
+identically named functions in different source files.
+
+@item edit *@var{address}
+Specifies the line containing the program address @var{address}.
+@var{address} may be any expression.
+@end table
+
+@subsection Choosing your editor
+You can customize @value{GDBN} to use any editor you want
+@footnote{
+The only restriction is that your editor (say @code{ex}), recognizes the
+following command-line syntax:
+@smallexample
+ex +@var{number} file
+@end smallexample
+The optional numeric value +@var{number} designates the active line in
+the file.}.  By default, it is @value{EDITOR}, but you can change this
+by setting the environment variable @code{EDITOR} before using
+@value{GDBN}.  For example, to configure @value{GDBN} to use the
+@code{vi} editor, you could use these commands with the @code{sh} shell:
+@smallexample
+EDITOR=/usr/bin/vi
+export EDITOR
+gdb ...
+@end smallexample
+or in the @code{csh} shell,
+@smallexample
+setenv EDITOR /usr/bin/vi
+gdb ...
+@end smallexample
+
 @node Search
 @section Searching source files
 @cindex searching
@@ -4457,7 +4541,11 @@ Table}.
 * Convenience Vars::            Convenience variables
 * Registers::                   Registers
 * Floating Point Hardware::     Floating point hardware
+* Vector Unit::                 Vector Unit
 * Memory Region Attributes::    Memory region attributes
+* Dump/Restore Files::          Copy between memory and a file
+* Character Sets::              Debugging programs that use a different
+                                character set than GDB does
 @end menu
 
 @node Expressions
@@ -4467,9 +4555,10 @@ Table}.
 @code{print} and many other @value{GDBN} commands accept an expression and
 compute its value.  Any kind of constant, variable or operator defined
 by the programming language you are using is valid in an expression in
-@value{GDBN}.  This includes conditional expressions, function calls, casts
-and string constants.  It unfortunately does not include symbols defined
-by preprocessor @code{#define} commands.
+@value{GDBN}.  This includes conditional expressions, function calls,
+casts, and string constants.  It also includes preprocessor macros, if
+you compiled your program to include this information; see
+@ref{Compilation}.
 
 @value{GDBN} supports array constants in expressions input by
 the user.  The syntax is @{@var{element}, @var{element}@dots{}@}.  For example,
@@ -4537,7 +4626,7 @@ programming language from the point of execution in that frame
 
 @noindent This means that in the function
 
-@example
+@smallexample
 foo (a)
      int a;
 @{
@@ -4547,7 +4636,7 @@ foo (a)
     bar (b);
   @}
 @}
-@end example
+@end smallexample
 
 @noindent
 you can examine and use the variable @code{a} whenever your program is
@@ -4569,10 +4658,10 @@ using the colon-colon notation:
 @c info cannot cope with a :: index entry, but why deprive hard copy readers?
 @cindex @code{::}, context for variables/functions
 @end iftex
-@example
+@smallexample
 @var{file}::@var{variable}
 @var{function}::@var{variable}
-@end example
+@end smallexample
 
 @noindent
 Here @var{file} or @var{function} is the name of the context for the
@@ -4580,9 +4669,9 @@ static @var{variable}.  In the case of file names, you can use quotes to
 make sure @value{GDBN} parses the file name as a single word---for example,
 to print a global value of @code{x} defined in @file{f2.c}:
 
-@example
+@smallexample
 (@value{GDBP}) p 'f2.c'::x
-@end example
+@end smallexample
 
 @cindex C@t{++} scope resolution
 This use of @samp{::} is very rarely in conflict with the very similar
@@ -4619,19 +4708,18 @@ offered by the debug info format used by the compiler, @value{GDBN}
 might not be able to display values for such local variables.  If that
 happens, @value{GDBN} will print a message like this:
 
-@example
+@smallexample
 No symbol "foo" in current context.
-@end example
+@end smallexample
 
 To solve such problems, either recompile without optimizations, or use a
 different debug info format, if the compiler supports several such
-formats.  For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler usually
-supports the @samp{-gstabs} option.  @samp{-gstabs} produces debug info
-in a format that is superior to formats such as COFF.  You may be able
-to use DWARF2 (@samp{-gdwarf-2}), which is also an effective form for
-debug info.  See @ref{Debugging Options,,Options for Debugging Your
-Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}, for more
-information.
+formats.  For example, @value{NGCC}, the @sc{gnu} C/C@t{++} compiler
+usually supports the @option{-gstabs+} option.  @option{-gstabs+}
+produces debug info in a format that is superior to formats such as
+COFF.  You may be able to use DWARF 2 (@option{-gdwarf-2}), which is also
+an effective form for debug info.  @xref{Debugging Options,,Options
+for Debugging Your Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}.
 
 
 @node Arrays
@@ -4654,16 +4742,16 @@ argument; the second element comes from bytes of memory immediately
 following those that hold the first element, and so on.  Here is an
 example.  If a program says
 
-@example
+@smallexample
 int *array = (int *) malloc (len * sizeof (int));
-@end example
+@end smallexample
 
 @noindent
 you can print the contents of @code{array} with
 
-@example
+@smallexample
 p *array@@len
-@end example
+@end smallexample
 
 The left operand of @samp{@@} must reside in memory.  Array values made
 with @samp{@@} in this way behave just like other arrays in terms of
@@ -4674,18 +4762,18 @@ Artificial arrays most often appear in expressions via the value history
 Another way to create an artificial array is to use a cast.
 This re-interprets a value as if it were an array.
 The value need not be in memory:
-@example
+@smallexample
 (@value{GDBP}) p/x (short[2])0x12345678
 $1 = @{0x1234, 0x5678@}
-@end example
+@end smallexample
 
 As a convenience, if you leave the array length out (as in
 @samp{(@var{type}[])@var{value}}) @value{GDBN} calculates the size to fill
 the value (as @samp{sizeof(@var{value})/sizeof(@var{type})}:
-@example
+@smallexample
 (@value{GDBP}) p/x (short[])0x12345678
 $2 = @{0x1234, 0x5678@}
-@end example
+@end smallexample
 
 Sometimes the artificial array mechanism is not quite enough; in
 moderately complex data structures, the elements of interest may not
@@ -4698,13 +4786,13 @@ instance, suppose you have an array @code{dtab} of pointers to
 structures, and you are interested in the values of a field @code{fv}
 in each structure.  Here is an example of what you might type:
 
-@example
+@smallexample
 set $i = 0
 p dtab[$i++]->fv
 @key{RET}
 @key{RET}
 @dots{}
-@end example
+@end smallexample
 
 @node Output Formats
 @section Output formats
@@ -4749,10 +4837,10 @@ Print as an address, both absolute in hexadecimal and as an offset from
 the nearest preceding symbol.  You can use this format used to discover
 where (in what function) an unknown address is located:
 
-@example
+@smallexample
 (@value{GDBP}) p/a 0x54320
 $3 = 0x54320 <_initialize_vx+396>
-@end example
+@end smallexample
 
 @noindent
 The command @code{info symbol 0x54320} yields similar results.
@@ -4768,9 +4856,9 @@ using typical floating point syntax.
 
 For example, to print the program counter in hex (@pxref{Registers}), type
 
-@example
+@smallexample
 p/x $pc
-@end example
+@end smallexample
 
 @noindent
 Note that no space is required before the slash; this is because command
@@ -4897,10 +4985,10 @@ Each expression added to the list is given a number to identify it;
 to remove an expression from the list, you specify that number.
 The automatic display looks like this:
 
-@example
+@smallexample
 2: foo = 38
 3: bar[5] = (struct hack *) 0x3804
-@end example
+@end smallexample
 
 @noindent
 This display shows item numbers, expressions and their current values.  As with
@@ -5088,11 +5176,11 @@ and source file location of the variable where it points, using
 For example, here @value{GDBN} shows that a variable @code{ptt} points
 at another variable @code{t}, defined in @file{hi2.c}:
 
-@example
+@smallexample
 (@value{GDBP}) set print symbol-filename on
 (@value{GDBP}) p/a ptt
 $4 = 0xe008 <t in hi2.c>
-@end example
+@end smallexample
 
 @quotation
 @emph{Warning:} For pointers that point to a local variable, @samp{p/a}
@@ -5374,16 +5462,16 @@ is the value just prior to @code{$$}, @code{$$1} is equivalent to
 For example, suppose you have just printed a pointer to a structure and
 want to see the contents of the structure.  It suffices to type
 
-@example
+@smallexample
 p *$
-@end example
+@end smallexample
 
 If you have a chain of structures where the component @code{next} points
 to the next one, you can print the contents of the next one with this:
 
-@example
+@smallexample
 p *$.next
-@end example
+@end smallexample
 
 @noindent
 You can print successive links in the chain by repeating this
@@ -5392,10 +5480,10 @@ command---which you can do by just typing @key{RET}.
 Note that the history records values, not expressions.  If the value of
 @code{x} is 4 and you type these commands:
 
-@example
+@smallexample
 print x
 set x=5
-@end example
+@end smallexample
 
 @noindent
 then the value recorded in the value history by the @code{print} command
@@ -5439,9 +5527,9 @@ You can save a value in a convenience variable with an assignment
 expression, just as you would set a variable in your program.
 For example:
 
-@example
+@smallexample
 set $foo = *object_ptr
-@end example
+@end smallexample
 
 @noindent
 would save in @code{$foo} the value contained in the object pointed to by
@@ -5467,10 +5555,10 @@ One of the ways to use a convenience variable is as a counter to be
 incremented or a pointer to be advanced.  For example, to print
 a field from successive elements of an array of structures:
 
-@example
+@smallexample
 set $i = 0
 print bar[$i++]->contents
-@end example
+@end smallexample
 
 @noindent
 Repeat that command by typing @key{RET}.
@@ -5518,13 +5606,13 @@ your machine.
 @kindex info registers
 @item info registers
 Print the names and values of all registers except floating-point
-registers (in the selected stack frame).
+and vector registers (in the selected stack frame).
 
 @kindex info all-registers
 @cindex floating point registers
 @item info all-registers
 Print the names and values of all registers, including floating-point
-registers.
+and vector registers (in the selected stack frame).
 
 @item info registers @var{regname} @dots{}
 Print the @dfn{relativized} value of each specified register @var{regname}.
@@ -5542,16 +5630,16 @@ pointer to the current stack frame, and @code{$ps} is used for a
 register that contains the processor status.  For example,
 you could print the program counter in hex with
 
-@example
+@smallexample
 p/x $pc
-@end example
+@end smallexample
 
 @noindent
 or print the instruction to be executed next with
 
-@example
+@smallexample
 x/i $pc
-@end example
+@end smallexample
 
 @noindent
 or add four to the stack pointer@footnote{This is a way of removing
@@ -5562,9 +5650,9 @@ stack frames are selected.  To pop entire frames off the stack,
 regardless of machine architecture, use @code{return};
 see @ref{Returning, ,Returning from a function}.} with
 
-@example
+@smallexample
 set $sp += 4
-@end example
+@end smallexample
 
 Whenever possible, these four standard register names are available on
 your machine even though the machine has different canonical mnemonics,
@@ -5620,8 +5708,22 @@ floating point chip.  Currently, @samp{info float} is supported on
 the ARM and x86 machines.
 @end table
 
+@node Vector Unit
+@section Vector Unit
+@cindex vector unit
+
+Depending on the configuration, @value{GDBN} may be able to give you
+more information about the status of the vector unit.
+
+@table @code
+@kindex info vector
+@item info vector
+Display information about the vector unit.  The exact contents and
+layout vary depending on the hardware.
+@end table
+
 @node Memory Region Attributes
-@section Memory Region Attributes 
+@section Memory region attributes 
 @cindex memory region attributes
 
 @dfn{Memory region attributes} allow you to describe special handling 
@@ -5640,23 +5742,25 @@ to enable, disable, or remove a memory region, you specify that number.
 
 @table @code
 @kindex mem
-@item mem @var{address1} @var{address1} @var{attributes}@dots{}
-Define memory region bounded by @var{address1} and @var{address2}
-with attributes @var{attributes}@dots{}.
+@item mem @var{lower} @var{upper} @var{attributes}@dots{}
+Define memory region bounded by @var{lower} and @var{upper} with
+attributes @var{attributes}@dots{}.  Note that @var{upper} == 0 is a
+special case: it is treated as the the target's maximum memory address.
+(0xffff on 16 bit targets, 0xffffffff on 32 bit targets, etc.)
 
 @kindex delete mem
 @item delete mem @var{nums}@dots{}
-Remove memory region numbers @var{nums}.
+Remove memory regions @var{nums}@dots{}.
 
 @kindex disable mem
 @item disable mem @var{nums}@dots{}
-Disable memory region numbers @var{nums}.
+Disable memory regions @var{nums}@dots{}.
 A disabled memory region is not forgotten.  
 It may be enabled again later.
 
 @kindex enable mem
 @item enable mem @var{nums}@dots{}
-Enable memory region numbers @var{nums}.
+Enable memory regions @var{nums}@dots{}.
 
 @kindex info mem
 @item info mem
@@ -5697,7 +5801,7 @@ Memory is read only.
 @item wo
 Memory is write only.
 @item rw
-Memory is read/write (default).
+Memory is read/write.  This is the default.
 @end table
 
 @subsubsection Memory Access Size
@@ -5738,8 +5842,8 @@ registers.
 @table @code
 @item cache
 Enable @value{GDBN} to cache target memory. 
-@item nocache (default)
-Disable @value{GDBN} from caching target memory.
+@item nocache
+Disable @value{GDBN} from caching target memory.  This is the default.
 @end table
 
 @c @subsubsection Memory Write Verification
@@ -5751,71 +5855,616 @@ Disable @value{GDBN} from caching target memory.
 @c @item noverify (default)
 @c @end table
 
-@node Tracepoints
-@chapter Tracepoints
-@c This chapter is based on the documentation written by Michael
-@c Snyder, David Taylor, Jim Blandy, and Elena Zannoni.
+@node Dump/Restore Files
+@section Copy between memory and a file
+@cindex dump/restore files
+@cindex append data to a file
+@cindex dump data to a file
+@cindex restore data from a file
+@kindex dump
+@kindex append
+@kindex restore
+
+The commands @code{dump}, @code{append}, and @code{restore} are used
+for copying data between target memory and a file.  Data is written
+into a file using @code{dump} or @code{append}, and restored from a 
+file into memory by using @code{restore}.  Files may be binary, srec,
+intel hex, or tekhex (but only binary files can be appended).
 
-@cindex tracepoints
-In some applications, it is not feasible for the debugger to interrupt
-the program's execution long enough for the developer to learn
-anything helpful about its behavior.  If the program's correctness
-depends on its real-time behavior, delays introduced by a debugger
-might cause the program to change its behavior drastically, or perhaps
-fail, even when the code itself is correct.  It is useful to be able
-to observe the program's behavior without interrupting it.
+@table @code
+@kindex dump binary 
+@kindex append binary 
+@item dump binary memory @var{filename} @var{start_addr} @var{end_addr}
+Dump contents of memory from @var{start_addr} to @var{end_addr} into 
+raw binary format file @var{filename}.
+
+@item append binary memory @var{filename} @var{start_addr} @var{end_addr}
+Append contents of memory from @var{start_addr} to @var{end_addr} to
+raw binary format file @var{filename}.
+
+@item dump binary value @var{filename} @var{expression}
+Dump value of @var{expression} into raw binary format file @var{filename}.
+
+@item append binary memory @var{filename} @var{expression}
+Append value of @var{expression} to raw binary format file @var{filename}.
+
+@kindex dump ihex 
+@item dump ihex memory @var{filename} @var{start_addr} @var{end_addr}
+Dump contents of memory from @var{start_addr} to @var{end_addr} into 
+intel hex format file @var{filename}.
+
+@item dump ihex value @var{filename} @var{expression}
+Dump value of @var{expression} into intel hex format file @var{filename}.
+
+@kindex dump srec 
+@item dump srec memory @var{filename} @var{start_addr} @var{end_addr}
+Dump contents of memory from @var{start_addr} to @var{end_addr} into 
+srec format file @var{filename}.
+
+@item dump srec value @var{filename} @var{expression}
+Dump value of @var{expression} into srec format file @var{filename}.
+
+@kindex dump tekhex 
+@item dump tekhex memory @var{filename} @var{start_addr} @var{end_addr}
+Dump contents of memory from @var{start_addr} to @var{end_addr} into 
+tekhex format file @var{filename}.
+
+@item dump tekhex value @var{filename} @var{expression}
+Dump value of @var{expression} into tekhex format file @var{filename}.
+
+@item restore @var{filename} [@var{binary}] @var{bias} @var{start} @var{end}
+Restore the contents of file @var{filename} into memory.  The @code{restore}
+command can automatically recognize any known bfd file format, except for
+raw binary.  To restore a raw binary file you must use the optional argument
+@var{binary} after the filename.
+
+If @var{bias} is non-zero, its value will be added to the addresses 
+contained in the file.  Binary files always start at address zero, so
+they will be restored at address @var{bias}.  Other bfd files have
+a built-in location; they will be restored at offset @var{bias}
+from that location.
+
+If @var{start} and/or @var{end} are non-zero, then only data between
+file offset @var{start} and file offset @var{end} will be restored.
+These offsets are relative to the addresses in the file, before 
+the @var{bias} argument is applied.
 
-Using @value{GDBN}'s @code{trace} and @code{collect} commands, you can
-specify locations in the program, called @dfn{tracepoints}, and
-arbitrary expressions to evaluate when those tracepoints are reached.
-Later, using the @code{tfind} command, you can examine the values
-those expressions had when the program hit the tracepoints.  The
-expressions may also denote objects in memory---structures or arrays,
-for example---whose values @value{GDBN} should record; while visiting
-a particular tracepoint, you may inspect those objects as if they were
-in memory at that moment.  However, because @value{GDBN} records these
-values without interacting with you, it can do so quickly and
-unobtrusively, hopefully not disturbing the program's behavior.
+@end table
 
-The tracepoint facility is currently available only for remote
-targets.  @xref{Targets}.  In addition, your remote target must know how
-to collect trace data.  This functionality is implemented in the remote
-stub; however, none of the stubs distributed with @value{GDBN} support
-tracepoints as of this writing.
+@node Character Sets
+@section Character Sets
+@cindex character sets
+@cindex charset
+@cindex translating between character sets
+@cindex host character set
+@cindex target character set
+
+If the program you are debugging uses a different character set to
+represent characters and strings than the one @value{GDBN} uses itself,
+@value{GDBN} can automatically translate between the character sets for
+you.  The character set @value{GDBN} uses we call the @dfn{host
+character set}; the one the inferior program uses we call the
+@dfn{target character set}.
+
+For example, if you are running @value{GDBN} on a @sc{gnu}/Linux system, which
+uses the ISO Latin 1 character set, but you are using @value{GDBN}'s
+remote protocol (@pxref{Remote,Remote Debugging}) to debug a program
+running on an IBM mainframe, which uses the @sc{ebcdic} character set,
+then the host character set is Latin-1, and the target character set is
+@sc{ebcdic}.  If you give @value{GDBN} the command @code{set
+target-charset EBCDIC-US}, then @value{GDBN} translates between
+@sc{ebcdic} and Latin 1 as you print character or string values, or use
+character and string literals in expressions.
+
+@value{GDBN} has no way to automatically recognize which character set
+the inferior program uses; you must tell it, using the @code{set
+target-charset} command, described below.
+
+Here are the commands for controlling @value{GDBN}'s character set
+support:
 
-This chapter describes the tracepoint commands and features.
+@table @code
+@item set target-charset @var{charset}
+@kindex set target-charset
+Set the current target character set to @var{charset}.  We list the
+character set names @value{GDBN} recognizes below, but if you type
+@code{set target-charset} followed by @key{TAB}@key{TAB}, @value{GDBN} will
+list the target character sets it supports.
+@end table
 
-@menu
-* Set Tracepoints::         
-* Analyze Collected Data::      
-* Tracepoint Variables::        
-@end menu
+@table @code
+@item set host-charset @var{charset}
+@kindex set host-charset
+Set the current host character set to @var{charset}.
 
-@node Set Tracepoints
-@section Commands to Set Tracepoints
+By default, @value{GDBN} uses a host character set appropriate to the
+system it is running on; you can override that default using the
+@code{set host-charset} command.
 
-Before running such a @dfn{trace experiment}, an arbitrary number of
-tracepoints can be set.  Like a breakpoint (@pxref{Set Breaks}), a
-tracepoint has a number assigned to it by @value{GDBN}.  Like with
-breakpoints, tracepoint numbers are successive integers starting from
-one.  Many of the commands associated with tracepoints take the
-tracepoint number as their argument, to identify which tracepoint to
-work on.
+@value{GDBN} can only use certain character sets as its host character
+set.  We list the character set names @value{GDBN} recognizes below, and
+indicate which can be host character sets, but if you type
+@code{set target-charset} followed by @key{TAB}@key{TAB}, @value{GDBN} will
+list the host character sets it supports.
 
-For each tracepoint, you can specify, in advance, some arbitrary set
-of data that you want the target to collect in the trace buffer when
-it hits that tracepoint.  The collected data can include registers,
-local variables, or global data.  Later, you can use @value{GDBN}
-commands to examine the values these data had at the time the
-tracepoint was hit.
+@item set charset @var{charset}
+@kindex set charset
+Set the current host and target character sets to @var{charset}.  As
+above, if you type @code{set charset} followed by @key{TAB}@key{TAB},
+@value{GDBN} will list the name of the character sets that can be used
+for both host and target.
 
-This section describes commands to set tracepoints and associated
-conditions and actions.
 
-@menu
-* Create and Delete Tracepoints::  
-* Enable and Disable Tracepoints::  
-* Tracepoint Passcounts::       
+@item show charset
+@kindex show charset
+Show the names of the current host and target charsets. 
+
+@itemx show host-charset
+@kindex show host-charset
+Show the name of the current host charset. 
+
+@itemx show target-charset
+@kindex show target-charset
+Show the name of the current target charset. 
+
+@end table
+
+@value{GDBN} currently includes support for the following character
+sets:
+
+@table @code
+
+@item ASCII
+@cindex ASCII character set
+Seven-bit U.S. @sc{ascii}.  @value{GDBN} can use this as its host
+character set.
+
+@item ISO-8859-1
+@cindex ISO 8859-1 character set
+@cindex ISO Latin 1 character set
+The ISO Latin 1 character set.  This extends @sc{ascii} with accented
+characters needed for French, German, and Spanish.  @value{GDBN} can use
+this as its host character set.
+
+@item EBCDIC-US
+@itemx IBM1047
+@cindex EBCDIC character set
+@cindex IBM1047 character set
+Variants of the @sc{ebcdic} character set, used on some of IBM's
+mainframe operating systems.  (@sc{gnu}/Linux on the S/390 uses U.S. @sc{ascii}.)
+@value{GDBN} cannot use these as its host character set.
+
+@end table
+
+Note that these are all single-byte character sets.  More work inside
+GDB is needed to support multi-byte or variable-width character
+encodings, like the UTF-8 and UCS-2 encodings of Unicode.
+
+Here is an example of @value{GDBN}'s character set support in action.
+Assume that the following source code has been placed in the file
+@file{charset-test.c}:
+
+@smallexample
+#include <stdio.h>
+
+char ascii_hello[]
+  = @{72, 101, 108, 108, 111, 44, 32, 119,
+     111, 114, 108, 100, 33, 10, 0@};
+char ibm1047_hello[]
+  = @{200, 133, 147, 147, 150, 107, 64, 166,
+     150, 153, 147, 132, 90, 37, 0@};
+
+main ()
+@{
+  printf ("Hello, world!\n");
+@}
+@end smallexample
+
+In this program, @code{ascii_hello} and @code{ibm1047_hello} are arrays
+containing the string @samp{Hello, world!} followed by a newline,
+encoded in the @sc{ascii} and @sc{ibm1047} character sets.
+
+We compile the program, and invoke the debugger on it:
+
+@smallexample
+$ gcc -g charset-test.c -o charset-test
+$ gdb -nw charset-test
+GNU gdb 2001-12-19-cvs
+Copyright 2001 Free Software Foundation, Inc.
+@dots{}
+(gdb) 
+@end smallexample
+
+We can use the @code{show charset} command to see what character sets
+@value{GDBN} is currently using to interpret and display characters and
+strings:
+
+@smallexample
+(gdb) show charset
+The current host and target character set is `ISO-8859-1'.
+(gdb) 
+@end smallexample
+
+For the sake of printing this manual, let's use @sc{ascii} as our
+initial character set:
+@smallexample
+(gdb) set charset ASCII
+(gdb) show charset
+The current host and target character set is `ASCII'.
+(gdb) 
+@end smallexample
+
+Let's assume that @sc{ascii} is indeed the correct character set for our
+host system --- in other words, let's assume that if @value{GDBN} prints
+characters using the @sc{ascii} character set, our terminal will display
+them properly.  Since our current target character set is also
+@sc{ascii}, the contents of @code{ascii_hello} print legibly:
+
+@smallexample
+(gdb) print ascii_hello
+$1 = 0x401698 "Hello, world!\n"
+(gdb) print ascii_hello[0]
+$2 = 72 'H'
+(gdb) 
+@end smallexample
+
+@value{GDBN} uses the target character set for character and string
+literals you use in expressions:
+
+@smallexample
+(gdb) print '+'
+$3 = 43 '+'
+(gdb) 
+@end smallexample
+
+The @sc{ascii} character set uses the number 43 to encode the @samp{+}
+character.
+
+@value{GDBN} relies on the user to tell it which character set the
+target program uses.  If we print @code{ibm1047_hello} while our target
+character set is still @sc{ascii}, we get jibberish:
+
+@smallexample
+(gdb) print ibm1047_hello
+$4 = 0x4016a8 "\310\205\223\223\226k@@\246\226\231\223\204Z%"
+(gdb) print ibm1047_hello[0]
+$5 = 200 '\310'
+(gdb) 
+@end smallexample
+
+If we invoke the @code{set target-charset} followed by @key{TAB}@key{TAB},
+@value{GDBN} tells us the character sets it supports:
+
+@smallexample
+(gdb) set target-charset
+ASCII       EBCDIC-US   IBM1047     ISO-8859-1  
+(gdb) set target-charset 
+@end smallexample
+
+We can select @sc{ibm1047} as our target character set, and examine the
+program's strings again.  Now the @sc{ascii} string is wrong, but
+@value{GDBN} translates the contents of @code{ibm1047_hello} from the
+target character set, @sc{ibm1047}, to the host character set,
+@sc{ascii}, and they display correctly:
+
+@smallexample
+(gdb) set target-charset IBM1047
+(gdb) show charset
+The current host character set is `ASCII'.
+The current target character set is `IBM1047'.
+(gdb) print ascii_hello
+$6 = 0x401698 "\110\145%%?\054\040\167?\162%\144\041\012"
+(gdb) print ascii_hello[0]
+$7 = 72 '\110'
+(gdb) print ibm1047_hello
+$8 = 0x4016a8 "Hello, world!\n"
+(gdb) print ibm1047_hello[0]
+$9 = 200 'H'
+(gdb)
+@end smallexample
+
+As above, @value{GDBN} uses the target character set for character and
+string literals you use in expressions:
+
+@smallexample
+(gdb) print '+'
+$10 = 78 '+'
+(gdb) 
+@end smallexample
+
+The @sc{ibm1047} character set uses the number 78 to encode the @samp{+}
+character.
+
+
+@node Macros
+@chapter C Preprocessor Macros
+
+Some languages, such as C and C++, provide a way to define and invoke
+``preprocessor macros'' which expand into strings of tokens.
+@value{GDBN} can evaluate expressions containing macro invocations, show
+the result of macro expansion, and show a macro's definition, including
+where it was defined.
+
+You may need to compile your program specially to provide @value{GDBN}
+with information about preprocessor macros.  Most compilers do not
+include macros in their debugging information, even when you compile
+with the @option{-g} flag.  @xref{Compilation}.
+
+A program may define a macro at one point, remove that definition later,
+and then provide a different definition after that.  Thus, at different
+points in the program, a macro may have different definitions, or have
+no definition at all.  If there is a current stack frame, @value{GDBN}
+uses the macros in scope at that frame's source code line.  Otherwise,
+@value{GDBN} uses the macros in scope at the current listing location;
+see @ref{List}.
+
+At the moment, @value{GDBN} does not support the @code{##}
+token-splicing operator, the @code{#} stringification operator, or
+variable-arity macros.
+
+Whenever @value{GDBN} evaluates an expression, it always expands any
+macro invocations present in the expression.  @value{GDBN} also provides
+the following commands for working with macros explicitly.
+
+@table @code
+
+@kindex macro expand
+@cindex macro expansion, showing the results of preprocessor
+@cindex preprocessor macro expansion, showing the results of
+@cindex expanding preprocessor macros
+@item macro expand @var{expression}
+@itemx macro exp @var{expression}
+Show the results of expanding all preprocessor macro invocations in
+@var{expression}.  Since @value{GDBN} simply expands macros, but does
+not parse the result, @var{expression} need not be a valid expression;
+it can be any string of tokens.
+
+@kindex macro expand-once
+@item macro expand-once @var{expression}
+@itemx macro exp1 @var{expression}
+@i{(This command is not yet implemented.)}  Show the results of
+expanding those preprocessor macro invocations that appear explicitly in
+@var{expression}.  Macro invocations appearing in that expansion are
+left unchanged.  This command allows you to see the effect of a
+particular macro more clearly, without being confused by further
+expansions.  Since @value{GDBN} simply expands macros, but does not
+parse the result, @var{expression} need not be a valid expression; it
+can be any string of tokens.
+
+@kindex info macro
+@cindex macro definition, showing
+@cindex definition, showing a macro's
+@item info macro @var{macro}
+Show the definition of the macro named @var{macro}, and describe the
+source location where that definition was established.
+
+@kindex macro define
+@cindex user-defined macros
+@cindex defining macros interactively
+@cindex macros, user-defined
+@item macro define @var{macro} @var{replacement-list}
+@itemx macro define @var{macro}(@var{arglist}) @var{replacement-list}
+@i{(This command is not yet implemented.)}  Introduce a definition for a
+preprocessor macro named @var{macro}, invocations of which are replaced
+by the tokens given in @var{replacement-list}.  The first form of this
+command defines an ``object-like'' macro, which takes no arguments; the
+second form defines a ``function-like'' macro, which takes the arguments
+given in @var{arglist}.
+
+A definition introduced by this command is in scope in every expression
+evaluated in @value{GDBN}, until it is removed with the @command{macro
+undef} command, described below.  The definition overrides all
+definitions for @var{macro} present in the program being debugged, as
+well as any previous user-supplied definition.
+
+@kindex macro undef
+@item macro undef @var{macro}
+@i{(This command is not yet implemented.)}  Remove any user-supplied
+definition for the macro named @var{macro}.  This command only affects
+definitions provided with the @command{macro define} command, described
+above; it cannot remove definitions present in the program being
+debugged.
+
+@end table
+
+@cindex macros, example of debugging with
+Here is a transcript showing the above commands in action.  First, we
+show our source files:
+
+@smallexample
+$ cat sample.c
+#include <stdio.h>
+#include "sample.h"
+
+#define M 42
+#define ADD(x) (M + x)
+
+main ()
+@{
+#define N 28
+  printf ("Hello, world!\n");
+#undef N
+  printf ("We're so creative.\n");
+#define N 1729
+  printf ("Goodbye, world!\n");
+@}
+$ cat sample.h
+#define Q <
+$
+@end smallexample
+
+Now, we compile the program using the @sc{gnu} C compiler, @value{NGCC}.
+We pass the @option{-gdwarf-2} and @option{-g3} flags to ensure the
+compiler includes information about preprocessor macros in the debugging
+information.
+
+@smallexample
+$ gcc -gdwarf-2 -g3 sample.c -o sample
+$
+@end smallexample
+
+Now, we start @value{GDBN} on our sample program:
+
+@smallexample
+$ gdb -nw sample
+GNU gdb 2002-05-06-cvs
+Copyright 2002 Free Software Foundation, Inc.
+GDB is free software, @dots{}
+(gdb)
+@end smallexample
+
+We can expand macros and examine their definitions, even when the
+program is not running.  @value{GDBN} uses the current listing position
+to decide which macro definitions are in scope:
+
+@smallexample
+(gdb) list main
+3
+4       #define M 42
+5       #define ADD(x) (M + x)
+6
+7       main ()
+8       @{
+9       #define N 28
+10        printf ("Hello, world!\n");
+11      #undef N
+12        printf ("We're so creative.\n");
+(gdb) info macro ADD
+Defined at /home/jimb/gdb/macros/play/sample.c:5
+#define ADD(x) (M + x)
+(gdb) info macro Q
+Defined at /home/jimb/gdb/macros/play/sample.h:1
+  included at /home/jimb/gdb/macros/play/sample.c:2
+#define Q <
+(gdb) macro expand ADD(1)
+expands to: (42 + 1)
+(gdb) macro expand-once ADD(1)
+expands to: once (M + 1)
+(gdb) 
+@end smallexample
+
+In the example above, note that @command{macro expand-once} expands only
+the macro invocation explicit in the original text --- the invocation of
+@code{ADD} --- but does not expand the invocation of the macro @code{M},
+which was introduced by @code{ADD}.
+
+Once the program is running, GDB uses the macro definitions in force at
+the source line of the current stack frame:
+
+@smallexample
+(gdb) break main
+Breakpoint 1 at 0x8048370: file sample.c, line 10.
+(gdb) run
+Starting program: /home/jimb/gdb/macros/play/sample 
+
+Breakpoint 1, main () at sample.c:10
+10        printf ("Hello, world!\n");
+(gdb) 
+@end smallexample
+
+At line 10, the definition of the macro @code{N} at line 9 is in force:
+
+@smallexample
+(gdb) info macro N
+Defined at /home/jimb/gdb/macros/play/sample.c:9
+#define N 28
+(gdb) macro expand N Q M
+expands to: 28 < 42
+(gdb) print N Q M
+$1 = 1
+(gdb) 
+@end smallexample
+
+As we step over directives that remove @code{N}'s definition, and then
+give it a new definition, @value{GDBN} finds the definition (or lack
+thereof) in force at each point:
+
+@smallexample
+(gdb) next
+Hello, world!
+12        printf ("We're so creative.\n");
+(gdb) info macro N
+The symbol `N' has no definition as a C/C++ preprocessor macro
+at /home/jimb/gdb/macros/play/sample.c:12
+(gdb) next
+We're so creative.
+14        printf ("Goodbye, world!\n");
+(gdb) info macro N
+Defined at /home/jimb/gdb/macros/play/sample.c:13
+#define N 1729
+(gdb) macro expand N Q M
+expands to: 1729 < 42
+(gdb) print N Q M
+$2 = 0
+(gdb) 
+@end smallexample
+
+
+@node Tracepoints
+@chapter Tracepoints
+@c This chapter is based on the documentation written by Michael
+@c Snyder, David Taylor, Jim Blandy, and Elena Zannoni.
+
+@cindex tracepoints
+In some applications, it is not feasible for the debugger to interrupt
+the program's execution long enough for the developer to learn
+anything helpful about its behavior.  If the program's correctness
+depends on its real-time behavior, delays introduced by a debugger
+might cause the program to change its behavior drastically, or perhaps
+fail, even when the code itself is correct.  It is useful to be able
+to observe the program's behavior without interrupting it.
+
+Using @value{GDBN}'s @code{trace} and @code{collect} commands, you can
+specify locations in the program, called @dfn{tracepoints}, and
+arbitrary expressions to evaluate when those tracepoints are reached.
+Later, using the @code{tfind} command, you can examine the values
+those expressions had when the program hit the tracepoints.  The
+expressions may also denote objects in memory---structures or arrays,
+for example---whose values @value{GDBN} should record; while visiting
+a particular tracepoint, you may inspect those objects as if they were
+in memory at that moment.  However, because @value{GDBN} records these
+values without interacting with you, it can do so quickly and
+unobtrusively, hopefully not disturbing the program's behavior.
+
+The tracepoint facility is currently available only for remote
+targets.  @xref{Targets}.  In addition, your remote target must know how
+to collect trace data.  This functionality is implemented in the remote
+stub; however, none of the stubs distributed with @value{GDBN} support
+tracepoints as of this writing.
+
+This chapter describes the tracepoint commands and features.
+
+@menu
+* Set Tracepoints::         
+* Analyze Collected Data::      
+* Tracepoint Variables::        
+@end menu
+
+@node Set Tracepoints
+@section Commands to Set Tracepoints
+
+Before running such a @dfn{trace experiment}, an arbitrary number of
+tracepoints can be set.  Like a breakpoint (@pxref{Set Breaks}), a
+tracepoint has a number assigned to it by @value{GDBN}.  Like with
+breakpoints, tracepoint numbers are successive integers starting from
+one.  Many of the commands associated with tracepoints take the
+tracepoint number as their argument, to identify which tracepoint to
+work on.
+
+For each tracepoint, you can specify, in advance, some arbitrary set
+of data that you want the target to collect in the trace buffer when
+it hits that tracepoint.  The collected data can include registers,
+local variables, or global data.  Later, you can use @value{GDBN}
+commands to examine the values these data had at the time the
+tracepoint was hit.
+
+This section describes commands to set tracepoints and associated
+conditions and actions.
+
+@menu
+* Create and Delete Tracepoints::  
+* Enable and Disable Tracepoints::  
+* Tracepoint Passcounts::       
 * Tracepoint Actions::          
 * Listing Tracepoints::         
 * Starting and Stopping Trace Experiment::  
@@ -6418,44 +7067,48 @@ overlay's machine code from the large memory into the space set aside
 for it in the instruction memory, and then jump to its entry point
 there.
 
-@example
+@c NB:  In the below the mapped area's size is greater or equal to the
+@c size of all overlays.  This is intentional to remind the developer
+@c that overlays don't necessarily need to be the same size.
+
+@smallexample
 @group
-    Data                   Instruction            Larger
-Address Space             Address Space        Address Space
-+-----------+             +-----------+        +-----------+
-|           |             |           |        |           |
-+-----------+             +-----------+        +-----------+<-- overlay 1
-| program   |             |   main    |        |           | load address
-| variables |             |  program  |        | overlay 1 |
-| and heap  |             |           |    ,---|           |
-+-----------+             |           |    |   |           |
-|           |             +-----------+    |   +-----------+
-+-----------+             |           |    |   |           |
-               mapped --->+-----------+    /   +-----------+<-- overlay 2
-               address    |  overlay  | <-'    | overlay 2 | load address
-                          |   area    |  <-----|           |
-                          |           | <---.  +-----------+
-                          |           |     |  |           |
-                          +-----------+     |  |           |
-                          |           |     |  +-----------+<-- overlay 3
-                          +-----------+     `--|           | load address
-                                               | overlay 3 |
-                                               |           |
-                                               +-----------+
-                                               |           |
-                                               +-----------+
-
-    To map an overlay, copy its code from the larger address space
-    to the instruction address space.  Since the overlays shown here
-    all use the same mapped address, only one may be mapped at a time.
+    Data             Instruction            Larger
+Address Space       Address Space        Address Space
++-----------+       +-----------+        +-----------+
+|           |       |           |        |           |
++-----------+       +-----------+        +-----------+<-- overlay 1
+| program   |       |   main    |   .----| overlay 1 | load address
+| variables |       |  program  |   |    +-----------+
+| and heap  |       |           |   |    |           |
++-----------+       |           |   |    +-----------+<-- overlay 2
+|           |       +-----------+   |    |           | load address
++-----------+       |           |   |  .-| overlay 2 |
+                    |           |   |  | |           |
+         mapped --->+-----------+   |  | +-----------+
+         address    |           |   |  | |           |
+                    |  overlay  | <-'  | |           |
+                    |   area    |  <---' +-----------+<-- overlay 3
+                    |           | <---.  |           | load address
+                    +-----------+     `--| overlay 3 |
+                    |           |        |           |
+                    +-----------+        |           |
+                                         +-----------+
+                                         |           |
+                                         +-----------+
+
+                    @anchor{A code overlay}A code overlay
 @end group
-@end example
+@end smallexample
 
-This diagram shows a system with separate data and instruction address
-spaces.  For a system with a single address space for data and
-instructions, the diagram would be similar, except that the program
-variables and heap would share an address space with the main program
-and the overlay area.
+The diagram (@pxref{A code overlay}) shows a system with separate data
+and instruction address spaces.  To map an overlay, the program copies
+its code from the larger address space to the instruction address space.
+Since the overlays shown here all use the same mapped address, only one
+may be mapped at a time.  For a system with a single address space for
+data and instructions, the diagram would be similar, except that the
+program variables and heap would share an address space with the main
+program and the overlay area.
 
 An overlay loaded into instruction memory and ready for use is called a
 @dfn{mapped} overlay; its @dfn{mapped address} is its address in the
@@ -6603,33 +7256,33 @@ addresses, load addresses, and sizes.
 Normally, when @value{GDBN} prints a code address, it includes the name
 of the function the address falls in:
 
-@example
+@smallexample
 (gdb) print main
 $3 = @{int ()@} 0x11a0 <main>
-@end example
+@end smallexample
 @noindent
 When overlay debugging is enabled, @value{GDBN} recognizes code in
 unmapped overlays, and prints the names of unmapped functions with
 asterisks around them.  For example, if @code{foo} is a function in an
 unmapped overlay, @value{GDBN} prints it this way:
 
-@example
+@smallexample
 (gdb) overlay list
 No sections are mapped.
 (gdb) print foo
 $5 = @{int (int)@} 0x100000 <*foo*>
-@end example
+@end smallexample
 @noindent
 When @code{foo}'s overlay is mapped, @value{GDBN} prints the function's
 name normally:
 
-@example
+@smallexample
 (gdb) overlay list
 Section .ov.foo.text, loaded at 0x100000 - 0x100034, 
         mapped at 0x1016 - 0x104a
 (gdb) print foo
 $6 = @{int (int)@} 0x1016 <foo>
-@end example
+@end smallexample
 
 When overlay debugging is enabled, @value{GDBN} can find the correct
 address for functions and variables in an overlay, whether or not the
@@ -6671,7 +7324,7 @@ Here are the variables your overlay manager must define to support
 @item @code{_ovly_table}:
 This variable must be an array of the following structures:
 
-@example
+@smallexample
 struct
 @{
   /* The overlay's mapped address.  */
@@ -6687,7 +7340,7 @@ struct
      zero otherwise.  */
   unsigned long mapped;
 @}
-@end example
+@end smallexample
 
 @item @code{_novlys}:
 This variable must be a four-byte signed integer, holding the total
@@ -6702,6 +7355,15 @@ executable file.  When @value{GDBN} finds a matching entry, it consults
 the entry's @code{mapped} member to determine whether the overlay is
 currently mapped.
 
+In addition, your overlay manager may define a function called
+@code{_ovly_debug_event}.  If this function is defined, @value{GDBN}
+will silently set a breakpoint there.  If the overlay manager then
+calls this function whenever it has changed the overlay table, this
+will enable @value{GDBN} to accurately keep track of which overlays
+are in program memory, and update any breakpoints that may be set
+in overlays.  This will allow breakpoints to work even if the 
+overlays are kept in ROM or other non-writable memory while they
+are not being executed.
 
 @node Overlay Sample Program
 @section Overlay Sample Program
@@ -6739,7 +7401,7 @@ and @code{m32r-elf} targets.
 You can build the test program using the @code{d10v-elf} GCC
 cross-compiler like this:
 
-@example
+@smallexample
 $ d10v-elf-gcc -g -c overlays.c
 $ d10v-elf-gcc -g -c ovlymgr.c
 $ d10v-elf-gcc -g -c foo.c
@@ -6748,7 +7410,7 @@ $ d10v-elf-gcc -g -c baz.c
 $ d10v-elf-gcc -g -c grbx.c
 $ d10v-elf-gcc -g overlays.o ovlymgr.o foo.o bar.o \
                   baz.o grbx.o -Wl,-Td10v.ld -o overlays
-@end example
+@end smallexample
 
 The build process is identical for any other architecture, except that
 you must substitute the appropriate compiler and linker script for the
@@ -6838,11 +7500,6 @@ C@t{++} source file
 @itemx .F
 Fortran source file
 
-@item .ch
-@itemx .c186
-@itemx .c286
-CHILL source file
-
 @item .mod
 Modula-2 source file
 
@@ -6877,9 +7534,9 @@ languages---but means different things.  For instance, if the current
 source file were written in C, and @value{GDBN} was parsing Modula-2, a
 command such as:
 
-@example
+@smallexample
 print a = b + c
-@end example
+@end smallexample
 
 @noindent
 might not have the effect you intended.  In C, this means to add
@@ -7073,9 +7730,9 @@ error.  In many implementations of C, mathematical overflow causes the
 result to ``wrap around'' to lower values---for example, if @var{m} is
 the largest integer value, and @var{s} is the smallest, then
 
-@example
+@smallexample
 @var{m} + 1 @result{} @var{s}
-@end example
+@end smallexample
 
 This, too, is specific to individual languages, and in some cases
 specific to individual compilers or machines.  @xref{Support, ,
@@ -7114,7 +7771,7 @@ being set automatically by @value{GDBN}.
 @node Support
 @section Supported languages
 
-@value{GDBN} supports C, C@t{++}, Fortran, Java, Chill, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Fortran, Java, assembly, and Modula-2.
 @c This is false ...
 Some @value{GDBN} features may be used in expressions regardless of the
 language you use: the @value{GDBN} @code{@@} and @code{::} operators,
@@ -7133,7 +7790,6 @@ language reference or tutorial.
 @menu
 * C::           C and C@t{++}
 * Modula-2::    Modula-2
-* Chill::        Chill
 @end menu
 
 @node C
@@ -7155,11 +7811,12 @@ effectively, you must compile your C@t{++} programs with a supported
 C@t{++} compiler, such as @sc{gnu} @code{g++}, or the HP ANSI C@t{++}
 compiler (@code{aCC}).
 
-For best results when using @sc{gnu} C@t{++}, use the stabs debugging
-format.  You can select that format explicitly with the @code{g++}
-command-line options @samp{-gstabs} or @samp{-gstabs+}.  See
-@ref{Debugging Options,,Options for Debugging Your Program or @sc{gnu}
-CC, gcc.info, Using @sc{gnu} CC}, for more information.
+For best results when using @sc{gnu} C@t{++}, use the DWARF 2 debugging
+format; if it doesn't work on your system, try the stabs+ debugging
+format.  You can select those formats explicitly with the @code{g++}
+command-line options @option{-gdwarf-2} and @option{-gstabs+}.
+@xref{Debugging Options,,Options for Debugging Your Program or @sc{gnu}
+CC, gcc.info, Using @sc{gnu} CC}.
 
 @menu
 * C Operators::                 C and C@t{++} operators
@@ -7342,8 +7999,8 @@ following ways:
 @itemize @bullet
 @item
 Integer constants are a sequence of digits.  Octal constants are
-specified by a leading @samp{0} (i.e. zero), and hexadecimal constants by
-a leading @samp{0x} or @samp{0X}.  Constants may also end with a letter
+specified by a leading @samp{0} (i.e.@: zero), and hexadecimal constants
+by a leading @samp{0x} or @samp{0X}.  Constants may also end with a letter
 @samp{l}, specifying that the constant should be treated as a
 @code{long} value.
 
@@ -7405,28 +8062,21 @@ and @samp{@{&"hi", &"there", &"fred"@}} is a three-element array of pointers.
 @cindex expressions in C@t{++}
 @value{GDBN} expression handling can interpret most C@t{++} expressions.
 
-@cindex C@t{++} support, not in @sc{coff}
-@cindex @sc{coff} versus C@t{++}
-@cindex C@t{++} and object formats
-@cindex object formats and C@t{++}
-@cindex a.out and C@t{++}
-@cindex @sc{ecoff} and C@t{++}
-@cindex @sc{xcoff} and C@t{++}
-@cindex @sc{elf}/stabs and C@t{++}
-@cindex @sc{elf}/@sc{dwarf} and C@t{++}
-@c FIXME!! GDB may eventually be able to debug C++ using DWARF; check
-@c periodically whether this has happened...
+@cindex debugging C@t{++} programs
+@cindex C@t{++} compilers
+@cindex debug formats and C@t{++}
+@cindex @value{NGCC} and C@t{++}
 @quotation
 @emph{Warning:} @value{GDBN} can only debug C@t{++} code if you use the
-proper compiler.  Typically, C@t{++} debugging depends on the use of
-additional debugging information in the symbol table, and thus requires
-special support.  In particular, if your compiler generates a.out, MIPS
-@sc{ecoff}, RS/6000 @sc{xcoff}, or @sc{elf} with stabs extensions to the
-symbol table, these facilities are all available.  (With @sc{gnu} CC,
-you can use the @samp{-gstabs} option to request stabs debugging
-extensions explicitly.)  Where the object code format is standard
-@sc{coff} or @sc{dwarf} in @sc{elf}, on the other hand, most of the C@t{++}
-support in @value{GDBN} does @emph{not} work.
+proper compiler and the proper debug format.  Currently, @value{GDBN}
+works best when debugging C@t{++} code that is compiled with
+@value{NGCC} 2.95.3 or with @value{NGCC} 3.1 or newer, using the options
+@option{-gdwarf-2} or @option{-gstabs+}.  DWARF 2 is preferred over
+stabs+.  Most configurations of @value{NGCC} emit either DWARF 2 or
+stabs+ as their default debug format, so you usually don't need to
+specify a debug format explicitly.  Other compilers and/or debug formats
+are likely to work badly or not at all when using @value{GDBN} to debug
+C@t{++} code.
 @end quotation
 
 @enumerate
@@ -7435,9 +8085,9 @@ support in @value{GDBN} does @emph{not} work.
 @item
 Member function calls are allowed; you can use expressions like
 
-@example
+@smallexample
 count = aml->GetOriginal(x, y)
-@end example
+@end smallexample
 
 @vindex this@r{, inside C@t{++} member functions}
 @cindex namespace in C@t{++}
@@ -8055,11 +8705,11 @@ There are a few subtle differences between the Modula-2 scope operator
 (@code{.}) and the @value{GDBN} scope operator (@code{::}).  The two have
 similar syntax:
 
-@example
+@smallexample
 
 @var{module} . @var{id}
 @var{scope} :: @var{id}
-@end example
+@end smallexample
 
 @noindent
 where @var{scope} is the name of a module or a procedure,
@@ -8099,560 +8749,61 @@ address can be specified by an integral constant, the construct
 In @value{GDBN} scripts, the Modula-2 inequality operator @code{#} is
 interpreted as the beginning of a comment.  Use @code{<>} instead.
 
-@node Chill
-@subsection Chill
-
-The extensions made to @value{GDBN} to support Chill only support output
-from the @sc{gnu} Chill compiler.  Other Chill compilers are not currently
-supported, and attempting to debug executables produced by them is most
-likely to give an error as @value{GDBN} reads in the executable's symbol
-table.
+@node Symbols
+@chapter Examining the Symbol Table
 
-@c This used to say "... following Chill related topics ...", but since
-@c menus are not shown in the printed manual, it would look awkward.
-This section covers the Chill related topics and the features
-of @value{GDBN} which support these topics.
+The commands described in this chapter allow you to inquire about the
+symbols (names of variables, functions and types) defined in your
+program.  This information is inherent in the text of your program and
+does not change as your program executes.  @value{GDBN} finds it in your
+program's symbol table, in the file indicated when you started @value{GDBN}
+(@pxref{File Options, ,Choosing files}), or by one of the
+file-management commands (@pxref{Files, ,Commands to specify files}).
 
-@menu
-* How modes are displayed::        How modes are displayed
-* Locations::                        Locations and their accesses
-* Values and their Operations:: Values and their Operations
-* Chill type and range checks::
-* Chill defaults::
-@end menu
+@cindex symbol names
+@cindex names of symbols
+@cindex quoting names
+Occasionally, you may need to refer to symbols that contain unusual
+characters, which @value{GDBN} ordinarily treats as word delimiters.  The
+most frequent case is in referring to static variables in other
+source files (@pxref{Variables,,Program variables}).  File names
+are recorded in object files as debugging symbols, but @value{GDBN} would
+ordinarily parse a typical file name, like @file{foo.c}, as the three words
+@samp{foo} @samp{.} @samp{c}.  To allow @value{GDBN} to recognize
+@samp{foo.c} as a single symbol, enclose it in single quotes; for example,
 
-@node How modes are displayed
-@subsubsection How modes are displayed
+@smallexample
+p 'foo.c'::x
+@end smallexample
 
-The Chill Datatype- (Mode) support of @value{GDBN} is directly related
-with the functionality of the @sc{gnu} Chill compiler, and therefore deviates
-slightly from the standard specification of the Chill language. The
-provided modes are:
+@noindent
+looks up the value of @code{x} in the scope of the file @file{foo.c}.
 
-@c FIXME: this @table's contents effectively disable @code by using @r
-@c on every @item.  So why does it need @code?
 @table @code
-@item @r{@emph{Discrete modes:}}
-@itemize @bullet
-@item
-@emph{Integer Modes} which are predefined by @code{BYTE, UBYTE, INT,
-UINT, LONG, ULONG},
-@item
-@emph{Boolean Mode} which is predefined by @code{BOOL},
-@item
-@emph{Character Mode} which is predefined by @code{CHAR},
-@item
-@emph{Set Mode} which is displayed by the keyword @code{SET}.
-@smallexample
-(@value{GDBP}) ptype x
-type = SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-If the type is an unnumbered set the set element values are omitted.
-@item
-@emph{Range Mode} which is displayed by
-@smallexample
-@code{type = <basemode>(<lower bound> : <upper bound>)}
-@end smallexample
-where @code{<lower bound>, <upper bound>} can be of any discrete literal
-expression (e.g. set element names).
-@end itemize
+@kindex info address
+@cindex address of a symbol
+@item info address @var{symbol}
+Describe where the data for @var{symbol} is stored.  For a register
+variable, this says which register it is kept in.  For a non-register
+local variable, this prints the stack-frame offset at which the variable
+is always stored.
+
+Note the contrast with @samp{print &@var{symbol}}, which does not work
+at all for a register variable, and for a stack local variable prints
+the exact address of the current instantiation of the variable.
+
+@kindex info symbol
+@cindex symbol from address
+@item info symbol @var{addr}
+Print the name of a symbol which is stored at the address @var{addr}.
+If no symbol is stored exactly at @var{addr}, @value{GDBN} prints the
+nearest symbol and an offset from it:
 
-@item @r{@emph{Powerset Mode:}}
-A Powerset Mode is displayed by the keyword @code{POWERSET} followed by
-the member mode of the powerset.  The member mode can be any discrete mode.
 @smallexample
-(@value{GDBP}) ptype x
-type = POWERSET SET (egon, hugo, otto)
+(@value{GDBP}) info symbol 0x54320
+_initialize_vx + 396 in section .text
 @end smallexample
 
-@item @r{@emph{Reference Modes:}}
-@itemize @bullet
-@item
-@emph{Bound Reference Mode} which is displayed by the keyword @code{REF}
-followed by the mode name to which the reference is bound.
-@item
-@emph{Free Reference Mode} which is displayed by the keyword @code{PTR}.
-@end itemize
-
-@item @r{@emph{Procedure mode}}
-The procedure mode is displayed by @code{type = PROC(<parameter list>)
-<return mode> EXCEPTIONS (<exception list>)}. The @code{<parameter
-list>} is a list of the parameter modes.  @code{<return mode>} indicates
-the mode of the result of the procedure if any.  The exceptionlist lists
-all possible exceptions which can be raised by the procedure.
-
-@ignore
-@item @r{@emph{Instance mode}}
-The instance mode is represented by a structure, which has a static
-type, and is therefore not really of interest.
-@end ignore
-
-@item @r{@emph{Synchronization Modes:}}
-@itemize @bullet
-@item
-@emph{Event Mode} which is displayed by
-@smallexample
-@code{EVENT (<event length>)}
-@end smallexample
-where @code{(<event length>)} is optional.
-@item
-@emph{Buffer Mode} which is displayed by
-@smallexample
-@code{BUFFER (<buffer length>)<buffer element mode>}
-@end smallexample
-where @code{(<buffer length>)} is optional.
-@end itemize
-
-@item @r{@emph{Timing Modes:}}
-@itemize @bullet
-@item
-@emph{Duration Mode} which is predefined by @code{DURATION}
-@item
-@emph{Absolute Time Mode} which is predefined by @code{TIME}
-@end itemize
-
-@item @r{@emph{Real Modes:}}
-Real Modes are predefined with @code{REAL} and @code{LONG_REAL}.
-
-@item @r{@emph{String Modes:}}
-@itemize @bullet
-@item
-@emph{Character String Mode} which is displayed by
-@smallexample
-@code{CHARS(<string length>)}
-@end smallexample
-followed by the keyword @code{VARYING} if the String Mode is a varying
-mode
-@item
-@emph{Bit String Mode} which is displayed by
-@smallexample
-@code{BOOLS(<string
-length>)}
-@end smallexample
-@end itemize
-
-@item @r{@emph{Array Mode:}}
-The Array Mode is displayed by the keyword @code{ARRAY(<range>)}
-followed by the element mode (which may in turn be an array mode).
-@smallexample
-(@value{GDBP}) ptype x
-type = ARRAY (1:42)
-          ARRAY (1:20)
-             SET (karli = 10, susi = 20, fritzi = 100)
-@end smallexample
-
-@item @r{@emph{Structure Mode}}
-The Structure mode is displayed by the keyword @code{STRUCT(<field
-list>)}.  The @code{<field list>} consists of names and modes of fields
-of the structure.  Variant structures have the keyword @code{CASE <field>
-OF <variant fields> ESAC} in their field list.  Since the current version
-of the GNU Chill compiler doesn't implement tag processing (no runtime
-checks of variant fields, and therefore no debugging info), the output
-always displays all variant fields.
-@smallexample
-(@value{GDBP}) ptype str
-type = STRUCT (
-    as x,
-    bs x,
-    CASE bs OF
-    (karli):
-        cs a
-    (ott):
-        ds x
-    ESAC
-)
-@end smallexample
-@end table
-
-@node Locations
-@subsubsection Locations and their accesses
-
-A location in Chill is an object which can contain values.
-
-A value of a location is generally accessed by the (declared) name of
-the location.  The output conforms to the specification of values in
-Chill programs.  How values are specified
-is the topic of the next section, @ref{Values and their Operations}.
-
-The pseudo-location @code{RESULT} (or @code{result}) can be used to
-display or change the result of a currently-active procedure:
-
-@smallexample
-set result := EXPR
-@end smallexample
-
-@noindent
-This does the same as the Chill action @code{RESULT EXPR} (which
-is not available in @value{GDBN}).
-
-Values of reference mode locations are printed by @code{PTR(<hex
-value>)} in case of a free reference mode, and by @code{(REF <reference
-mode>) (<hex-value>)} in case of a bound reference.  @code{<hex value>}
-represents the address where the reference points to.  To access the
-value of the location referenced by the pointer, use the dereference
-operator @samp{->}.
-
-Values of procedure mode locations are displayed by
-@smallexample
-@code{@{ PROC
-(<argument modes> ) <return mode> @} <address> <name of procedure
-location>}
-@end smallexample
-@code{<argument modes>} is a list of modes according to the parameter
-specification of the procedure and @code{<address>} shows the address of
-the entry point.
-
-@ignore
-Locations of instance modes are displayed just like a structure with two
-fields specifying the @emph{process type} and the @emph{copy number} of
-the investigated instance location@footnote{This comes from the current
-implementation of instances.  They are implemented as a structure (no
-na).  The output should be something like @code{[<name of the process>;
-<instance number>]}.}.  The field names are @code{__proc_type} and
-@code{__proc_copy}.
-
-Locations of synchronization modes are displayed like a structure with
-the field name @code{__event_data} in case of a event mode location, and
-like a structure with the field @code{__buffer_data} in case of a buffer
-mode location (refer to previous paragraph).
-
-Structure Mode locations are printed by @code{[.<field name>: <value>,
-...]}.  The @code{<field name>} corresponds to the structure mode
-definition and the layout of @code{<value>} varies depending of the mode
-of the field.  If the investigated structure mode location is of variant
-structure mode, the variant parts of the structure are enclosed in curled
-braces (@samp{@{@}}).  Fields enclosed by @samp{@{,@}} are residing
-on the same memory location and represent the current values of the
-memory location in their specific modes.  Since no tag processing is done
-all variants are displayed. A variant field is printed by
-@code{(<variant name>) = .<field name>: <value>}.  (who implements the
-stuff ???)
-@smallexample
-(@value{GDBP}) print str1 $4 = [.as: 0, .bs: karli, .<TAG>: { (karli) =
-[.cs: []], (susi) = [.ds: susi]}]
-@end smallexample
-@end ignore
-
-Substructures of string mode-, array mode- or structure mode-values
-(e.g. array slices, fields of structure locations) are accessed using
-certain operations which are described in the next section, @ref{Values
-and their Operations}.
-
-A location value may be interpreted as having a different mode using the
-location conversion.  This mode conversion is written as @code{<mode
-name>(<location>)}.  The user has to consider that the sizes of the modes
-have to be equal otherwise an error occurs.  Furthermore, no range
-checking of the location against the destination mode is performed, and
-therefore the result can be quite confusing.
-
-@smallexample
-(@value{GDBP}) print int (s(3 up 4)) XXX TO be filled in !! XXX
-@end smallexample
-
-@node Values and their Operations
-@subsubsection Values and their Operations
-
-Values are used to alter locations, to investigate complex structures in
-more detail or to filter relevant information out of a large amount of
-data.  There are several (mode dependent) operations defined which enable
-such investigations.  These operations are not only applicable to
-constant values but also to locations, which can become quite useful
-when debugging complex structures.  During parsing the command line
-(e.g. evaluating an expression) @value{GDBN} treats location names as
-the values behind these locations.
-
-This section describes how values have to be specified and which
-operations are legal to be used with such values.
-
-@table @code
-@item Literal Values
-Literal values are specified in the same manner as in @sc{gnu} Chill programs.
-For detailed specification refer to the @sc{gnu} Chill implementation Manual
-chapter 1.5.
-@c FIXME: if the Chill Manual is a Texinfo documents, the above should
-@c be converted to a @ref.
-
-@ignore
-@itemize @bullet
-@item
-@emph{Integer Literals} are specified in the same manner as in Chill
-programs (refer to the Chill Standard z200/88 chpt 5.2.4.2)
-@item
-@emph{Boolean Literals} are defined by @code{TRUE} and @code{FALSE}.
-@item
-@emph{Character Literals} are defined by @code{'<character>'}. (e.g.
-@code{'M'})
-@item
-@emph{Set Literals} are defined by a name which was specified in a set
-mode.  The value delivered by a Set Literal is the set value.  This is
-comparable to an enumeration in C/C@t{++} language.
-@item
-@emph{Emptiness Literal} is predefined by @code{NULL}.  The value of the
-emptiness literal delivers either the empty reference value, the empty
-procedure value or the empty instance value.
-
-@item
-@emph{Character String Literals} are defined by a sequence of characters
-enclosed in single- or double quotes.  If a single- or double quote has
-to be part of the string literal it has to be stuffed (specified twice).
-@item
-@emph{Bitstring Literals} are specified in the same manner as in Chill
-programs (refer z200/88 chpt 5.2.4.8).
-@item
-@emph{Floating point literals} are specified in the same manner as in
-(gnu-)Chill programs (refer @sc{gnu} Chill implementation Manual chapter 1.5).
-@end itemize
-@end ignore
-
-@item Tuple Values
-A tuple is specified by @code{<mode name>[<tuple>]}, where @code{<mode
-name>} can be omitted if the mode of the tuple is unambiguous.  This
-unambiguity is derived from the context of a evaluated expression.
-@code{<tuple>} can be one of the following:
-
-@itemize @bullet
-@item @emph{Powerset Tuple}
-@item @emph{Array Tuple}
-@item @emph{Structure Tuple}
-Powerset tuples, array tuples and structure tuples are specified in the
-same manner as in Chill programs refer to z200/88 chpt 5.2.5.
-@end itemize
-
-@item String Element Value
-A string element value is specified by
-@smallexample
-@code{<string value>(<index>)}
-@end smallexample
-where @code{<index>} is a integer expression.  It delivers a character
-value which is equivalent to the character indexed by @code{<index>} in
-the string.
-
-@item String Slice Value
-A string slice value is specified by @code{<string value>(<slice
-spec>)}, where @code{<slice spec>} can be either a range of integer
-expressions or specified by @code{<start expr> up <size>}.
-@code{<size>} denotes the number of elements which the slice contains.
-The delivered value is a string value, which is part of the specified
-string.
-
-@item Array Element Values
-An array element value is specified by @code{<array value>(<expr>)} and
-delivers a array element value of the mode of the specified array.
-
-@item Array Slice Values
-An array slice is specified by @code{<array value>(<slice spec>)}, where
-@code{<slice spec>} can be either a range specified by expressions or by
-@code{<start expr> up <size>}.  @code{<size>} denotes the number of
-arrayelements the slice contains.  The delivered value is an array value
-which is part of the specified array.
-
-@item Structure Field Values
-A structure field value is derived by @code{<structure value>.<field
-name>}, where @code{<field name>} indicates the name of a field specified
-in the mode definition of the structure.  The mode of the delivered value
-corresponds to this mode definition in the structure definition.
-
-@item Procedure Call Value
-The procedure call value is derived from the return value of the
-procedure@footnote{If a procedure call is used for instance in an
-expression, then this procedure is called with all its side
-effects.  This can lead to confusing results if used carelessly.}.
-
-Values of duration mode locations are represented by @code{ULONG} literals.
-
-Values of time mode locations appear as
-@smallexample
-@code{TIME(<secs>:<nsecs>)}
-@end smallexample
-
-
-@ignore
-This is not implemented yet:
-@item Built-in Value
-@noindent
-The following built in functions are provided:
-
-@table @code
-@item @code{ADDR()}
-@item @code{NUM()}
-@item @code{PRED()}
-@item @code{SUCC()}
-@item @code{ABS()}
-@item @code{CARD()}
-@item @code{MAX()}
-@item @code{MIN()}
-@item @code{SIZE()}
-@item @code{UPPER()}
-@item @code{LOWER()}
-@item @code{LENGTH()}
-@item @code{SIN()}
-@item @code{COS()}
-@item @code{TAN()}
-@item @code{ARCSIN()}
-@item @code{ARCCOS()}
-@item @code{ARCTAN()}
-@item @code{EXP()}
-@item @code{LN()}
-@item @code{LOG()}
-@item @code{SQRT()}
-@end table
-
-For a detailed description refer to the GNU Chill implementation manual
-chapter 1.6.
-@end ignore
-
-@item Zero-adic Operator Value
-The zero-adic operator value is derived from the instance value for the
-current active process.
-
-@item Expression Values
-The value delivered by an expression is the result of the evaluation of
-the specified expression.  If there are error conditions (mode
-incompatibility, etc.) the evaluation of expressions is aborted with a
-corresponding error message.  Expressions may be parenthesised which
-causes the evaluation of this expression before any other expression
-which uses the result of the parenthesised expression.  The following
-operators are supported by @value{GDBN}:
-
-@table @code
-@item @code{OR, ORIF, XOR}
-@itemx @code{AND, ANDIF}
-@itemx @code{NOT}
-Logical operators defined over operands of boolean mode.
-
-@item @code{=, /=}
-Equality and inequality operators defined over all modes.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Relational operators defined over predefined modes.
-
-@item @code{+, -}
-@itemx @code{*, /, MOD, REM}
-Arithmetic operators defined over predefined modes.
-
-@item @code{-}
-Change sign operator.
-
-@item @code{//}
-String concatenation operator.
-
-@item @code{()}
-String repetition operator.
-
-@item @code{->}
-Referenced location operator which can be used either to take the
-address of a location (@code{->loc}), or to dereference a reference
-location (@code{loc->}).
-
-@item @code{OR, XOR}
-@itemx @code{AND}
-@itemx @code{NOT}
-Powerset and bitstring operators.
-
-@item @code{>, >=}
-@itemx @code{<, <=}
-Powerset inclusion operators.
-
-@item @code{IN}
-Membership operator.
-@end table
-@end table
-
-@node Chill type and range checks
-@subsubsection Chill type and range checks
-
-@value{GDBN} considers two Chill variables mode equivalent if the sizes
-of the two modes are equal.  This rule applies recursively to more
-complex datatypes which means that complex modes are treated
-equivalent if all element modes (which also can be complex modes like
-structures, arrays, etc.) have the same size.
-
-Range checking is done on all mathematical operations, assignment, array
-index bounds and all built in procedures.
-
-Strong type checks are forced using the @value{GDBN} command @code{set
-check strong}.  This enforces strong type and range checks on all
-operations where Chill constructs are used (expressions, built in
-functions, etc.) in respect to the semantics as defined in the z.200
-language specification.
-
-All checks can be disabled by the @value{GDBN} command @code{set check
-off}.
-
-@ignore
-@c Deviations from the Chill Standard Z200/88
-see last paragraph ?
-@end ignore
-
-@node Chill defaults
-@subsubsection Chill defaults
-
-If type and range checking are set automatically by @value{GDBN}, they
-both default to @code{on} whenever the working language changes to
-Chill.  This happens regardless of whether you or @value{GDBN}
-selected the working language.
-
-If you allow @value{GDBN} to set the language automatically, then entering
-code compiled from a file whose name ends with @file{.ch} sets the
-working language to Chill.  @xref{Automatically, ,Having @value{GDBN} set
-the language automatically}, for further details.
-
-@node Symbols
-@chapter Examining the Symbol Table
-
-The commands described in this chapter allow you to inquire about the
-symbols (names of variables, functions and types) defined in your
-program.  This information is inherent in the text of your program and
-does not change as your program executes.  @value{GDBN} finds it in your
-program's symbol table, in the file indicated when you started @value{GDBN}
-(@pxref{File Options, ,Choosing files}), or by one of the
-file-management commands (@pxref{Files, ,Commands to specify files}).
-
-@cindex symbol names
-@cindex names of symbols
-@cindex quoting names
-Occasionally, you may need to refer to symbols that contain unusual
-characters, which @value{GDBN} ordinarily treats as word delimiters.  The
-most frequent case is in referring to static variables in other
-source files (@pxref{Variables,,Program variables}).  File names
-are recorded in object files as debugging symbols, but @value{GDBN} would
-ordinarily parse a typical file name, like @file{foo.c}, as the three words
-@samp{foo} @samp{.} @samp{c}.  To allow @value{GDBN} to recognize
-@samp{foo.c} as a single symbol, enclose it in single quotes; for example,
-
-@example
-p 'foo.c'::x
-@end example
-
-@noindent
-looks up the value of @code{x} in the scope of the file @file{foo.c}.
-
-@table @code
-@kindex info address
-@cindex address of a symbol
-@item info address @var{symbol}
-Describe where the data for @var{symbol} is stored.  For a register
-variable, this says which register it is kept in.  For a non-register
-local variable, this prints the stack-frame offset at which the variable
-is always stored.
-
-Note the contrast with @samp{print &@var{symbol}}, which does not work
-at all for a register variable, and for a stack local variable prints
-the exact address of the current instantiation of the variable.
-
-@kindex info symbol
-@cindex symbol from address
-@item info symbol @var{addr}
-Print the name of a symbol which is stored at the address @var{addr}.
-If no symbol is stored exactly at @var{addr}, @value{GDBN} prints the
-nearest symbol and an offset from it:
-
-@example
-(@value{GDBP}) info symbol 0x54320
-_initialize_vx + 396 in section .text
-@end example
-
 @noindent
 This is the opposite of the @code{info address} command.  You can use
 it to find out the name of a variable or a function given its address.
@@ -8682,14 +8833,14 @@ of just the name of the type.
 
 For example, for this variable declaration:
 
-@example
+@smallexample
 struct complex @{double real; double imag;@} v;
-@end example
+@end smallexample
 
 @noindent
 the two commands give this output:
 
-@example
+@smallexample
 @group
 (@value{GDBP}) whatis v
 type = struct complex
@@ -8699,7 +8850,7 @@ type = struct complex @{
     double imag;
 @}
 @end group
-@end example
+@end smallexample
 
 @noindent
 As with @code{whatis}, using @code{ptype} without an argument refers to
@@ -8746,9 +8897,25 @@ collect}.
 
 @kindex info source
 @item info source
-Show the name of the current source file---that is, the source file for
-the function containing the current point of execution---and the language
-it was written in.
+Show information about the current source file---that is, the source file for
+the function containing the current point of execution:
+@itemize @bullet
+@item
+the name of the source file, and the directory containing it,
+@item
+the directory it was compiled in,
+@item
+its length, in lines,
+@item
+which programming language it is written in,
+@item
+whether the executable includes debugging information for that file, and
+if so, what format the information is in (e.g., STABS, Dwarf 2, etc.), and
+@item
+whether the debugging information includes information about
+preprocessor macros.
+@end itemize
+
 
 @kindex info sources
 @item info sources
@@ -8772,7 +8939,7 @@ that conflict with the regular expression language (eg.
 @kindex info variables
 @item info variables
 Print the names and data types of all variables that are declared
-outside of functions (i.e., excluding local variables).
+outside of functions (i.e.@: excluding local variables).
 
 @item info variables @var{regexp}
 Print the names and data types of all variables (except for local
@@ -8863,8 +9030,66 @@ files that @value{GDBN} has skimmed, but not yet read completely.  Finally,
 required for each object file from which @value{GDBN} has read some symbols.
 @xref{Files, ,Commands to specify files}, for a discussion of how
 @value{GDBN} reads symbols (in the description of @code{symbol-file}).
+
+@kindex maint list symtabs
+@kindex maint list psymtabs
+@cindex listing @value{GDBN}'s internal symbol tables
+@cindex symbol tables, listing @value{GDBN}'s internal
+@cindex full symbol tables, listing @value{GDBN}'s internal
+@cindex partial symbol tables, listing @value{GDBN}'s internal
+@item maint list symtabs @r{[} @var{regexp} @r{]}
+@itemx maint list psymtabs @r{[} @var{regexp} @r{]}
+
+List the @code{struct symtab} or @code{struct partial_symtab}
+structures whose names match @var{regexp}.  If @var{regexp} is not
+given, list them all.  The output includes expressions which you can
+copy into a @value{GDBN} debugging this one to examine a particular
+structure in more detail.  For example:
+
+@smallexample
+(@value{GDBP}) maint list psymtabs dwarf2read
+@{ objfile /home/gnu/build/gdb/gdb
+  ((struct objfile *) 0x82e69d0)
+  @{ psymtab /home/gnu/src/gdb/dwarf2read.c 
+    ((struct partial_symtab *) 0x8474b10)
+    readin no
+    fullname (null)
+    text addresses 0x814d3c8 -- 0x8158074
+    globals (* (struct partial_symbol **) 0x8507a08 @@ 9)
+    statics (* (struct partial_symbol **) 0x40e95b78 @@ 2882)
+    dependencies (none)
+  @}
+@}
+(@value{GDBP}) maint list symtabs
+(@value{GDBP})
+@end smallexample
+@noindent
+We see that there is one partial symbol table whose filename contains
+the string @samp{dwarf2read}, belonging to the @samp{gdb} executable;
+and we see that @value{GDBN} has not read in any symtabs yet at all.
+If we set a breakpoint on a function, that will cause @value{GDBN} to
+read the symtab for the compilation unit containing that function:
+
+@smallexample
+(@value{GDBP}) break dwarf2_psymtab_to_symtab
+Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c,
+line 1574.
+(@value{GDBP}) maint list symtabs
+@{ objfile /home/gnu/build/gdb/gdb 
+  ((struct objfile *) 0x82e69d0)
+  @{ symtab /home/gnu/src/gdb/dwarf2read.c 
+    ((struct symtab *) 0x86c1f38)
+    dirname (null)
+    fullname (null)
+    blockvector ((struct blockvector *) 0x86c1bd0) (primary)
+    debugformat DWARF 2
+  @}
+@}
+(@value{GDBP}) 
+@end smallexample
 @end table
 
+
 @node Altering
 @chapter Altering Execution
 
@@ -8895,9 +9120,9 @@ address, or even return prematurely from a function.
 To alter the value of a variable, evaluate an assignment expression.
 @xref{Expressions, ,Expressions}.  For example,
 
-@example
+@smallexample
 print x=4
-@end example
+@end smallexample
 
 @noindent
 stores the value 4 into the variable @code{x}, and then prints the
@@ -8921,22 +9146,22 @@ program has a variable @code{width}, you get an error if you try to set
 a new value with just @samp{set width=13}, because @value{GDBN} has the
 command @code{set width}:
 
-@example
+@smallexample
 (@value{GDBP}) whatis width
 type = double
 (@value{GDBP}) p width
 $4 = 13
 (@value{GDBP}) set width=47
 Invalid syntax in expression.
-@end example
+@end smallexample
 
 @noindent
 The invalid expression, of course, is @samp{=47}.  In
 order to actually set the program's variable @code{width}, use
 
-@example
+@smallexample
 (@value{GDBP}) set var width=47
-@end example
+@end smallexample
 
 Because the @code{set} command has many subcommands that can conflict
 with the names of program variables, it is a good idea to use the
@@ -8945,7 +9170,7 @@ your program has a variable @code{g}, you run into problems if you try
 to set a new value with just @samp{set g=4}, because @value{GDBN} has
 the command @code{set gnutarget}, abbreviated @code{set g}:
 
-@example
+@smallexample
 @group
 (@value{GDBP}) whatis g
 type = double
@@ -8963,16 +9188,16 @@ Starting program: /home/smith/cc_progs/a.out
 (@value{GDBP}) show g
 The current BFD target is "=4".
 @end group
-@end example
+@end smallexample
 
 @noindent
 The program variable @code{g} did not change, and you silently set the
 @code{gnutarget} to an invalid value.  In order to set the variable
 @code{g}, use
 
-@example
+@smallexample
 (@value{GDBP}) set var g=4
-@end example
+@end smallexample
 
 @value{GDBN} allows more implicit conversions in assignments than C; you can
 freely store an integer value into a pointer variable or vice versa,
@@ -8987,9 +9212,9 @@ construct to generate a value of specified type at a specified address
 to memory location @code{0x83040} as an integer (which implies a certain size
 and representation in memory), and
 
-@example
+@smallexample
 set @{int@}0x83040 = 4
-@end example
+@end smallexample
 
 @noindent
 stores the value 4 into that memory location.
@@ -9032,9 +9257,9 @@ difference is that this does not start your program running; it only
 changes the address of where it @emph{will} run when you continue.  For
 example,
 
-@example
+@smallexample
 set $pc = 0x485
-@end example
+@end smallexample
 
 @noindent
 makes the next @code{continue} command or stepping command execute at
@@ -9123,12 +9348,6 @@ execute a function from your program, but without cluttering the output
 with @code{void} returned values.  If the result is not void, it
 is printed and saved in the value history.
 
-@c OBSOLETE For the A29K, a user-controlled variable @code{call_scratch_address},
-@c OBSOLETE specifies the location of a scratch area to be used when @value{GDBN}
-@c OBSOLETE calls a function in the target.  This is necessary because the usual
-@c OBSOLETE method of putting the scratch area on the stack does not work in systems
-@c OBSOLETE that have separate instruction and data spaces.
-
 @node Patching
 @section Patching programs
 
@@ -9174,6 +9393,7 @@ program.  To debug a core dump of a previous run, you must also tell
 
 @menu
 * Files::                       Commands to specify files
+* Separate Debug Files::        Debugging information in separate files
 * Symbol Errors::               Errors reading symbol files
 @end menu
 
@@ -9466,6 +9686,21 @@ COFF shared library information.
 Section contains common symbols.
 @end table
 @end table
+@kindex set trust-readonly-sections
+@item set trust-readonly-sections on
+Tell @value{GDBN} that readonly sections in your object file
+really are read-only (i.e.@: that their contents will not change).
+In that case, @value{GDBN} can fetch values from these sections
+out of the object file, rather than from the target program.
+For some targets (notably embedded ones), this can be a significant
+enhancement to debugging performance.
+
+The default is off.
+
+@item set trust-readonly-sections off
+Tell @value{GDBN} not to trust readonly sections.  This means that
+the contents of the section might change while the program is running,
+and must therefore be fetched from the target when needed.
 @end table
 
 All file-specifying commands allow both absolute and relative file names
@@ -9555,7 +9790,7 @@ If @var{threshold} is nonzero and shared library autoloading is enabled,
 symbols from all shared object libraries will be loaded until the total
 size of the loaded shared library symbols exceeds this threshold.
 Otherwise, symbols must be loaded manually, using the
-@code{sharedlibrary} command.  The default threshold is 100 (i.e. 100
+@code{sharedlibrary} command.  The default threshold is 100 (i.e.@: 100
 Mb).
 
 @kindex show auto-solib-limit
@@ -9563,37 +9798,264 @@ Mb).
 Display the current autoloading size threshold, in megabytes.
 @end table
 
-@node Symbol Errors
-@section Errors reading symbol files
-
-While reading a symbol file, @value{GDBN} occasionally encounters problems,
-such as symbol types it does not recognize, or known bugs in compiler
-output.  By default, @value{GDBN} does not notify you of such problems, since
-they are relatively common and primarily of interest to people
-debugging compilers.  If you are interested in seeing information
-about ill-constructed symbol tables, you can either ask @value{GDBN} to print
-only one message about each such type of problem, no matter how many
-times the problem occurs; or you can ask @value{GDBN} to print more messages,
-to see how many times the problems occur, with the @code{set
-complaints} command (@pxref{Messages/Warnings, ,Optional warnings and
-messages}).
+Shared libraries are also supported in many cross or remote debugging
+configurations.  A copy of the target's libraries need to be present on the
+host system; they need to be the same as the target libraries, although the
+copies on the target can be stripped as long as the copies on the host are
+not.
 
-The messages currently printed, and their meanings, include:
+You need to tell @value{GDBN} where the target libraries are, so that it can
+load the correct copies---otherwise, it may try to load the host's libraries.
+@value{GDBN} has two variables to specify the search directories for target
+libraries.
 
 @table @code
-@item inner block not inside outer block in @var{symbol}
+@kindex set solib-absolute-prefix
+@item set solib-absolute-prefix @var{path}
+If this variable is set, @var{path} will be used as a prefix for any
+absolute shared library paths; many runtime loaders store the absolute
+paths to the shared library in the target program's memory.  If you use
+@samp{solib-absolute-prefix} to find shared libraries, they need to be laid
+out in the same way that they are on the target, with e.g.@: a
+@file{/usr/lib} hierarchy under @var{path}.
+
+You can set the default value of @samp{solib-absolute-prefix} by using the
+configure-time @samp{--with-sysroot} option.
+
+@kindex show solib-absolute-prefix
+@item show solib-absolute-prefix
+Display the current shared library prefix.
+
+@kindex set solib-search-path
+@item set solib-search-path @var{path}
+If this variable is set, @var{path} is a colon-separated list of directories
+to search for shared libraries.  @samp{solib-search-path} is used after
+@samp{solib-absolute-prefix} fails to locate the library, or if the path to
+the library is relative instead of absolute.  If you want to use
+@samp{solib-search-path} instead of @samp{solib-absolute-prefix}, be sure to
+set @samp{solib-absolute-prefix} to a nonexistant directory to prevent
+@value{GDBN} from finding your host's libraries.
+
+@kindex show solib-search-path
+@item show solib-search-path
+Display the current shared library search path.
+@end table
 
-The symbol information shows where symbol scopes begin and end
-(such as at the start of a function or a block of statements).  This
-error indicates that an inner scope block is not fully contained
-in its outer scope blocks.
 
-@value{GDBN} circumvents the problem by treating the inner block as if it had
-the same scope as the outer block.  In the error message, @var{symbol}
-may be shown as ``@code{(don't know)}'' if the outer block is not a
-function.
+@node Separate Debug Files
+@section Debugging Information in Separate Files
+@cindex separate debugging information files
+@cindex debugging information in separate files
+@cindex @file{.debug} subdirectories
+@cindex debugging information directory, global
+@cindex global debugging information directory
+
+@value{GDBN} allows you to put a program's debugging information in a
+file separate from the executable itself, in a way that allows
+@value{GDBN} to find and load the debugging information automatically.
+Since debugging information can be very large --- sometimes larger
+than the executable code itself --- some systems distribute debugging
+information for their executables in separate files, which users can
+install only when they need to debug a problem.
+
+If an executable's debugging information has been extracted to a
+separate file, the executable should contain a @dfn{debug link} giving
+the name of the debugging information file (with no directory
+components), and a checksum of its contents.  (The exact form of a
+debug link is described below.)  If the full name of the directory
+containing the executable is @var{execdir}, and the executable has a
+debug link that specifies the name @var{debugfile}, then @value{GDBN}
+will automatically search for the debugging information file in three
+places:
 
-@item block at @var{address} out of order
+@itemize @bullet
+@item
+the directory containing the executable file (that is, it will look
+for a file named @file{@var{execdir}/@var{debugfile}},
+@item
+a subdirectory of that directory named @file{.debug} (that is, the
+file @file{@var{execdir}/.debug/@var{debugfile}}, and
+@item
+a subdirectory of the global debug file directory that includes the
+executable's full path, and the name from the link (that is, the file
+@file{@var{globaldebugdir}/@var{execdir}/@var{debugfile}}, where
+@var{globaldebugdir} is the global debug file directory, and
+@var{execdir} has been turned into a relative path).
+@end itemize
+@noindent
+@value{GDBN} checks under each of these names for a debugging
+information file whose checksum matches that given in the link, and
+reads the debugging information from the first one it finds.
+
+So, for example, if you ask @value{GDBN} to debug @file{/usr/bin/ls},
+which has a link containing the name @file{ls.debug}, and the global
+debug directory is @file{/usr/lib/debug}, then @value{GDBN} will look
+for debug information in @file{/usr/bin/ls.debug},
+@file{/usr/bin/.debug/ls.debug}, and
+@file{/usr/lib/debug/usr/bin/ls.debug}.
+
+You can set the global debugging info directory's name, and view the
+name @value{GDBN} is currently using.
+
+@table @code
+
+@kindex set debug-file-directory
+@item set debug-file-directory @var{directory}
+Set the directory which @value{GDBN} searches for separate debugging
+information files to @var{directory}.
+
+@kindex show debug-file-directory
+@item show debug-file-directory
+Show the directory @value{GDBN} searches for separate debugging
+information files.
+
+@end table
+
+@cindex @code{.gnu_debuglink} sections
+@cindex debug links
+A debug link is a special section of the executable file named
+@code{.gnu_debuglink}.  The section must contain:
+
+@itemize
+@item
+A filename, with any leading directory components removed, followed by
+a zero byte,
+@item
+zero to three bytes of padding, as needed to reach the next four-byte
+boundary within the section, and
+@item
+a four-byte CRC checksum, stored in the same endianness used for the
+executable file itself.  The checksum is computed on the debugging
+information file's full contents by the function given below, passing
+zero as the @var{crc} argument.
+@end itemize
+
+Any executable file format can carry a debug link, as long as it can
+contain a section named @code{.gnu_debuglink} with the contents
+described above.
+
+The debugging information file itself should be an ordinary
+executable, containing a full set of linker symbols, sections, and
+debugging information.  The sections of the debugging information file
+should have the same names, addresses and sizes as the original file,
+but they need not contain any data --- much like a @code{.bss} section
+in an ordinary executable.
+
+As of December 2002, there is no standard GNU utility to produce
+separated executable / debugging information file pairs.  Ulrich
+Drepper's @file{elfutils} package, starting with version 0.53,
+contains a version of the @code{strip} command such that the command
+@kbd{strip foo -f foo.debug} removes the debugging information from
+the executable file @file{foo}, places it in the file
+@file{foo.debug}, and leaves behind a debug link in @file{foo}.
+
+Since there are many different ways to compute CRC's (different
+polynomials, reversals, byte ordering, etc.), the simplest way to
+describe the CRC used in @code{.gnu_debuglink} sections is to give the
+complete code for a function that computes it:
+
+@kindex @code{gnu_debuglink_crc32}
+@smallexample
+unsigned long
+gnu_debuglink_crc32 (unsigned long crc,
+                     unsigned char *buf, size_t len)
+@{
+  static const unsigned long crc32_table[256] =
+    @{
+      0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
+      0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
+      0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
+      0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
+      0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
+      0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
+      0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
+      0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
+      0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
+      0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
+      0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
+      0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
+      0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
+      0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
+      0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
+      0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
+      0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
+      0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
+      0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
+      0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
+      0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
+      0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
+      0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
+      0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
+      0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
+      0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
+      0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
+      0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
+      0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
+      0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
+      0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
+      0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
+      0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
+      0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
+      0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
+      0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
+      0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
+      0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
+      0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
+      0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
+      0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
+      0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
+      0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
+      0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
+      0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
+      0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
+      0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
+      0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
+      0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
+      0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
+      0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
+      0x2d02ef8d
+    @};
+  unsigned char *end;
+
+  crc = ~crc & 0xffffffff;
+  for (end = buf + len; buf < end; ++buf)
+    crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
+  return ~crc & 0xffffffff;;
+@}
+@end smallexample
+
+
+@node Symbol Errors
+@section Errors reading symbol files
+
+While reading a symbol file, @value{GDBN} occasionally encounters problems,
+such as symbol types it does not recognize, or known bugs in compiler
+output.  By default, @value{GDBN} does not notify you of such problems, since
+they are relatively common and primarily of interest to people
+debugging compilers.  If you are interested in seeing information
+about ill-constructed symbol tables, you can either ask @value{GDBN} to print
+only one message about each such type of problem, no matter how many
+times the problem occurs; or you can ask @value{GDBN} to print more messages,
+to see how many times the problems occur, with the @code{set
+complaints} command (@pxref{Messages/Warnings, ,Optional warnings and
+messages}).
+
+The messages currently printed, and their meanings, include:
+
+@table @code
+@item inner block not inside outer block in @var{symbol}
+
+The symbol information shows where symbol scopes begin and end
+(such as at the start of a function or a block of statements).  This
+error indicates that an inner scope block is not fully contained
+in its outer scope blocks.
+
+@value{GDBN} circumvents the problem by treating the inner block as if it had
+the same scope as the outer block.  In the error message, @var{symbol}
+may be shown as ``@code{(don't know)}'' if the outer block is not a
+function.
+
+@item block at @var{address} out of order
 
 The symbol information for symbol scope blocks should occur in
 order of increasing addresses.  This error indicates that it does not
@@ -9791,11 +10253,11 @@ it somewhere in memory where it won't get clobbered by the download.
 @item target sim
 Builtin CPU simulator.  @value{GDBN} includes simulators for most architectures.
 In general,
-@example
+@smallexample
         target sim
         load
         run
-@end example
+@end smallexample
 @noindent
 works; however, you cannot assume that a specific memory map, device
 drivers, or even basic I/O is available, although some simulators do
@@ -9917,21 +10379,21 @@ displayed is determined on a per-OS basis.
 Use the @code{set os} command to set the operating system.  This tells
 @value{GDBN} which kernel object display module to initialize:
 
-@example
+@smallexample
 (@value{GDBP}) set os cisco
-@end example
+@end smallexample
 
 If @code{set os} succeeds, @value{GDBN} will display some information
 about the operating system, and will create a new @code{info} command
 which can be used to query the target.  The @code{info} command is named
 after the operating system:
 
-@example
+@smallexample
 (@value{GDBP}) info cisco
 List of Cisco Kernel Objects
 Object     Description
 any        Any and all objects
-@end example
+@end smallexample
 
 Further subcommands can be used to query about particular objects known
 by the kernel.
@@ -9943,6 +10405,13 @@ is supported other than to try it.
 @node Remote Debugging
 @chapter Debugging remote programs
 
+@menu
+* Server::                     Using the gdbserver program
+* NetWare::                     Using the gdbserve.nlm program
+* Remote configuration::        Remote configuration
+* remote stub::                 Implementing a remote stub
+@end menu
+
 @node Server
 @section Using the @code{gdbserver} program
 
@@ -9978,7 +10447,7 @@ strip the program if necessary to save space.  @value{GDBN} on the host
 system does all the symbol handling.
 
 To use the server, you must tell it how to communicate with @value{GDBN};
-the name of your program; and the arguments for your program.  The
+the name of your program; and the arguments for your program.  The usual
 syntax is:
 
 @smallexample
@@ -10015,6 +10484,16 @@ conflicts with another service, @code{gdbserver} prints an error message
 and exits.}  You must use the same port number with the host @value{GDBN}
 @code{target remote} command.
 
+On some targets, @code{gdbserver} can also attach to running programs.
+This is accomplished via the @code{--attach} argument.  The syntax is:
+
+@smallexample
+target> gdbserver @var{comm} --attach @var{pid}
+@end smallexample
+
+@var{pid} is the process ID of a currently running process.  It isn't necessary
+to point @code{gdbserver} at a binary for the running process.
+
 @item On the @value{GDBN} host machine,
 you need an unstripped copy of your program, since @value{GDBN} needs
 symbols and debugging information.  Start up @value{GDBN} as usual,
@@ -10102,9 +10581,37 @@ argument is a device name (usually a serial device, like
 communications with the server via serial line @file{/dev/ttyb}.
 @end table
 
+@node Remote configuration
+@section Remote configuration
+
+The following configuration options are available when debugging remote
+programs:
+
+@table @code
+@kindex set remote hardware-watchpoint-limit
+@kindex set remote hardware-breakpoint-limit
+@anchor{set remote hardware-watchpoint-limit}
+@anchor{set remote hardware-breakpoint-limit}
+@item set remote hardware-watchpoint-limit @var{limit}
+@itemx set remote hardware-breakpoint-limit @var{limit}
+Restrict @value{GDBN} to using @var{limit} remote hardware breakpoint or
+watchpoints.  A limit of -1, the default, is treated as unlimited.
+@end table
+
 @node remote stub
 @section Implementing a remote stub
 
+@cindex debugging stub, example
+@cindex remote stub, example
+@cindex stub example, remote debugging
+The stub files provided with @value{GDBN} implement the target side of the
+communication protocol, and the @value{GDBN} side is implemented in the
+@value{GDBN} source file @file{remote.c}.  Normally, you can simply allow
+these subroutines to communicate, and ignore the details.  (If you're
+implementing your own stub file, you can still ignore the details: start
+with one of the existing stub files.  @file{sparc-stub.c} is the best
+organized, and therefore the easiest to read.)
+
 @cindex remote serial debugging, overview
 To debug a program running on another machine (the debugging
 @dfn{target} machine), you must first arrange for all the usual
@@ -10358,18 +10865,18 @@ Make sure you have defined the supporting low-level routines
 @item
 Insert these lines near the top of your program:
 
-@example
+@smallexample
 set_debug_traps();
 breakpoint();
-@end example
+@end smallexample
 
 @item
 For the 680x0 stub only, you need to provide a variable called
 @code{exceptionHook}.  Normally you just use:
 
-@example
+@smallexample
 void (*exceptionHook)() = 0;
-@end example
+@end smallexample
 
 @noindent
 but if before calling @code{set_debug_traps}, you set it to point to a
@@ -10403,34 +10910,50 @@ of its pure text.
 Establish communication using the @code{target remote} command.
 Its argument specifies how to communicate with the target
 machine---either via a devicename attached to a direct serial line, or a
-TCP port (usually to a terminal server which in turn has a serial line
+TCP or UDP port (usually to a terminal server which in turn has a serial line
 to the target).  For example, to use a serial line connected to the
 device named @file{/dev/ttyb}:
 
-@example
+@smallexample
 target remote /dev/ttyb
-@end example
+@end smallexample
 
 @cindex TCP port, @code{target remote}
 To use a TCP connection, use an argument of the form
-@code{@var{host}:port}.  For example, to connect to port 2828 on a
+@code{@var{host}:@var{port}} or @code{tcp:@var{host}:@var{port}}.
+For example, to connect to port 2828 on a
 terminal server named @code{manyfarms}:
 
-@example
+@smallexample
 target remote manyfarms:2828
-@end example
+@end smallexample
 
 If your remote target is actually running on the same machine as
 your debugger session (e.g.@: a simulator of your target running on
 the same host), you can omit the hostname.  For example, to connect
 to port 1234 on your local machine:
 
-@example
+@smallexample
 target remote :1234
-@end example
+@end smallexample
 @noindent
 
 Note that the colon is still required here.
+
+@cindex UDP port, @code{target remote}
+To use a UDP connection, use an argument of the form
+@code{udp:@var{host}:@var{port}}.  For example, to connect to UDP port 2828
+on a terminal server named @code{manyfarms}:
+
+@smallexample
+target remote udp:manyfarms:2828
+@end smallexample
+
+When using a UDP connection for remote debugging, you should keep in mind
+that the `U' stands for ``Unreliable''.  UDP can silently drop packets on
+busy or unreliable networks, which will cause havoc with your debugging
+session.
+
 @end enumerate
 
 Now you can use all the usual commands to examine and change data and to
@@ -10447,4429 +10970,10632 @@ program.  This may or may not succeed, depending in part on the hardware
 and the serial drivers the remote system uses.  If you type the
 interrupt character once again, @value{GDBN} displays this prompt:
 
-@example
+@smallexample
 Interrupted while waiting for the program.
 Give up (and stop debugging it)?  (y or n)
-@end example
+@end smallexample
 
 If you type @kbd{y}, @value{GDBN} abandons the remote debugging session.
 (If you decide you want to try again later, you can use @samp{target
 remote} again to connect once more.)  If you type @kbd{n}, @value{GDBN}
 goes back to waiting.
 
-@node Protocol
-@section Communication protocol
 
-@cindex debugging stub, example
-@cindex remote stub, example
-@cindex stub example, remote debugging
-The stub files provided with @value{GDBN} implement the target side of the
-communication protocol, and the @value{GDBN} side is implemented in the
-@value{GDBN} source file @file{remote.c}.  Normally, you can simply allow
-these subroutines to communicate, and ignore the details.  (If you're
-implementing your own stub file, you can still ignore the details: start
-with one of the existing stub files.  @file{sparc-stub.c} is the best
-organized, and therefore the easiest to read.)
+@node Configurations
+@chapter Configuration-Specific Information
 
-However, there may be occasions when you need to know something about
-the protocol---for example, if there is only one serial port to your
-target machine, you might want your program to do something special if
-it recognizes a packet meant for @value{GDBN}.
+While nearly all @value{GDBN} commands are available for all native and
+cross versions of the debugger, there are some exceptions.  This chapter
+describes things that are only available in certain configurations.
 
-In the examples below, @samp{<-} and @samp{->} are used to indicate
-transmitted and received data respectfully.
+There are three major categories of configurations: native
+configurations, where the host and target are the same, embedded
+operating system configurations, which are usually the same for several
+different processor architectures, and bare embedded processors, which
+are quite different from each other.
 
-@cindex protocol, @value{GDBN} remote serial
-@cindex serial protocol, @value{GDBN} remote
-@cindex remote serial protocol
-All @value{GDBN} commands and responses (other than acknowledgments) are
-sent as a @var{packet}.  A @var{packet} is introduced with the character
-@samp{$}, the actual @var{packet-data}, and the terminating character
-@samp{#} followed by a two-digit @var{checksum}:
+@menu
+* Native::
+* Embedded OS::
+* Embedded Processors::
+* Architectures::
+@end menu
 
-@example
-@code{$}@var{packet-data}@code{#}@var{checksum}
-@end example
-@noindent
+@node Native
+@section Native
 
-@cindex checksum, for @value{GDBN} remote
-@noindent
-The two-digit @var{checksum} is computed as the modulo 256 sum of all
-characters between the leading @samp{$} and the trailing @samp{#} (an
-eight bit unsigned checksum).
+This section describes details specific to particular native
+configurations.
 
-Implementors should note that prior to @value{GDBN} 5.0 the protocol
-specification also included an optional two-digit @var{sequence-id}:
+@menu
+* HP-UX::                       HP-UX
+* SVR4 Process Information::    SVR4 process information
+* DJGPP Native::                Features specific to the DJGPP port
+* Cygwin Native::              Features specific to the Cygwin port
+@end menu
 
-@example
-@code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum}
-@end example
+@node HP-UX
+@subsection HP-UX
 
-@cindex sequence-id, for @value{GDBN} remote
-@noindent
-That @var{sequence-id} was appended to the acknowledgment.  @value{GDBN}
-has never output @var{sequence-id}s.  Stubs that handle packets added
-since @value{GDBN} 5.0 must not accept @var{sequence-id}.
+On HP-UX systems, if you refer to a function or variable name that
+begins with a dollar sign, @value{GDBN} searches for a user or system
+name first, before it searches for a convenience variable.
 
-@cindex acknowledgment, for @value{GDBN} remote
-When either the host or the target machine receives a packet, the first
-response expected is an acknowledgment: either @samp{+} (to indicate
-the package was received correctly) or @samp{-} (to request
-retransmission):
+@node SVR4 Process Information
+@subsection SVR4 process information
 
-@example
-<- @code{$}@var{packet-data}@code{#}@var{checksum}
--> @code{+}
-@end example
-@noindent
+@kindex /proc
+@cindex process image
 
-The host (@value{GDBN}) sends @var{command}s, and the target (the
-debugging stub incorporated in your program) sends a @var{response}.  In
-the case of step and continue @var{command}s, the response is only sent
-when the operation has completed (the target has again stopped).
+Many versions of SVR4 provide a facility called @samp{/proc} that can be
+used to examine the image of a running process using file-system
+subroutines.  If @value{GDBN} is configured for an operating system with
+this facility, the command @code{info proc} is available to report on
+several kinds of information about the process running your program.
+@code{info proc} works only on SVR4 systems that include the
+@code{procfs} code.  This includes OSF/1 (Digital Unix), Solaris, Irix,
+and Unixware, but not HP-UX or @sc{gnu}/Linux, for example.
 
-@var{packet-data} consists of a sequence of characters with the
-exception of @samp{#} and @samp{$} (see @samp{X} packet for additional
-exceptions).
+@table @code
+@kindex info proc
+@item info proc
+Summarize available information about the process.
 
-Fields within the packet should be separated using @samp{,} @samp{;} or
-@samp{:}.  Except where otherwise noted all numbers are represented in
-HEX with leading zeros suppressed.
+@kindex info proc mappings
+@item info proc mappings
+Report on the address ranges accessible in the program, with information
+on whether your program may read, write, or execute each range.
+@ignore
+@comment These sub-options of 'info proc' were not included when
+@comment procfs.c was re-written.  Keep their descriptions around
+@comment against the day when someone finds the time to put them back in.
+@kindex info proc times
+@item info proc times
+Starting time, user CPU time, and system CPU time for your program and
+its children.
 
-Implementors should note that prior to @value{GDBN} 5.0, the character
-@samp{:} could not appear as the third character in a packet (as it
-would potentially conflict with the @var{sequence-id}).
+@kindex info proc id
+@item info proc id
+Report on the process IDs related to your program: its own process ID,
+the ID of its parent, the process group ID, and the session ID.
 
-Response @var{data} can be run-length encoded to save space.  A @samp{*}
-means that the next character is an @sc{ascii} encoding giving a repeat count
-which stands for that many repetitions of the character preceding the
-@samp{*}.  The encoding is @code{n+29}, yielding a printable character
-where @code{n >=3} (which is where rle starts to win).  The printable
-characters @samp{$}, @samp{#}, @samp{+} and @samp{-} or with a numeric
-value greater than 126 should not be used.
+@kindex info proc status
+@item info proc status
+General information on the state of the process.  If the process is
+stopped, this report includes the reason for stopping, and any signal
+received.
 
-Some remote systems have used a different run-length encoding mechanism
-loosely refered to as the cisco encoding.  Following the @samp{*}
-character are two hex digits that indicate the size of the packet.
+@item info proc all
+Show all the above information about the process.
+@end ignore
+@end table
 
-So:
-@example
-"@code{0* }"
-@end example
-@noindent
-means the same as "0000".
+@node DJGPP Native
+@subsection Features for Debugging @sc{djgpp} Programs
+@cindex @sc{djgpp} debugging
+@cindex native @sc{djgpp} debugging
+@cindex MS-DOS-specific commands
 
-The error response returned for some packets includes a two character
-error number.  That number is not well defined.
+@sc{djgpp} is the port of @sc{gnu} development tools to MS-DOS and
+MS-Windows.  @sc{djgpp} programs are 32-bit protected-mode programs
+that use the @dfn{DPMI} (DOS Protected-Mode Interface) API to run on
+top of real-mode DOS systems and their emulations.
 
-For any @var{command} not supported by the stub, an empty response
-(@samp{$#00}) should be returned.  That way it is possible to extend the
-protocol.  A newer @value{GDBN} can tell if a packet is supported based
-on that response.
+@value{GDBN} supports native debugging of @sc{djgpp} programs, and
+defines a few commands specific to the @sc{djgpp} port.  This
+subsection describes those commands.
 
-A stub is required to support the @samp{g}, @samp{G}, @samp{m}, @samp{M}, 
-@samp{c}, and @samp{s} @var{command}s.  All other @var{command}s are 
-optional.
+@table @code
+@kindex info dos
+@item info dos
+This is a prefix of @sc{djgpp}-specific commands which print
+information about the target system and important OS structures.
 
-Below is a complete list of all currently defined @var{command}s and
-their corresponding response @var{data}:
-@page
-@multitable @columnfractions .30 .30 .40
-@item Packet
-@tab Request
-@tab Description
-
-@item extended mode
-@tab @code{!}
-@tab
-Enable extended mode.  In extended mode, the remote server is made
-persistent.  The @samp{R} packet is used to restart the program being
-debugged.
-@item
-@tab reply @samp{OK}
-@tab
-The remote target both supports and has enabled extended mode.
+@kindex sysinfo
+@cindex MS-DOS system info
+@cindex free memory information (MS-DOS)
+@item info dos sysinfo
+This command displays assorted information about the underlying
+platform: the CPU type and features, the OS version and flavor, the
+DPMI version, and the available conventional and DPMI memory.
 
-@item last signal
-@tab @code{?}
-@tab
-Indicate the reason the target halted.  The reply is the same as for step
-and continue.
-@item
-@tab reply
-@tab see below
+@cindex GDT
+@cindex LDT
+@cindex IDT
+@cindex segment descriptor tables
+@cindex descriptor tables display
+@item info dos gdt
+@itemx info dos ldt
+@itemx info dos idt
+These 3 commands display entries from, respectively, Global, Local,
+and Interrupt Descriptor Tables (GDT, LDT, and IDT).  The descriptor
+tables are data structures which store a descriptor for each segment
+that is currently in use.  The segment's selector is an index into a
+descriptor table; the table entry for that index holds the
+descriptor's base address and limit, and its attributes and access
+rights.
 
+A typical @sc{djgpp} program uses 3 segments: a code segment, a data
+segment (used for both data and the stack), and a DOS segment (which
+allows access to DOS/BIOS data structures and absolute addresses in
+conventional memory).  However, the DPMI host will usually define
+additional segments in order to support the DPMI environment.
 
-@item reserved
-@tab @code{a}
-@tab Reserved for future use
+@cindex garbled pointers
+These commands allow to display entries from the descriptor tables.
+Without an argument, all entries from the specified table are
+displayed.  An argument, which should be an integer expression, means
+display a single entry whose index is given by the argument.  For
+example, here's a convenient way to display information about the
+debugged program's data segment:
 
-@item set program arguments @strong{(reserved)}
-@tab @code{A}@var{arglen}@code{,}@var{argnum}@code{,}@var{arg}@code{,...}
-@tab
-@item
-@tab
-@tab
-Initialized @samp{argv[]} array passed into program. @var{arglen}
-specifies the number of bytes in the hex encoded byte stream @var{arg}.
-See @file{gdbserver} for more details.
-@item
-@tab reply @code{OK}
-@item
-@tab reply @code{E}@var{NN}
-
-@item set baud @strong{(deprecated)}
-@tab @code{b}@var{baud}
-@tab
-Change the serial line speed to @var{baud}.  JTC: @emph{When does the
-transport layer state change?  When it's received, or after the ACK is
-transmitted.  In either case, there are problems if the command or the
-acknowledgment packet is dropped.} Stan: @emph{If people really wanted
-to add something like this, and get it working for the first time, they
-ought to modify ser-unix.c to send some kind of out-of-band message to a
-specially-setup stub and have the switch happen "in between" packets, so
-that from remote protocol's point of view, nothing actually
-happened.}
-
-@item set breakpoint @strong{(deprecated)}
-@tab @code{B}@var{addr},@var{mode}
-@tab
-Set (@var{mode} is @samp{S}) or clear (@var{mode} is @samp{C}) a
-breakpoint at @var{addr}.  @emph{This has been replaced by the @samp{Z} and
-@samp{z} packets.}
+@smallexample
+@exdent @code{(@value{GDBP}) info dos ldt $ds}
+@exdent @code{0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)}
+@end smallexample
 
-@item continue
-@tab @code{c}@var{addr}
-@tab
-@var{addr} is address to resume. If @var{addr} is omitted, resume at
-current address.
-@item
-@tab reply
-@tab see below
+@noindent
+This comes in handy when you want to see whether a pointer is outside
+the data segment's limit (i.e.@: @dfn{garbled}).
 
-@item continue with signal
-@tab @code{C}@var{sig}@code{;}@var{addr}
-@tab
-Continue with signal @var{sig} (hex signal number).  If
-@code{;}@var{addr} is omitted, resume at same address.
-@item
-@tab reply
-@tab see below
+@cindex page tables display (MS-DOS)
+@item info dos pde
+@itemx info dos pte
+These two commands display entries from, respectively, the Page
+Directory and the Page Tables.  Page Directories and Page Tables are
+data structures which control how virtual memory addresses are mapped
+into physical addresses.  A Page Table includes an entry for every
+page of memory that is mapped into the program's address space; there
+may be several Page Tables, each one holding up to 4096 entries.  A
+Page Directory has up to 4096 entries, one each for every Page Table
+that is currently in use.
 
-@item toggle debug @strong{(deprecated)}
-@tab @code{d}
-@tab
-toggle debug flag.
+Without an argument, @kbd{info dos pde} displays the entire Page
+Directory, and @kbd{info dos pte} displays all the entries in all of
+the Page Tables.  An argument, an integer expression, given to the
+@kbd{info dos pde} command means display only that entry from the Page
+Directory table.  An argument given to the @kbd{info dos pte} command
+means display entries from a single Page Table, the one pointed to by
+the specified entry in the Page Directory.
 
-@item detach
-@tab @code{D}
-@tab
-Detach @value{GDBN} from the remote system.  Sent to the remote target before
-@value{GDBN} disconnects.
-@item
-@tab reply @emph{no response}
-@tab
-@value{GDBN} does not check for any response after sending this packet.
+@cindex direct memory access (DMA) on MS-DOS
+These commands are useful when your program uses @dfn{DMA} (Direct
+Memory Access), which needs physical addresses to program the DMA
+controller.
 
-@item reserved
-@tab @code{e}
-@tab Reserved for future use
+These commands are supported only with some DPMI servers.
 
-@item reserved
-@tab @code{E}
-@tab Reserved for future use
+@cindex physical address from linear address
+@item info dos address-pte @var{addr}
+This command displays the Page Table entry for a specified linear
+address.  The argument linear address @var{addr} should already have the
+appropriate segment's base address added to it, because this command
+accepts addresses which may belong to @emph{any} segment.  For
+example, here's how to display the Page Table entry for the page where
+the variable @code{i} is stored:
 
-@item reserved
-@tab @code{f}
-@tab Reserved for future use
+@smallexample 
+@exdent @code{(@value{GDBP}) info dos address-pte __djgpp_base_address + (char *)&i}
+@exdent @code{Page Table entry for address 0x11a00d30:}
+@exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30} 
+@end smallexample
 
-@item reserved
-@tab @code{F}
-@tab Reserved for future use
+@noindent
+This says that @code{i} is stored at offset @code{0xd30} from the page
+whose physical base address is @code{0x02698000}, and prints all the
+attributes of that page.
 
-@item read registers
-@tab @code{g}
-@tab Read general registers.
-@item
-@tab reply @var{XX...}
-@tab
-Each byte of register data is described by two hex digits.  The bytes
-with the register are transmitted in target byte order.  The size of
-each register and their position within the @samp{g} @var{packet} are
-determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE} and
-@var{REGISTER_NAME} macros.  The specification of several standard
-@code{g} packets is specified below.
-@item
-@tab @code{E}@var{NN}
-@tab for an error.
+Note that you must cast the addresses of variables to a @code{char *},
+since otherwise the value of @code{__djgpp_base_address}, the base
+address of all variables and functions in a @sc{djgpp} program, will
+be added using the rules of C pointer arithmetics: if @code{i} is
+declared an @code{int}, @value{GDBN} will add 4 times the value of
+@code{__djgpp_base_address} to the address of @code{i}.
 
-@item write regs
-@tab @code{G}@var{XX...}
-@tab
-See @samp{g} for a description of the @var{XX...} data.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+Here's another example, it displays the Page Table entry for the
+transfer buffer:
 
-@item reserved
-@tab @code{h}
-@tab Reserved for future use
+@smallexample
+@exdent @code{(@value{GDBP}) info dos address-pte *((unsigned *)&_go32_info_block + 3)}
+@exdent @code{Page Table entry for address 0x29110:}
+@exdent @code{Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110}
+@end smallexample
 
-@item set thread 
-@tab @code{H}@var{c}@var{t...}
-@tab
-Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
-@samp{G}, et.al.).  @var{c} = @samp{c} for thread used in step and
-continue; @var{t...} can be -1 for all threads.  @var{c} = @samp{g} for
-thread used in other operations.  If zero, pick a thread, any thread.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+@noindent
+(The @code{+ 3} offset is because the transfer buffer's address is the
+3rd member of the @code{_go32_info_block} structure.)  The output of
+this command clearly shows that addresses in conventional memory are
+mapped 1:1, i.e.@: the physical and linear addresses are identical.
 
-@c FIXME: JTC:
-@c   'H': How restrictive (or permissive) is the thread model.  If a
-@c        thread is selected and stopped, are other threads allowed
-@c        to continue to execute?  As I mentioned above, I think the
-@c        semantics of each command when a thread is selected must be
-@c        described.  For example:
-@c
-@c        'g':    If the stub supports threads and a specific thread is
-@c                selected, returns the register block from that thread;
-@c                otherwise returns current registers.
-@c
-@c        'G'     If the stub supports threads and a specific thread is
-@c                selected, sets the registers of the register block of
-@c                that thread; otherwise sets current registers.
+This command is supported only with some DPMI servers.
+@end table
 
-@item cycle step @strong{(draft)}
-@tab @code{i}@var{addr}@code{,}@var{nnn}
-@tab
-Step the remote target by a single clock cycle.  If @code{,}@var{nnn} is
-present, cycle step @var{nnn} cycles.  If @var{addr} is present, cycle
-step starting at that address.
+@node Cygwin Native
+@subsection Features for Debugging MS Windows PE executables
+@cindex MS Windows debugging
+@cindex native Cygwin debugging
+@cindex Cygwin-specific commands
 
-@item signal then cycle step @strong{(reserved)}
-@tab @code{I}
-@tab
-See @samp{i} and @samp{S} for likely syntax and semantics.
+@value{GDBN} supports native debugging of MS Windows programs, including
+DLLs with and without symbolic debugging information. There are various
+additional Cygwin-specific commands, described in this subsection.  The
+subsubsection @pxref{Non-debug DLL symbols} describes working with DLLs
+that have no debugging symbols.
 
-@item reserved
-@tab @code{j}
-@tab Reserved for future use
 
-@item reserved
-@tab @code{J}
-@tab Reserved for future use
+@table @code
+@kindex info w32
+@item info w32
+This is a prefix of MS Windows specific commands which print
+information about the target system and important OS structures.
 
-@item kill request
-@tab @code{k}
-@tab
-FIXME: @emph{There is no description of how operate when a specific
-thread context has been selected (ie. does 'k' kill only that thread?)}.
+@item info w32 selector
+This command displays information returned by
+the Win32 API @code{GetThreadSelectorEntry} function.
+It takes an optional argument that is evaluated to
+a long value to give the information about this given selector.
+Without argument, this command displays information
+about the the six segment registers.
+
+@kindex info dll
+@item info dll
+This is a Cygwin specific alias of info shared.
+
+@kindex dll-symbols
+@item dll-symbols
+This command loads symbols from a dll similarly to
+add-sym command but without the need to specify a base address.
+
+@kindex set new-console 
+@item set new-console @var{mode}
+If @var{mode} is @code{on} the debuggee will 
+be started in a new console on next start.
+If @var{mode} is @code{off}i, the debuggee will
+be started in the same console as the debugger.
+
+@kindex show new-console
+@item show new-console
+Displays whether a new console is used
+when the debuggee is started.
+
+@kindex set new-group
+@item set new-group @var{mode}
+This boolean value controls whether the debuggee should
+start a new group or stay in the same group as the debugger.
+This affects the way the Windows OS handles
+Ctrl-C.
+
+@kindex show new-group
+@item show new-group
+Displays current value of new-group boolean.
+
+@kindex set debugevents
+@item set debugevents
+This boolean value adds debug output concerning events seen by the debugger.
+
+@kindex set debugexec
+@item set debugexec
+This boolean value adds debug output concerning execute events 
+seen by the debugger.
+
+@kindex set debugexceptions
+@item set debugexceptions
+This boolean value adds debug ouptut concerning exception events 
+seen by the debugger.
+
+@kindex set debugmemory
+@item set debugmemory
+This boolean value adds debug ouptut concerning memory events 
+seen by the debugger.
+
+@kindex set shell
+@item set shell
+This boolean values specifies whether the debuggee is called
+via a shell or directly (default value is on).
+
+@kindex show shell
+@item show shell
+Displays if the debuggee will be started with a shell.
 
-@item reserved
-@tab @code{l}
-@tab Reserved for future use
+@end table
 
-@item reserved
-@tab @code{L}
-@tab Reserved for future use
+@menu
+* Non-debug DLL symbols::  Support for DLLs without debugging symbols
+@end menu
 
-@item read memory
-@tab @code{m}@var{addr}@code{,}@var{length}
-@tab
-Read @var{length} bytes of memory starting at address @var{addr}.
-Neither @value{GDBN} nor the stub assume that sized memory transfers are assumed
-using word alligned accesses. FIXME: @emph{A word aligned memory
-transfer mechanism is needed.}
-@item
-@tab reply @var{XX...}
-@tab
-@var{XX...} is mem contents. Can be fewer bytes than requested if able
-to read only part of the data.  Neither @value{GDBN} nor the stub assume that
-sized memory transfers are assumed using word alligned accesses. FIXME:
-@emph{A word aligned memory transfer mechanism is needed.}
-@item
-@tab reply @code{E}@var{NN}
-@tab @var{NN} is errno
+@node Non-debug DLL symbols
+@subsubsection Support for DLLs without debugging symbols
+@cindex DLLs with no debugging symbols
+@cindex Minimal symbols and DLLs
+
+Very often on windows, some of the DLLs that your program relies on do
+not include symbolic debugging information (for example,
+@file{kernel32.dll}). When @value{GDBN} doesn't recognize any debugging
+symbols in a DLL, it relies on the minimal amount of symbolic
+information contained in the DLL's export table. This subsubsection
+describes working with such symbols, known internally to @value{GDBN} as
+``minimal symbols''.
+
+Note that before the debugged program has started execution, no DLLs
+will have been loaded. The easiest way around this problem is simply to
+start the program --- either by setting a breakpoint or letting the
+program run once to completion. It is also possible to force
+@value{GDBN} to load a particular DLL before starting the executable ---
+see the shared library information in @pxref{Files} or the
+@code{dll-symbols} command in @pxref{Cygwin Native}. Currently,
+explicitly loading symbols from a DLL with no debugging information will
+cause the symbol names to be duplicated in @value{GDBN}'s lookup table,
+which may adversely affect symbol lookup performance.
+
+@subsubsection DLL name prefixes
+
+In keeping with the naming conventions used by the Microsoft debugging
+tools, DLL export symbols are made available with a prefix based on the
+DLL name, for instance @code{KERNEL32!CreateFileA}.  The plain name is
+also entered into the symbol table, so @code{CreateFileA} is often
+sufficient. In some cases there will be name clashes within a program
+(particularly if the executable itself includes full debugging symbols)
+necessitating the use of the fully qualified name when referring to the
+contents of the DLL. Use single-quotes around the name to avoid the
+exclamation mark (``!'')  being interpreted as a language operator.
+
+Note that the internal name of the DLL may be all upper-case, even
+though the file name of the DLL is lower-case, or vice-versa. Since
+symbols within @value{GDBN} are @emph{case-sensitive} this may cause
+some confusion. If in doubt, try the @code{info functions} and
+@code{info variables} commands or even @code{maint print msymbols} (see
+@pxref{Symbols}). Here's an example:
 
-@item write mem
-@tab @code{M}@var{addr},@var{length}@code{:}@var{XX...}
-@tab
-Write @var{length} bytes of memory starting at address @var{addr}.
-@var{XX...} is the data.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab
-for an error (this includes the case where only part of the data was
-written).
+@smallexample
+(gdb) info function CreateFileA
+All functions matching regular expression "CreateFileA":
 
-@item reserved
-@tab @code{n}
-@tab Reserved for future use
+Non-debugging symbols:
+0x77e885f4  CreateFileA
+0x77e885f4  KERNEL32!CreateFileA
+@end smallexample
 
-@item reserved
-@tab @code{N}
-@tab Reserved for future use
+@smallexample
+(gdb) info function !
+All functions matching regular expression "!":
+
+Non-debugging symbols:
+0x6100114c  cygwin1!__assert
+0x61004034  cygwin1!_dll_crt0@@0
+0x61004240  cygwin1!dll_crt0(per_process *)
+[etc...]
+@end smallexample
 
-@item reserved
-@tab @code{o}
-@tab Reserved for future use
+@subsubsection Working with minimal symbols
 
-@item reserved
-@tab @code{O}
-@tab Reserved for future use
+Symbols extracted from a DLL's export table do not contain very much
+type information. All that @value{GDBN} can do is guess whether a symbol
+refers to a function or variable depending on the linker section that
+contains the symbol. Also note that the actual contents of the memory
+contained in a DLL are not available unless the program is running. This
+means that you cannot examine the contents of a variable or disassemble
+a function within a DLL without a running program.
 
-@item read reg @strong{(reserved)}
-@tab @code{p}@var{n...}
-@tab
-See write register.
-@item
-@tab return @var{r....}
-@tab The hex encoded value of the register in target byte order.
+Variables are generally treated as pointers and dereferenced
+automatically. For this reason, it is often necessary to prefix a
+variable name with the address-of operator (``&'') and provide explicit
+type information in the command. Here's an example of the type of
+problem:
 
-@item write reg
-@tab @code{P}@var{n...}@code{=}@var{r...}
-@tab
-Write register @var{n...} with value @var{r...}, which contains two hex
-digits for each byte in the register (target byte order).
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+@smallexample
+(gdb) print 'cygwin1!__argv'
+$1 = 268572168
+@end smallexample
 
-@item general query
-@tab @code{q}@var{query}
-@tab
-Request info about @var{query}.  In general @value{GDBN} queries
-have a leading upper case letter.  Custom vendor queries should use a
-company prefix (in lower case) ex: @samp{qfsf.var}.  @var{query} may
-optionally be followed by a @samp{,} or @samp{;} separated list.  Stubs
-must ensure that they match the full @var{query} name.
-@item
-@tab reply @code{XX...}
-@tab Hex encoded data from query.  The reply can not be empty.
-@item
-@tab reply @code{E}@var{NN}
-@tab error reply
-@item
-@tab reply @samp{}
-@tab Indicating an unrecognized @var{query}.
+@smallexample
+(gdb) x 'cygwin1!__argv'
+0x10021610:      "\230y\""
+@end smallexample
 
-@item general set
-@tab @code{Q}@var{var}@code{=}@var{val}
-@tab
-Set value of @var{var} to @var{val}.  See @samp{q} for a discussing of
-naming conventions.
+And two possible solutions:
 
-@item reset @strong{(deprecated)}
-@tab @code{r}
-@tab
-Reset the entire system.
+@smallexample
+(gdb) print ((char **)'cygwin1!__argv')[0]
+$2 = 0x22fd98 "/cygdrive/c/mydirectory/myprogram"
+@end smallexample
 
-@item remote restart
-@tab @code{R}@var{XX}
-@tab
-Restart the program being debugged.  @var{XX}, while needed, is ignored.
-This packet is only available in extended mode.
-@item
-@tab
-no reply
-@tab
-The @samp{R} packet has no reply.
+@smallexample
+(gdb) x/2x &'cygwin1!__argv'
+0x610c0aa8 <cygwin1!__argv>:    0x10021608      0x00000000
+(gdb) x/x 0x10021608
+0x10021608:     0x0022fd98
+(gdb) x/s 0x0022fd98
+0x22fd98:        "/cygdrive/c/mydirectory/myprogram"
+@end smallexample
 
-@item step
-@tab @code{s}@var{addr}
-@tab
-@var{addr} is address to resume.  If @var{addr} is omitted, resume at
-same address.
-@item
-@tab reply
-@tab see below
+Setting a break point within a DLL is possible even before the program
+starts execution. However, under these circumstances, @value{GDBN} can't
+examine the initial instructions of the function in order to skip the
+function's frame set-up code. You can work around this by using ``*&''
+to set the breakpoint at a raw memory address:
 
-@item step with signal
-@tab @code{S}@var{sig}@code{;}@var{addr}
-@tab
-Like @samp{C} but step not continue.
-@item
-@tab reply
-@tab see below
+@smallexample
+(gdb) break *&'python22!PyOS_Readline'
+Breakpoint 1 at 0x1e04eff0
+@end smallexample
 
-@item search 
-@tab @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM}
-@tab
-Search backwards starting at address @var{addr} for a match with pattern
-@var{PP} and mask @var{MM}.  @var{PP} and @var{MM} are 4
-bytes.  @var{addr} must be at least 3 digits.
+The author of these extensions is not entirely convinced that setting a
+break point within a shared DLL like @file{kernel32.dll} is completely
+safe.
 
-@item thread alive
-@tab @code{T}@var{XX}
-@tab Find out if the thread XX is alive.
-@item
-@tab reply @code{OK}
-@tab thread is still alive
-@item
-@tab reply @code{E}@var{NN}
-@tab thread is dead
+@node Embedded OS
+@section Embedded Operating Systems
 
-@item reserved
-@tab @code{u}
-@tab Reserved for future use
+This section describes configurations involving the debugging of
+embedded operating systems that are available for several different
+architectures.
 
-@item reserved
-@tab @code{U}
-@tab Reserved for future use
+@menu
+* VxWorks::                     Using @value{GDBN} with VxWorks
+@end menu
 
-@item reserved
-@tab @code{v}
-@tab Reserved for future use
+@value{GDBN} includes the ability to debug programs running on
+various real-time operating systems.
 
-@item reserved
-@tab @code{V}
-@tab Reserved for future use
+@node VxWorks
+@subsection Using @value{GDBN} with VxWorks
 
-@item reserved
-@tab @code{w}
-@tab Reserved for future use
+@cindex VxWorks
 
-@item reserved
-@tab @code{W}
-@tab Reserved for future use
+@table @code
 
-@item reserved
-@tab @code{x}
-@tab Reserved for future use
+@kindex target vxworks
+@item target vxworks @var{machinename}
+A VxWorks system, attached via TCP/IP.  The argument @var{machinename}
+is the target system's machine name or IP address.
 
-@item write mem (binary)
-@tab @code{X}@var{addr}@code{,}@var{length}@var{:}@var{XX...}
-@tab
-@var{addr} is address, @var{length} is number of bytes, @var{XX...} is
-binary data.  The characters @code{$}, @code{#}, and @code{0x7d} are
-escaped using @code{0x7d}.
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
+@end table
 
-@item reserved
-@tab @code{y}
-@tab Reserved for future use
+On VxWorks, @code{load} links @var{filename} dynamically on the
+current target system as well as adding its symbols in @value{GDBN}.
 
-@item reserved
-@tab @code{Y}
-@tab Reserved for future use
+@value{GDBN} enables developers to spawn and debug tasks running on networked
+VxWorks targets from a Unix host.  Already-running tasks spawned from
+the VxWorks shell can also be debugged.  @value{GDBN} uses code that runs on
+both the Unix host and on the VxWorks target.  The program
+@code{@value{GDBP}} is installed and executed on the Unix host.  (It may be
+installed with the name @code{vxgdb}, to distinguish it from a
+@value{GDBN} for debugging programs on the host itself.)
 
-@item remove break or watchpoint @strong{(draft)}
-@tab @code{z}@var{t}@code{,}@var{addr}@code{,}@var{length}
-@tab
-See @samp{Z}.
+@table @code
+@item VxWorks-timeout @var{args}
+@kindex vxworks-timeout
+All VxWorks-based targets now support the option @code{vxworks-timeout}.
+This option is set by the user, and  @var{args} represents the number of
+seconds @value{GDBN} waits for responses to rpc's.  You might use this if
+your VxWorks target is a slow software simulator or is on the far side
+of a thin network line.
+@end table
 
-@item insert break or watchpoint @strong{(draft)}
-@tab @code{Z}@var{t}@code{,}@var{addr}@code{,}@var{length}
-@tab
-@var{t} is type: @samp{0} - software breakpoint, @samp{1} - hardware
-breakpoint, @samp{2} - write watchpoint, @samp{3} - read watchpoint,
-@samp{4} - access watchpoint; @var{addr} is address; @var{length} is in
-bytes.  For a software breakpoint, @var{length} specifies the size of
-the instruction to be patched.  For hardware breakpoints and watchpoints
-@var{length} specifies the memory region to be monitored.  To avoid
-potential problems with duplicate packets, the operations should be
-implemented in an idempotent way.
-@item
-@tab reply @code{E}@var{NN}
-@tab for an error
-@item
-@tab reply @code{OK}
-@tab for success
-@item
-@tab @samp{}
-@tab If not supported.
+The following information on connecting to VxWorks was current when
+this manual was produced; newer releases of VxWorks may use revised
+procedures.
 
-@item reserved
-@tab <other>
-@tab Reserved for future use
-
-@end multitable
+@kindex INCLUDE_RDB
+To use @value{GDBN} with VxWorks, you must rebuild your VxWorks kernel
+to include the remote debugging interface routines in the VxWorks
+library @file{rdb.a}.  To do this, define @code{INCLUDE_RDB} in the
+VxWorks configuration file @file{configAll.h} and rebuild your VxWorks
+kernel.  The resulting kernel contains @file{rdb.a}, and spawns the
+source debugging task @code{tRdbTask} when VxWorks is booted.  For more
+information on configuring and remaking VxWorks, see the manufacturer's
+manual.
+@c VxWorks, see the @cite{VxWorks Programmer's Guide}.
 
-The @samp{C}, @samp{c}, @samp{S}, @samp{s} and @samp{?} packets can
-receive any of the below as a reply.  In the case of the @samp{C},
-@samp{c}, @samp{S} and @samp{s} packets, that reply is only returned
-when the target halts.  In the below the exact meaning of @samp{signal
-number} is poorly defined.  In general one of the UNIX signal numbering
-conventions is used.
+Once you have included @file{rdb.a} in your VxWorks system image and set
+your Unix execution search path to find @value{GDBN}, you are ready to
+run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}} (or
+@code{vxgdb}, depending on your installation).
 
-@multitable @columnfractions .4 .6
+@value{GDBN} comes up showing the prompt:
 
-@item @code{S}@var{AA}
-@tab @var{AA} is the signal number
+@smallexample
+(vxgdb)
+@end smallexample
 
-@item @code{T}@var{AA}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}
-@tab
-@var{AA} = two hex digit signal number; @var{n...} = register number
-(hex), @var{r...}  = target byte ordered register contents, size defined
-by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
-thread process ID, this is a hex integer; @var{n...} = other string not
-starting with valid hex digit.  @value{GDBN} should ignore this
-@var{n...}, @var{r...} pair and go on to the next.  This way we can
-extend the protocol.
+@menu
+* VxWorks Connection::          Connecting to VxWorks
+* VxWorks Download::            VxWorks download
+* VxWorks Attach::              Running tasks
+@end menu
 
-@item @code{W}@var{AA}
-@tab
-The process exited, and @var{AA} is the exit status.  This is only
-applicable for certains sorts of targets.
+@node VxWorks Connection
+@subsubsection Connecting to VxWorks
 
-@item @code{X}@var{AA}
-@tab
-The process terminated with signal @var{AA}.
+The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the
+network.  To connect to a target whose host name is ``@code{tt}'', type:
 
-@item @code{N}@var{AA}@code{;}@var{t...}@code{;}@var{d...}@code{;}@var{b...} @strong{(obsolete)}
-@tab
-@var{AA} = signal number; @var{t...} = address of symbol "_start";
-@var{d...} = base of data section; @var{b...} = base of bss section.
-@emph{Note: only used by Cisco Systems targets.  The difference between
-this reply and the "qOffsets" query is that the 'N' packet may arrive
-spontaneously whereas the 'qOffsets' is a query initiated by the host
-debugger.}
-
-@item @code{O}@var{XX...}
-@tab
-@var{XX...} is hex encoding of @sc{ascii} data.  This can happen at any time
-while the program is running and the debugger should continue to wait
-for 'W', 'T', etc.
+@smallexample
+(vxgdb) target vxworks tt
+@end smallexample
 
-@end multitable
+@need 750
+@value{GDBN} displays messages like these:
 
-The following set and query packets have already been defined.
+@smallexample
+Attaching remote machine across net...
+Connected to tt.
+@end smallexample
 
-@multitable @columnfractions .2 .2 .6
+@need 1000
+@value{GDBN} then attempts to read the symbol tables of any object modules
+loaded into the VxWorks target since it was last booted.  @value{GDBN} locates
+these files by searching the directories listed in the command search
+path (@pxref{Environment, ,Your program's environment}); if it fails
+to find an object file, it displays a message such as:
 
-@item current thread
-@tab @code{q}@code{C}
-@tab Return the current thread id.
-@item
-@tab reply @code{QC}@var{pid}
-@tab
-Where @var{pid} is a HEX encoded 16 bit process id.
-@item
-@tab reply *
-@tab Any other reply implies the old pid.
+@smallexample
+prog.o: No such file or directory.
+@end smallexample
 
-@item all thread ids
-@tab @code{q}@code{fThreadInfo}
-@item
-@tab @code{q}@code{sThreadInfo}
-@tab
-Obtain a list of active thread ids from the target (OS).  Since there
-may be too many active threads to fit into one reply packet, this query
-works iteratively: it may require more than one query/reply sequence to
-obtain the entire list of threads.  The first query of the sequence will
-be the @code{qf}@code{ThreadInfo} query; subsequent queries in the
-sequence will be the @code{qs}@code{ThreadInfo} query.
-@item
-@tab
-@tab NOTE: replaces the @code{qL} query (see below).
-@item
-@tab reply @code{m}@var{<id>}
-@tab A single thread id
-@item
-@tab reply @code{m}@var{<id>},@var{<id>...}
-@tab a comma-separated list of thread ids
-@item
-@tab reply @code{l}
-@tab (lower case 'el') denotes end of list.
-@item
-@tab
-@tab
-In response to each query, the target will reply with a list of one
-or more thread ids, in big-endian hex, separated by commas.  GDB will
-respond to each reply with a request for more thread ids (using the
-@code{qs} form of the query), until the target responds with @code{l}
-(lower-case el, for @code{'last'}).
+When this happens, add the appropriate directory to the search path with
+the @value{GDBN} command @code{path}, and execute the @code{target}
+command again.
 
-@item extra thread info
-@tab @code{q}@code{ThreadExtraInfo}@code{,}@var{id}
-@tab
-@item
-@tab
-@tab
-Where @var{<id>} is a thread-id in big-endian hex.
-Obtain a printable string description of a thread's attributes from
-the target OS.  This string may contain anything that the target OS
-thinks is interesting for @value{GDBN} to tell the user about the thread.
-The string is displayed in @value{GDBN}'s @samp{info threads} display.
-Some examples of possible thread extra info strings are "Runnable", or
-"Blocked on Mutex".
-@item
-@tab reply @var{XX...}
-@tab
-Where @var{XX...} is a hex encoding of @sc{ascii} data, comprising the
-printable string containing the extra information about the thread's
-attributes.
+@node VxWorks Download
+@subsubsection VxWorks download
 
-@item query @var{LIST} or @var{threadLIST} @strong{(deprecated)}
-@tab @code{q}@code{L}@var{startflag}@var{threadcount}@var{nextthread}
-@tab
-@item
-@tab
-@tab
-Obtain thread information from RTOS.  Where: @var{startflag} (one hex
-digit) is one to indicate the first query and zero to indicate a
-subsequent query; @var{threadcount} (two hex digits) is the maximum
-number of threads the response packet can contain; and @var{nextthread}
-(eight hex digits), for subsequent queries (@var{startflag} is zero), is
-returned in the response as @var{argthread}.
-@item
-@tab
-@tab NOTE: this query is replaced by the @code{q}@code{fThreadInfo}
-query (see above).
-@item
-@tab reply @code{q}@code{M}@var{count}@var{done}@var{argthread}@var{thread...}
-@tab
-@item
-@tab
-@tab
-Where: @var{count} (two hex digits) is the number of threads being
-returned; @var{done} (one hex digit) is zero to indicate more threads
-and one indicates no further threads; @var{argthreadid} (eight hex
-digits) is @var{nextthread} from the request packet; @var{thread...} is
-a sequence of thread IDs from the target.  @var{threadid} (eight hex
-digits).  See @code{remote.c:parse_threadlist_response()}.
+@cindex download to VxWorks
+If you have connected to the VxWorks target and you want to debug an
+object that has not yet been loaded, you can use the @value{GDBN}
+@code{load} command to download a file from Unix to VxWorks
+incrementally.  The object file given as an argument to the @code{load}
+command is actually opened twice: first by the VxWorks target in order
+to download the code, then by @value{GDBN} in order to read the symbol
+table.  This can lead to problems if the current working directories on
+the two systems differ.  If both systems have NFS mounted the same
+filesystems, you can avoid these problems by using absolute paths.
+Otherwise, it is simplest to set the working directory on both systems
+to the directory in which the object file resides, and then to reference
+the file by its name, without any path.  For instance, a program
+@file{prog.o} may reside in @file{@var{vxpath}/vw/demo/rdb} in VxWorks
+and in @file{@var{hostpath}/vw/demo/rdb} on the host.  To load this
+program, type this on VxWorks:
 
-@item compute CRC of memory block
-@tab @code{q}@code{CRC:}@var{addr}@code{,}@var{length}
-@tab
-@item
-@tab reply @code{E}@var{NN}
-@tab An error (such as memory fault)
-@item
-@tab reply @code{C}@var{CRC32}
-@tab A 32 bit cyclic redundancy check of the specified memory region.
+@smallexample
+-> cd "@var{vxpath}/vw/demo/rdb"
+@end smallexample
 
-@item query sect offs
-@tab @code{q}@code{Offsets}
-@tab
-Get section offsets that the target used when re-locating the downloaded
-image.  @emph{Note: while a @code{Bss} offset is included in the
-response, @value{GDBN} ignores this and instead applies the @code{Data}
-offset to the @code{Bss} section.}
-@item
-@tab reply @code{Text=}@var{xxx}@code{;Data=}@var{yyy}@code{;Bss=}@var{zzz}
+@noindent
+Then, in @value{GDBN}, type:
 
-@item thread info request
-@tab @code{q}@code{P}@var{mode}@var{threadid}
-@tab
-@item
-@tab
-@tab
-Returns information on @var{threadid}.  Where: @var{mode} is a hex
-encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
-@item
-@tab reply *
-@tab
-See @code{remote.c:remote_unpack_thread_info_response()}.
+@smallexample
+(vxgdb) cd @var{hostpath}/vw/demo/rdb
+(vxgdb) load prog.o
+@end smallexample
 
-@item remote command
-@tab @code{q}@code{Rcmd,}@var{COMMAND}
-@tab
-@item
-@tab
-@tab
-@var{COMMAND} (hex encoded) is passed to the local interpreter for
-execution.  Invalid commands should be reported using the output string.
-Before the final result packet, the target may also respond with a
-number of intermediate @code{O}@var{OUTPUT} console output
-packets.  @emph{Implementors should note that providing access to a
-stubs's interpreter may have security implications}.
-@item
-@tab reply @code{OK}
-@tab
-A command response with no output.
-@item
-@tab reply @var{OUTPUT}
-@tab
-A command response with the hex encoded output string @var{OUTPUT}.
-@item
-@tab reply @code{E}@var{NN}
-@tab
-Indicate a badly formed request.
+@value{GDBN} displays a response similar to this:
 
-@item
-@tab reply @samp{}
-@tab
-When @samp{q}@samp{Rcmd} is not recognized.
+@smallexample
+Reading symbol data from wherever/vw/demo/rdb/prog.o... done.
+@end smallexample
 
-@item symbol lookup
-@tab @code{qSymbol::}
-@tab
-Notify the target that @value{GDBN} is prepared to serve symbol lookup
-requests.  Accept requests from the target for the values of symbols.
-@item
-@tab
-@tab
-@item
-@tab reply @code{OK}
-@tab
-The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-@sp 2
-@noindent
-The target requests the value of symbol @var{sym_name} (hex encoded).  
-@value{GDBN} may provide the value by using the 
-@code{qSymbol:}@var{sym_value}:@var{sym_name}
-message, described below.
+You can also use the @code{load} command to reload an object module
+after editing and recompiling the corresponding source file.  Note that
+this makes @value{GDBN} delete all currently-defined breakpoints,
+auto-displays, and convenience variables, and to clear the value
+history.  (This is necessary in order to preserve the integrity of
+debugger's data structures that reference the target system's symbol
+table.)
 
-@item symbol value
-@tab @code{qSymbol:}@var{sym_value}:@var{sym_name}
-@tab
-@sp 1
-@noindent
-Set the value of SYM_NAME to SYM_VALUE.
-@item
-@tab
-@tab
-@var{sym_name} (hex encoded) is the name of a symbol whose value
-the target has previously requested.
-@item
-@tab
-@tab
-@var{sym_value} (hex) is the value for symbol @var{sym_name}.
-If @value{GDBN} cannot supply a value for @var{sym_name}, then this
-field will be empty.
-@item
-@tab reply @code{OK}
-@tab
-The target does not need to look up any (more) symbols.
-@item
-@tab reply @code{qSymbol:}@var{sym_name}
-@tab
-@sp 2
-@noindent
-The target requests the value of a new symbol @var{sym_name} (hex encoded).
-@value{GDBN} will continue to supply the values of symbols (if available),
-until the target ceases to request them.
+@node VxWorks Attach
+@subsubsection Running tasks
 
-@end multitable
+@cindex running VxWorks tasks
+You can also attach to an existing task using the @code{attach} command as
+follows:
 
-The following @samp{g}/@samp{G} packets have previously been defined.
-In the below, some thirty-two bit registers are transferred as sixty-four
-bits.  Those registers should be zero/sign extended (which?) to fill the
-space allocated.  Register bytes are transfered in target byte order.
-The two nibbles within a register byte are transfered most-significant -
-least-significant.
+@smallexample
+(vxgdb) attach @var{task}
+@end smallexample
 
-@multitable @columnfractions .5 .5
+@noindent
+where @var{task} is the VxWorks hexadecimal task ID.  The task can be running
+or suspended when you attach to it.  Running tasks are suspended at
+the time of attachment.
 
-@item MIPS32
-@tab
-All registers are transfered as thirty-two bit quantities in the order:
-32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point
-registers; fsr; fir; fp.
+@node Embedded Processors
+@section Embedded Processors
 
-@item MIPS64
-@tab
-All registers are transfered as sixty-four bit quantities (including
-thirty-two bit registers such as @code{sr}).  The ordering is the same
-as @code{MIPS32}.
+This section goes into details specific to particular embedded
+configurations.
 
-@end multitable
 
-Example sequence of a target being re-started.  Notice how the restart
-does not get any direct output:
+@menu
+* ARM::                         ARM
+* H8/300::                      Hitachi H8/300
+* H8/500::                      Hitachi H8/500
+* M32R/D::                      Mitsubishi M32R/D
+* M68K::                        Motorola M68K
+* MIPS Embedded::               MIPS Embedded
+* OpenRISC 1000::               OpenRisc 1000
+* PA::                          HP PA Embedded
+* PowerPC:                      PowerPC
+* SH::                          Hitachi SH
+* Sparclet::                    Tsqware Sparclet
+* Sparclite::                   Fujitsu Sparclite
+* ST2000::                      Tandem ST2000
+* Z8000::                       Zilog Z8000
+@end menu
 
-@example
-<- @code{R00}
--> @code{+}
-@emph{target restarts}
-<- @code{?}
--> @code{+}
--> @code{T001:1234123412341234}
-<- @code{+}
-@end example
+@node ARM
+@subsection ARM
 
-Example sequence of a target being stepped by a single instruction:
+@table @code
 
-@example
-<- @code{G1445...}
--> @code{+}
-<- @code{s}
--> @code{+}
-@emph{time passes}
--> @code{T001:1234123412341234}
-<- @code{+}
-<- @code{g}
--> @code{+}
--> @code{1455...}
-<- @code{+}
-@end example
+@kindex target rdi
+@item target rdi @var{dev}
+ARM Angel monitor, via RDI library interface to ADP protocol.  You may
+use this target to communicate with both boards running the Angel
+monitor, or with the EmbeddedICE JTAG debug device.
 
+@kindex target rdp
+@item target rdp @var{dev}
+ARM Demon monitor.
 
-@node Configurations
-@chapter Configuration-Specific Information
+@end table
 
-While nearly all @value{GDBN} commands are available for all native and
-cross versions of the debugger, there are some exceptions.  This chapter
-describes things that are only available in certain configurations.
+@node H8/300
+@subsection Hitachi H8/300
 
-There are three major categories of configurations: native
-configurations, where the host and target are the same, embedded
-operating system configurations, which are usually the same for several
-different processor architectures, and bare embedded processors, which
-are quite different from each other.
+@table @code
 
-@menu
-* Native::
-* Embedded OS::
-* Embedded Processors::
-* Architectures::
+@kindex target hms@r{, with H8/300}
+@item target hms @var{dev}
+A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
+Use special commands @code{device} and @code{speed} to control the serial
+line and the communications speed used.
+
+@kindex target e7000@r{, with H8/300}
+@item target e7000 @var{dev}
+E7000 emulator for Hitachi H8 and SH.
+
+@kindex target sh3@r{, with H8/300}
+@kindex target sh3e@r{, with H8/300}
+@item target sh3 @var{dev}
+@itemx target sh3e @var{dev}
+Hitachi SH-3 and SH-3E target systems.
+
+@end table
+
+@cindex download to H8/300 or H8/500
+@cindex H8/300 or H8/500 download
+@cindex download to Hitachi SH
+@cindex Hitachi SH download
+When you select remote debugging to a Hitachi SH, H8/300, or H8/500
+board, the @code{load} command downloads your program to the Hitachi
+board and also opens it as the current executable target for
+@value{GDBN} on your host (like the @code{file} command).
+
+@value{GDBN} needs to know these things to talk to your
+Hitachi SH, H8/300, or H8/500:
+
+@enumerate
+@item
+that you want to use @samp{target hms}, the remote debugging interface
+for Hitachi microprocessors, or @samp{target e7000}, the in-circuit
+emulator for the Hitachi SH and the Hitachi 300H.  (@samp{target hms} is
+the default when @value{GDBN} is configured specifically for the Hitachi SH,
+H8/300, or H8/500.)
+
+@item
+what serial device connects your host to your Hitachi board (the first
+serial device available on your host is the default).
+
+@item
+what speed to use over the serial device.
+@end enumerate
+
+@menu
+* Hitachi Boards::      Connecting to Hitachi boards.
+* Hitachi ICE::         Using the E7000 In-Circuit Emulator.
+* Hitachi Special::     Special @value{GDBN} commands for Hitachi micros.
 @end menu
 
-@node Native
-@section Native
+@node Hitachi Boards
+@subsubsection Connecting to Hitachi boards
+
+@c only for Unix hosts
+@kindex device
+@cindex serial device, Hitachi micros
+Use the special @code{@value{GDBN}} command @samp{device @var{port}} if you
+need to explicitly set the serial device.  The default @var{port} is the
+first available port on your host.  This is only necessary on Unix
+hosts, where it is typically something like @file{/dev/ttya}.
+
+@kindex speed
+@cindex serial line speed, Hitachi micros
+@code{@value{GDBN}} has another special command to set the communications
+speed: @samp{speed @var{bps}}.  This command also is only used from Unix
+hosts; on DOS hosts, set the line speed as usual from outside @value{GDBN} with
+the DOS @code{mode} command (for instance,
+@w{@kbd{mode com2:9600,n,8,1,p}} for a 9600@dmn{bps} connection).
+
+The @samp{device} and @samp{speed} commands are available only when you
+use a Unix host to debug your Hitachi microprocessor programs.  If you
+use a DOS host,
+@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
+called @code{asynctsr} to communicate with the development board
+through a PC serial port.  You must also use the DOS @code{mode} command
+to set up the serial port on the DOS side.
+
+The following sample session illustrates the steps needed to start a
+program under @value{GDBN} control on an H8/300.  The example uses a
+sample H8/300 program called @file{t.x}.  The procedure is the same for
+the Hitachi SH and the H8/500.
+
+First hook up your development board.  In this example, we use a
+board attached to serial port @code{COM2}; if you use a different serial
+port, substitute its name in the argument of the @code{mode} command.
+When you call @code{asynctsr}, the auxiliary comms program used by the
+debugger, you give it just the numeric part of the serial port's name;
+for example, @samp{asyncstr 2} below runs @code{asyncstr} on
+@code{COM2}.
+
+@smallexample
+C:\H8300\TEST> asynctsr 2
+C:\H8300\TEST> mode com2:9600,n,8,1,p
+
+Resident portion of MODE loaded
+
+COM2: 9600, n, 8, 1, p
+
+@end smallexample
+
+@quotation
+@emph{Warning:} We have noticed a bug in PC-NFS that conflicts with
+@code{asynctsr}.  If you also run PC-NFS on your DOS host, you may need to
+disable it, or even boot without it, to use @code{asynctsr} to control
+your development board.
+@end quotation
+
+@kindex target hms@r{, and serial protocol}
+Now that serial communications are set up, and the development board is
+connected, you can start up @value{GDBN}.  Call @code{@value{GDBP}} with
+the name of your program as the argument.  @code{@value{GDBN}} prompts
+you, as usual, with the prompt @samp{(@value{GDBP})}.  Use two special
+commands to begin your debugging session: @samp{target hms} to specify
+cross-debugging to the Hitachi board, and the @code{load} command to
+download your program to the board.  @code{load} displays the names of
+the program's sections, and a @samp{*} for each 2K of data downloaded.
+(If you want to refresh @value{GDBN} data on symbols or on the
+executable file without downloading, use the @value{GDBN} commands
+@code{file} or @code{symbol-file}.  These commands, and @code{load}
+itself, are described in @ref{Files,,Commands to specify files}.)
+
+@smallexample
+(eg-C:\H8300\TEST) @value{GDBP} t.x
+@value{GDBN} is free software and you are welcome to distribute copies
+ of it under certain conditions; type "show copying" to see
+ the conditions.
+There is absolutely no warranty for @value{GDBN}; type "show warranty"
+for details.
+@value{GDBN} @value{GDBVN}, Copyright 1992 Free Software Foundation, Inc...
+(@value{GDBP}) target hms
+Connected to remote H8/300 HMS system.
+(@value{GDBP}) load t.x
+.text   : 0x8000 .. 0xabde ***********
+.data   : 0xabde .. 0xad30 *
+.stack  : 0xf000 .. 0xf014 *
+@end smallexample
+
+At this point, you're ready to run or debug your program.  From here on,
+you can use all the usual @value{GDBN} commands.  The @code{break} command
+sets breakpoints; the @code{run} command starts your program;
+@code{print} or @code{x} display data; the @code{continue} command
+resumes execution after stopping at a breakpoint.  You can use the
+@code{help} command at any time to find out more about @value{GDBN} commands.
+
+Remember, however, that @emph{operating system} facilities aren't
+available on your development board; for example, if your program hangs,
+you can't send an interrupt---but you can press the @sc{reset} switch!
+
+Use the @sc{reset} button on the development board
+@itemize @bullet
+@item
+to interrupt your program (don't use @kbd{ctl-C} on the DOS host---it has
+no way to pass an interrupt signal to the development board); and
+
+@item
+to return to the @value{GDBN} command prompt after your program finishes
+normally.  The communications protocol provides no other way for @value{GDBN}
+to detect program completion.
+@end itemize
+
+In either case, @value{GDBN} sees the effect of a @sc{reset} on the
+development board as a ``normal exit'' of your program.
+
+@node Hitachi ICE
+@subsubsection Using the E7000 in-circuit emulator
+
+@kindex target e7000@r{, with Hitachi ICE}
+You can use the E7000 in-circuit emulator to develop code for either the
+Hitachi SH or the H8/300H.  Use one of these forms of the @samp{target
+e7000} command to connect @value{GDBN} to your E7000:
+
+@table @code
+@item target e7000 @var{port} @var{speed}
+Use this form if your E7000 is connected to a serial port.  The
+@var{port} argument identifies what serial port to use (for example,
+@samp{com2}).  The third argument is the line speed in bits per second
+(for example, @samp{9600}).
+
+@item target e7000 @var{hostname}
+If your E7000 is installed as a host on a TCP/IP network, you can just
+specify its hostname; @value{GDBN} uses @code{telnet} to connect.
+@end table
+
+@node Hitachi Special
+@subsubsection Special @value{GDBN} commands for Hitachi micros
+
+Some @value{GDBN} commands are available only for the H8/300:
+
+@table @code
+
+@kindex set machine
+@kindex show machine
+@item set machine h8300
+@itemx set machine h8300h
+Condition @value{GDBN} for one of the two variants of the H8/300
+architecture with @samp{set machine}.  You can use @samp{show machine}
+to check which variant is currently in effect.
+
+@end table
+
+@node H8/500
+@subsection H8/500
+
+@table @code
+
+@kindex set memory @var{mod}
+@cindex memory models, H8/500
+@item set memory @var{mod}
+@itemx show memory
+Specify which H8/500 memory model (@var{mod}) you are using with
+@samp{set memory}; check which memory model is in effect with @samp{show
+memory}.  The accepted values for @var{mod} are @code{small},
+@code{big}, @code{medium}, and @code{compact}.
+
+@end table
+
+@node M32R/D
+@subsection Mitsubishi M32R/D
+
+@table @code
+
+@kindex target m32r
+@item target m32r @var{dev}
+Mitsubishi M32R/D ROM monitor.
+
+@end table
+
+@node M68K
+@subsection M68k
+
+The Motorola m68k configuration includes ColdFire support, and
+target command for the following ROM monitors.
+
+@table @code
+
+@kindex target abug
+@item target abug @var{dev}
+ABug ROM monitor for M68K.
+
+@kindex target cpu32bug
+@item target cpu32bug @var{dev}
+CPU32BUG monitor, running on a CPU32 (M68K) board.
+
+@kindex target dbug
+@item target dbug @var{dev}
+dBUG ROM monitor for Motorola ColdFire.
+
+@kindex target est
+@item target est @var{dev}
+EST-300 ICE monitor, running on a CPU32 (M68K) board.
+
+@kindex target rom68k
+@item target rom68k @var{dev}
+ROM 68K monitor, running on an M68K IDP board.
+
+@end table
+
+@table @code
+
+@kindex target rombug
+@item target rombug @var{dev}
+ROMBUG ROM monitor for OS/9000.
+
+@end table
+
+@node MIPS Embedded
+@subsection MIPS Embedded
+
+@cindex MIPS boards
+@value{GDBN} can use the MIPS remote debugging protocol to talk to a
+MIPS board attached to a serial line.  This is available when
+you configure @value{GDBN} with @samp{--target=mips-idt-ecoff}.
+
+@need 1000
+Use these @value{GDBN} commands to specify the connection to your target board:
+
+@table @code
+@item target mips @var{port}
+@kindex target mips @var{port}
+To run a program on the board, start up @code{@value{GDBP}} with the
+name of your program as the argument.  To connect to the board, use the
+command @samp{target mips @var{port}}, where @var{port} is the name of
+the serial port connected to the board.  If the program has not already
+been downloaded to the board, you may use the @code{load} command to
+download it.  You can then use all the usual @value{GDBN} commands.
+
+For example, this sequence connects to the target board through a serial
+port, and loads and runs a program called @var{prog} through the
+debugger:
+
+@smallexample
+host$ @value{GDBP} @var{prog}
+@value{GDBN} is free software and @dots{}
+(@value{GDBP}) target mips /dev/ttyb
+(@value{GDBP}) load @var{prog}
+(@value{GDBP}) run
+@end smallexample
+
+@item target mips @var{hostname}:@var{portnumber}
+On some @value{GDBN} host configurations, you can specify a TCP
+connection (for instance, to a serial line managed by a terminal
+concentrator) instead of a serial port, using the syntax
+@samp{@var{hostname}:@var{portnumber}}.
+
+@item target pmon @var{port}
+@kindex target pmon @var{port}
+PMON ROM monitor.
+
+@item target ddb @var{port}
+@kindex target ddb @var{port}
+NEC's DDB variant of PMON for Vr4300.
+
+@item target lsi @var{port}
+@kindex target lsi @var{port}
+LSI variant of PMON.
+
+@kindex target r3900
+@item target r3900 @var{dev}
+Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
+
+@kindex target array
+@item target array @var{dev}
+Array Tech LSI33K RAID controller board.
+
+@end table
+
+
+@noindent
+@value{GDBN} also supports these special commands for MIPS targets:
+
+@table @code
+@item set processor @var{args}
+@itemx show processor
+@kindex set processor @var{args}
+@kindex show processor
+Use the @code{set processor} command to set the type of MIPS
+processor when you want to access processor-type-specific registers.
+For example, @code{set processor @var{r3041}} tells @value{GDBN}
+to use the CPU registers appropriate for the 3041 chip.
+Use the @code{show processor} command to see what MIPS processor @value{GDBN}
+is using.  Use the @code{info reg} command to see what registers
+@value{GDBN} is using.
+
+@item set mipsfpu double
+@itemx set mipsfpu single
+@itemx set mipsfpu none
+@itemx show mipsfpu
+@kindex set mipsfpu
+@kindex show mipsfpu
+@cindex MIPS remote floating point
+@cindex floating point, MIPS remote
+If your target board does not support the MIPS floating point
+coprocessor, you should use the command @samp{set mipsfpu none} (if you
+need this, you may wish to put the command in your @value{GDBN} init
+file).  This tells @value{GDBN} how to find the return value of
+functions which return floating point values.  It also allows
+@value{GDBN} to avoid saving the floating point registers when calling
+functions on the board.  If you are using a floating point coprocessor
+with only single precision floating point support, as on the @sc{r4650}
+processor, use the command @samp{set mipsfpu single}.  The default
+double precision floating point coprocessor may be selected using
+@samp{set mipsfpu double}.
+
+In previous versions the only choices were double precision or no
+floating point, so @samp{set mipsfpu on} will select double precision
+and @samp{set mipsfpu off} will select no floating point.
+
+As usual, you can inquire about the @code{mipsfpu} variable with
+@samp{show mipsfpu}.
+
+@item set remotedebug @var{n}
+@itemx show remotedebug
+@kindex set remotedebug@r{, MIPS protocol}
+@kindex show remotedebug@r{, MIPS protocol}
+@cindex @code{remotedebug}, MIPS protocol
+@cindex MIPS @code{remotedebug} protocol
+@c FIXME! For this to be useful, you must know something about the MIPS
+@c FIXME...protocol.  Where is it described?
+You can see some debugging information about communications with the board
+by setting the @code{remotedebug} variable.  If you set it to @code{1} using
+@samp{set remotedebug 1}, every packet is displayed.  If you set it
+to @code{2}, every character is displayed.  You can check the current value
+at any time with the command @samp{show remotedebug}.
+
+@item set timeout @var{seconds}
+@itemx set retransmit-timeout @var{seconds}
+@itemx show timeout
+@itemx show retransmit-timeout
+@cindex @code{timeout}, MIPS protocol
+@cindex @code{retransmit-timeout}, MIPS protocol
+@kindex set timeout
+@kindex show timeout
+@kindex set retransmit-timeout
+@kindex show retransmit-timeout
+You can control the timeout used while waiting for a packet, in the MIPS
+remote protocol, with the @code{set timeout @var{seconds}} command.  The
+default is 5 seconds.  Similarly, you can control the timeout used while
+waiting for an acknowledgement of a packet with the @code{set
+retransmit-timeout @var{seconds}} command.  The default is 3 seconds.
+You can inspect both values with @code{show timeout} and @code{show
+retransmit-timeout}.  (These commands are @emph{only} available when
+@value{GDBN} is configured for @samp{--target=mips-idt-ecoff}.)
+
+The timeout set by @code{set timeout} does not apply when @value{GDBN}
+is waiting for your program to stop.  In that case, @value{GDBN} waits
+forever because it has no way of knowing how long the program is going
+to run before stopping.
+@end table
+
+@node OpenRISC 1000
+@subsection OpenRISC 1000
+@cindex OpenRISC 1000
+
+@cindex or1k boards
+See OR1k Architecture document (@uref{www.opencores.org}) for more information
+about platform and commands.
+
+@table @code
+
+@kindex target jtag
+@item target jtag jtag://@var{host}:@var{port}
+
+Connects to remote JTAG server.
+JTAG remote server can be either an or1ksim or JTAG server,
+connected via parallel port to the board.
+
+Example: @code{target jtag jtag://localhost:9999}
+
+@kindex or1ksim
+@item or1ksim @var{command}
+If connected to @code{or1ksim} OpenRISC 1000 Architectural
+Simulator, proprietary commands can be executed.
+
+@kindex info or1k spr
+@item info or1k spr
+Displays spr groups.
+
+@item info or1k spr @var{group}
+@itemx info or1k spr @var{groupno}
+Displays register names in selected group.
+
+@item info or1k spr @var{group} @var{register}
+@itemx info or1k spr @var{register}
+@itemx info or1k spr @var{groupno} @var{registerno}
+@itemx info or1k spr @var{registerno}
+Shows information about specified spr register.
+
+@kindex spr
+@item spr @var{group} @var{register} @var{value}
+@itemx spr @var{register @var{value}}
+@itemx spr @var{groupno} @var{registerno @var{value}}
+@itemx spr @var{registerno @var{value}}
+Writes @var{value} to specified spr register.
+@end table
+
+Some implementations of OpenRISC 1000 Architecture also have hardware trace.
+It is very similar to @value{GDBN} trace, except it does not interfere with normal
+program execution and is thus much faster.  Hardware breakpoints/watchpoint
+triggers can be set using:
+@table @code
+@item $LEA/$LDATA
+Load effective address/data
+@item $SEA/$SDATA
+Store effective address/data
+@item $AEA/$ADATA
+Access effective address ($SEA or $LEA) or data ($SDATA/$LDATA)
+@item $FETCH
+Fetch data
+@end table
+
+When triggered, it can capture low level data, like: @code{PC}, @code{LSEA},
+@code{LDATA}, @code{SDATA}, @code{READSPR}, @code{WRITESPR}, @code{INSTR}.
+
+@code{htrace} commands:
+@cindex OpenRISC 1000 htrace
+@table @code
+@kindex hwatch
+@item hwatch @var{conditional}
+Set hardware watchpoint on combination of Load/Store Effecive Address(es)
+or Data.  For example:
+
+@code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)}
+
+@code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)}
+
+@kindex htrace info
+@item htrace info
+Display information about current HW trace configuration.
+
+@kindex htrace trigger
+@item htrace trigger @var{conditional}
+Set starting criteria for HW trace.
+
+@kindex htrace qualifier
+@item htrace qualifier @var{conditional}
+Set acquisition qualifier for HW trace.
+
+@kindex htrace stop
+@item htrace stop @var{conditional}
+Set HW trace stopping criteria.
+
+@kindex htrace record
+@item htrace record [@var{data}]*
+Selects the data to be recorded, when qualifier is met and HW trace was
+triggered.
+
+@kindex htrace enable
+@item htrace enable
+@kindex htrace disable
+@itemx htrace disable
+Enables/disables the HW trace.
+
+@kindex htrace rewind
+@item htrace rewind [@var{filename}]
+Clears currently recorded trace data.
+
+If filename is specified, new trace file is made and any newly collected data
+will be written there.
+
+@kindex htrace print
+@item htrace print [@var{start} [@var{len}]]
+Prints trace buffer, using current record configuration.
+
+@kindex htrace mode continuous
+@item htrace mode continuous
+Set continuous trace mode.
+
+@kindex htrace mode suspend
+@item htrace mode suspend
+Set suspend trace mode.
+
+@end table
+
+@node PowerPC
+@subsection PowerPC
+
+@table @code
+
+@kindex target dink32
+@item target dink32 @var{dev}
+DINK32 ROM monitor.
+
+@kindex target ppcbug
+@item target ppcbug @var{dev}
+@kindex target ppcbug1
+@item target ppcbug1 @var{dev}
+PPCBUG ROM monitor for PowerPC.
+
+@kindex target sds
+@item target sds @var{dev}
+SDS monitor, running on a PowerPC board (such as Motorola's ADS).
+
+@end table
+
+@node PA
+@subsection HP PA Embedded
+
+@table @code
+
+@kindex target op50n
+@item target op50n @var{dev}
+OP50N monitor, running on an OKI HPPA board.
+
+@kindex target w89k
+@item target w89k @var{dev}
+W89K monitor, running on a Winbond HPPA board.
+
+@end table
+
+@node SH
+@subsection Hitachi SH
+
+@table @code
+
+@kindex target hms@r{, with Hitachi SH}
+@item target hms @var{dev}
+A Hitachi SH board attached via serial line to your host.  Use special
+commands @code{device} and @code{speed} to control the serial line and
+the communications speed used.
+
+@kindex target e7000@r{, with Hitachi SH}
+@item target e7000 @var{dev}
+E7000 emulator for Hitachi SH.
+
+@kindex target sh3@r{, with SH}
+@kindex target sh3e@r{, with SH}
+@item target sh3 @var{dev}
+@item target sh3e @var{dev}
+Hitachi SH-3 and SH-3E target systems.
+
+@end table
+
+@node Sparclet
+@subsection Tsqware Sparclet
+
+@cindex Sparclet
+
+@value{GDBN} enables developers to debug tasks running on
+Sparclet targets from a Unix host.
+@value{GDBN} uses code that runs on
+both the Unix host and on the Sparclet target.  The program
+@code{@value{GDBP}} is installed and executed on the Unix host.
+
+@table @code
+@item remotetimeout @var{args}
+@kindex remotetimeout
+@value{GDBN} supports the option @code{remotetimeout}.
+This option is set by the user, and  @var{args} represents the number of
+seconds @value{GDBN} waits for responses.
+@end table
+
+@cindex compiling, on Sparclet
+When compiling for debugging, include the options @samp{-g} to get debug
+information and @samp{-Ttext} to relocate the program to where you wish to
+load it on the target.  You may also want to add the options @samp{-n} or
+@samp{-N} in order to reduce the size of the sections.  Example:
+
+@smallexample
+sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
+@end smallexample
+
+You can use @code{objdump} to verify that the addresses are what you intended:
+
+@smallexample
+sparclet-aout-objdump --headers --syms prog
+@end smallexample
+
+@cindex running, on Sparclet
+Once you have set
+your Unix execution search path to find @value{GDBN}, you are ready to
+run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}}
+(or @code{sparclet-aout-gdb}, depending on your installation).
+
+@value{GDBN} comes up showing the prompt:
+
+@smallexample
+(gdbslet)
+@end smallexample
+
+@menu
+* Sparclet File::                Setting the file to debug
+* Sparclet Connection::          Connecting to Sparclet
+* Sparclet Download::            Sparclet download
+* Sparclet Execution::           Running and debugging
+@end menu
+
+@node Sparclet File
+@subsubsection Setting file to debug
+
+The @value{GDBN} command @code{file} lets you choose with program to debug.
+
+@smallexample
+(gdbslet) file prog
+@end smallexample
+
+@need 1000
+@value{GDBN} then attempts to read the symbol table of @file{prog}.
+@value{GDBN} locates
+the file by searching the directories listed in the command search
+path.
+If the file was compiled with debug information (option "-g"), source
+files will be searched as well.
+@value{GDBN} locates
+the source files by searching the directories listed in the directory search
+path (@pxref{Environment, ,Your program's environment}).
+If it fails
+to find a file, it displays a message such as:
+
+@smallexample
+prog: No such file or directory.
+@end smallexample
+
+When this happens, add the appropriate directories to the search paths with
+the @value{GDBN} commands @code{path} and @code{dir}, and execute the
+@code{target} command again.
+
+@node Sparclet Connection
+@subsubsection Connecting to Sparclet
+
+The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
+To connect to a target on serial port ``@code{ttya}'', type:
+
+@smallexample
+(gdbslet) target sparclet /dev/ttya
+Remote target sparclet connected to /dev/ttya
+main () at ../prog.c:3
+@end smallexample
+
+@need 750
+@value{GDBN} displays messages like these:
+
+@smallexample
+Connected to ttya.
+@end smallexample
+
+@node Sparclet Download
+@subsubsection Sparclet download
+
+@cindex download to Sparclet
+Once connected to the Sparclet target,
+you can use the @value{GDBN}
+@code{load} command to download the file from the host to the target.
+The file name and load offset should be given as arguments to the @code{load}
+command.
+Since the file format is aout, the program must be loaded to the starting
+address.  You can use @code{objdump} to find out what this value is.  The load
+offset is an offset which is added to the VMA (virtual memory address)
+of each of the file's sections.
+For instance, if the program
+@file{prog} was linked to text address 0x1201000, with data at 0x12010160
+and bss at 0x12010170, in @value{GDBN}, type:
+
+@smallexample
+(gdbslet) load prog 0x12010000
+Loading section .text, size 0xdb0 vma 0x12010000
+@end smallexample
+
+If the code is loaded at a different address then what the program was linked
+to, you may need to use the @code{section} and @code{add-symbol-file} commands
+to tell @value{GDBN} where to map the symbol table.
+
+@node Sparclet Execution
+@subsubsection Running and debugging
+
+@cindex running and debugging Sparclet programs
+You can now begin debugging the task using @value{GDBN}'s execution control
+commands, @code{b}, @code{step}, @code{run}, etc.  See the @value{GDBN}
+manual for the list of commands.
+
+@smallexample
+(gdbslet) b main
+Breakpoint 1 at 0x12010000: file prog.c, line 3.
+(gdbslet) run
+Starting program: prog
+Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
+3        char *symarg = 0;
+(gdbslet) step
+4        char *execarg = "hello!";
+(gdbslet)
+@end smallexample
+
+@node Sparclite
+@subsection Fujitsu Sparclite
+
+@table @code
+
+@kindex target sparclite
+@item target sparclite @var{dev}
+Fujitsu sparclite boards, used only for the purpose of loading.
+You must use an additional command to debug the program.
+For example: target remote @var{dev} using @value{GDBN} standard
+remote protocol.
+
+@end table
+
+@node ST2000
+@subsection Tandem ST2000
+
+@value{GDBN} may be used with a Tandem ST2000 phone switch, running Tandem's
+STDBUG protocol.
+
+To connect your ST2000 to the host system, see the manufacturer's
+manual.  Once the ST2000 is physically attached, you can run:
+
+@smallexample
+target st2000 @var{dev} @var{speed}
+@end smallexample
+
+@noindent
+to establish it as your debugging environment.  @var{dev} is normally
+the name of a serial device, such as @file{/dev/ttya}, connected to the
+ST2000 via a serial line.  You can instead specify @var{dev} as a TCP
+connection (for example, to a serial line attached via a terminal
+concentrator) using the syntax @code{@var{hostname}:@var{portnumber}}.
+
+The @code{load} and @code{attach} commands are @emph{not} defined for
+this target; you must load your program into the ST2000 as you normally
+would for standalone operation.  @value{GDBN} reads debugging information
+(such as symbols) from a separate, debugging version of the program
+available on your host computer.
+@c FIXME!! This is terribly vague; what little content is here is
+@c basically hearsay.
+
+@cindex ST2000 auxiliary commands
+These auxiliary @value{GDBN} commands are available to help you with the ST2000
+environment:
+
+@table @code
+@item st2000 @var{command}
+@kindex st2000 @var{cmd}
+@cindex STDBUG commands (ST2000)
+@cindex commands to STDBUG (ST2000)
+Send a @var{command} to the STDBUG monitor.  See the manufacturer's
+manual for available commands.
+
+@item connect
+@cindex connect (to STDBUG)
+Connect the controlling terminal to the STDBUG command monitor.  When
+you are done interacting with STDBUG, typing either of two character
+sequences gets you back to the @value{GDBN} command prompt:
+@kbd{@key{RET}~.} (Return, followed by tilde and period) or
+@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
+@end table
+
+@node Z8000
+@subsection Zilog Z8000
+
+@cindex Z8000
+@cindex simulator, Z8000
+@cindex Zilog Z8000 simulator
+
+When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
+a Z8000 simulator.
+
+For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
+unsegmented variant of the Z8000 architecture) or the Z8001 (the
+segmented variant).  The simulator recognizes which architecture is
+appropriate by inspecting the object code.
+
+@table @code
+@item target sim @var{args}
+@kindex sim
+@kindex target sim@r{, with Z8000}
+Debug programs on a simulated CPU.  If the simulator supports setup
+options, specify them via @var{args}.
+@end table
+
+@noindent
+After specifying this target, you can debug programs for the simulated
+CPU in the same style as programs for your host computer; use the
+@code{file} command to load a new program image, the @code{run} command
+to run your program, and so on.
+
+As well as making available all the usual machine registers
+(@pxref{Registers, ,Registers}), the Z8000 simulator provides three
+additional items of information as specially named registers:
+
+@table @code
+
+@item cycles
+Counts clock-ticks in the simulator.
+
+@item insts
+Counts instructions run in the simulator.
+
+@item time
+Execution time in 60ths of a second.
+
+@end table
+
+You can refer to these values in @value{GDBN} expressions with the usual
+conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a
+conditional breakpoint that suspends only after at least 5000
+simulated clock ticks.
+
+@node Architectures
+@section Architectures
+
+This section describes characteristics of architectures that affect
+all uses of @value{GDBN} with the architecture, both native and cross.
+
+@menu
+* A29K::
+* Alpha::
+* MIPS::
+@end menu
+
+@node A29K
+@subsection A29K
+
+@table @code
+
+@kindex set rstack_high_address
+@cindex AMD 29K register stack
+@cindex register stack, AMD29K
+@item set rstack_high_address @var{address}
+On AMD 29000 family processors, registers are saved in a separate
+@dfn{register stack}.  There is no way for @value{GDBN} to determine the
+extent of this stack.  Normally, @value{GDBN} just assumes that the
+stack is ``large enough''.  This may result in @value{GDBN} referencing
+memory locations that do not exist.  If necessary, you can get around
+this problem by specifying the ending address of the register stack with
+the @code{set rstack_high_address} command.  The argument should be an
+address, which you probably want to precede with @samp{0x} to specify in
+hexadecimal.
+
+@kindex show rstack_high_address
+@item show rstack_high_address
+Display the current limit of the register stack, on AMD 29000 family
+processors.
+
+@end table
+
+@node Alpha
+@subsection Alpha
+
+See the following section.
+
+@node MIPS
+@subsection MIPS
+
+@cindex stack on Alpha
+@cindex stack on MIPS
+@cindex Alpha stack
+@cindex MIPS stack
+Alpha- and MIPS-based computers use an unusual stack frame, which
+sometimes requires @value{GDBN} to search backward in the object code to
+find the beginning of a function.
+
+@cindex response time, MIPS debugging
+To improve response time (especially for embedded applications, where
+@value{GDBN} may be restricted to a slow serial line for this search)
+you may want to limit the size of this search, using one of these
+commands:
+
+@table @code
+@cindex @code{heuristic-fence-post} (Alpha, MIPS)
+@item set heuristic-fence-post @var{limit}
+Restrict @value{GDBN} to examining at most @var{limit} bytes in its
+search for the beginning of a function.  A value of @var{0} (the
+default) means there is no limit.  However, except for @var{0}, the
+larger the limit the more bytes @code{heuristic-fence-post} must search
+and therefore the longer it takes to run.
+
+@item show heuristic-fence-post
+Display the current limit.
+@end table
+
+@noindent
+These commands are available @emph{only} when @value{GDBN} is configured
+for debugging programs on Alpha or MIPS processors.
+
+
+@node Controlling GDB
+@chapter Controlling @value{GDBN}
+
+You can alter the way @value{GDBN} interacts with you by using the
+@code{set} command.  For commands controlling how @value{GDBN} displays
+data, see @ref{Print Settings, ,Print settings}.  Other settings are
+described here.
+
+@menu
+* Prompt::                      Prompt
+* Editing::                     Command editing
+* History::                     Command history
+* Screen Size::                 Screen size
+* Numbers::                     Numbers
+* ABI::                         Configuring the current ABI
+* Messages/Warnings::           Optional warnings and messages
+* Debugging Output::            Optional messages about internal happenings
+@end menu
+
+@node Prompt
+@section Prompt
+
+@cindex prompt
+
+@value{GDBN} indicates its readiness to read a command by printing a string
+called the @dfn{prompt}.  This string is normally @samp{(@value{GDBP})}.  You
+can change the prompt string with the @code{set prompt} command.  For
+instance, when debugging @value{GDBN} with @value{GDBN}, it is useful to change
+the prompt in one of the @value{GDBN} sessions so that you can always tell
+which one you are talking to.
+
+@emph{Note:}  @code{set prompt} does not add a space for you after the
+prompt you set.  This allows you to set a prompt which ends in a space
+or a prompt that does not.
+
+@table @code
+@kindex set prompt
+@item set prompt @var{newprompt}
+Directs @value{GDBN} to use @var{newprompt} as its prompt string henceforth.
+
+@kindex show prompt
+@item show prompt
+Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
+@end table
+
+@node Editing
+@section Command editing
+@cindex readline
+@cindex command line editing
+
+@value{GDBN} reads its input commands via the @dfn{readline} interface.  This
+@sc{gnu} library provides consistent behavior for programs which provide a
+command line interface to the user.  Advantages are @sc{gnu} Emacs-style
+or @dfn{vi}-style inline editing of commands, @code{csh}-like history
+substitution, and a storage and recall of command history across
+debugging sessions.
+
+You may control the behavior of command line editing in @value{GDBN} with the
+command @code{set}.
+
+@table @code
+@kindex set editing
+@cindex editing
+@item set editing
+@itemx set editing on
+Enable command line editing (enabled by default).
+
+@item set editing off
+Disable command line editing.
+
+@kindex show editing
+@item show editing
+Show whether command line editing is enabled.
+@end table
+
+@node History
+@section Command history
+
+@value{GDBN} can keep track of the commands you type during your
+debugging sessions, so that you can be certain of precisely what
+happened.  Use these commands to manage the @value{GDBN} command
+history facility.
+
+@table @code
+@cindex history substitution
+@cindex history file
+@kindex set history filename
+@kindex GDBHISTFILE
+@item set history filename @var{fname}
+Set the name of the @value{GDBN} command history file to @var{fname}.
+This is the file where @value{GDBN} reads an initial command history
+list, and where it writes the command history from this session when it
+exits.  You can access this list through history expansion or through
+the history command editing characters listed below.  This file defaults
+to the value of the environment variable @code{GDBHISTFILE}, or to
+@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
+is not set.
+
+@cindex history save
+@kindex set history save
+@item set history save
+@itemx set history save on
+Record command history in a file, whose name may be specified with the
+@code{set history filename} command.  By default, this option is disabled.
+
+@item set history save off
+Stop recording command history in a file.
+
+@cindex history size
+@kindex set history size
+@item set history size @var{size}
+Set the number of commands which @value{GDBN} keeps in its history list.
+This defaults to the value of the environment variable
+@code{HISTSIZE}, or to 256 if this variable is not set.
+@end table
+
+@cindex history expansion
+History expansion assigns special meaning to the character @kbd{!}.
+@ifset have-readline-appendices
+@xref{Event Designators}.
+@end ifset
+
+Since @kbd{!} is also the logical not operator in C, history expansion
+is off by default. If you decide to enable history expansion with the
+@code{set history expansion on} command, you may sometimes need to
+follow @kbd{!} (when it is used as logical not, in an expression) with
+a space or a tab to prevent it from being expanded.  The readline
+history facilities do not attempt substitution on the strings
+@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
+
+The commands to control history expansion are:
+
+@table @code
+@kindex set history expansion
+@item set history expansion on
+@itemx set history expansion
+Enable history expansion.  History expansion is off by default.
+
+@item set history expansion off
+Disable history expansion.
+
+The readline code comes with more complete documentation of
+editing and history expansion features.  Users unfamiliar with @sc{gnu} Emacs
+or @code{vi} may wish to read it.
+@ifset have-readline-appendices
+@xref{Command Line Editing}.
+@end ifset
+
+@c @group
+@kindex show history
+@item show history
+@itemx show history filename
+@itemx show history save
+@itemx show history size
+@itemx show history expansion
+These commands display the state of the @value{GDBN} history parameters.
+@code{show history} by itself displays all four states.
+@c @end group
+@end table
+
+@table @code
+@kindex shows
+@item show commands
+Display the last ten commands in the command history.
+
+@item show commands @var{n}
+Print ten commands centered on command number @var{n}.
+
+@item show commands +
+Print ten commands just after the commands last printed.
+@end table
+
+@node Screen Size
+@section Screen size
+@cindex size of screen
+@cindex pauses in output
+
+Certain commands to @value{GDBN} may produce large amounts of
+information output to the screen.  To help you read all of it,
+@value{GDBN} pauses and asks you for input at the end of each page of
+output.  Type @key{RET} when you want to continue the output, or @kbd{q}
+to discard the remaining output.  Also, the screen width setting
+determines when to wrap lines of output.  Depending on what is being
+printed, @value{GDBN} tries to break the line at a readable place,
+rather than simply letting it overflow onto the following line.
+
+Normally @value{GDBN} knows the size of the screen from the terminal
+driver software.  For example, on Unix @value{GDBN} uses the termcap data base
+together with the value of the @code{TERM} environment variable and the
+@code{stty rows} and @code{stty cols} settings.  If this is not correct,
+you can override it with the @code{set height} and @code{set
+width} commands:
+
+@table @code
+@kindex set height
+@kindex set width
+@kindex show width
+@kindex show height
+@item set height @var{lpp}
+@itemx show height
+@itemx set width @var{cpl}
+@itemx show width
+These @code{set} commands specify a screen height of @var{lpp} lines and
+a screen width of @var{cpl} characters.  The associated @code{show}
+commands display the current settings.
+
+If you specify a height of zero lines, @value{GDBN} does not pause during
+output no matter how long the output is.  This is useful if output is to a
+file or to an editor buffer.
+
+Likewise, you can specify @samp{set width 0} to prevent @value{GDBN}
+from wrapping its output.
+@end table
+
+@node Numbers
+@section Numbers
+@cindex number representation
+@cindex entering numbers
+
+You can always enter numbers in octal, decimal, or hexadecimal in
+@value{GDBN} by the usual conventions: octal numbers begin with
+@samp{0}, decimal numbers end with @samp{.}, and hexadecimal numbers
+begin with @samp{0x}.  Numbers that begin with none of these are, by
+default, entered in base 10; likewise, the default display for
+numbers---when no particular format is specified---is base 10.  You can
+change the default base for both input and output with the @code{set
+radix} command.
+
+@table @code
+@kindex set input-radix
+@item set input-radix @var{base}
+Set the default base for numeric input.  Supported choices
+for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
+specified either unambiguously or using the current default radix; for
+example, any of
+
+@smallexample
+set radix 012
+set radix 10.
+set radix 0xa
+@end smallexample
+
+@noindent
+sets the base to decimal.  On the other hand, @samp{set radix 10}
+leaves the radix unchanged no matter what it was.
+
+@kindex set output-radix
+@item set output-radix @var{base}
+Set the default base for numeric display.  Supported choices
+for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
+specified either unambiguously or using the current default radix.
+
+@kindex show input-radix
+@item show input-radix
+Display the current default base for numeric input.
+
+@kindex show output-radix
+@item show output-radix
+Display the current default base for numeric display.
+@end table
+
+@node ABI
+@section Configuring the current ABI
+
+@value{GDBN} can determine the @dfn{ABI} (Application Binary Interface) of your
+application automatically.  However, sometimes you need to override its
+conclusions.  Use these commands to manage @value{GDBN}'s view of the
+current ABI.
+
+@cindex OS ABI
+@kindex set osabi
+@kindex show osabi
+
+One @value{GDBN} configuration can debug binaries for multiple operating
+system targets, either via remote debugging or native emulation. 
+@value{GDBN} will autodetect the @dfn{OS ABI} (Operating System ABI) in use,
+but you can override its conclusion using the @code{set osabi} command.
+One example where this is useful is in debugging of binaries which use
+an alternate C library (e.g.@: @sc{uClibc} for @sc{gnu}/Linux) which does
+not have the same identifying marks that the standard C library for your
+platform provides.
+
+@table @code
+@item show osabi
+Show the OS ABI currently in use.
+
+@item set osabi
+With no argument, show the list of registered available OS ABI's.
+
+@item set osabi @var{abi}
+Set the current OS ABI to @var{abi}.
+@end table
+
+@cindex float promotion
+@kindex set coerce-float-to-double
+
+Generally, the way that an argument of type @code{float} is passed to a
+function depends on whether the function is prototyped.  For a prototyped
+(i.e.@: ANSI/ISO style) function, @code{float} arguments are passed unchanged,
+according to the architecture's convention for @code{float}.  For unprototyped
+(i.e.@: K&R style) functions, @code{float} arguments are first promoted to type
+@code{double} and then passed.
+
+Unfortunately, some forms of debug information do not reliably indicate whether
+a function is prototyped.  If @value{GDBN} calls a function that is not marked
+as prototyped, it consults @kbd{set coerce-float-to-double}.
+
+@table @code
+@item set coerce-float-to-double
+@itemx set coerce-float-to-double on
+Arguments of type @code{float} will be promoted to @code{double} when passed
+to an unprototyped function.  This is the default setting.
+
+@item set coerce-float-to-double off
+Arguments of type @code{float} will be passed directly to unprototyped
+functions.
+@end table
+
+@kindex set cp-abi
+@kindex show cp-abi
+@value{GDBN} needs to know the ABI used for your program's C@t{++}
+objects.  The correct C@t{++} ABI depends on which C@t{++} compiler was
+used to build your application.  @value{GDBN} only fully supports
+programs with a single C@t{++} ABI; if your program contains code using
+multiple C@t{++} ABI's or if @value{GDBN} can not identify your
+program's ABI correctly, you can tell @value{GDBN} which ABI to use.
+Currently supported ABI's include ``gnu-v2'', for @code{g++} versions
+before 3.0, ``gnu-v3'', for @code{g++} versions 3.0 and later, and
+``hpaCC'' for the HP ANSI C@t{++} compiler.  Other C@t{++} compilers may
+use the ``gnu-v2'' or ``gnu-v3'' ABI's as well.  The default setting is
+``auto''.
+
+@table @code
+@item show cp-abi
+Show the C@t{++} ABI currently in use.
+
+@item set cp-abi
+With no argument, show the list of supported C@t{++} ABI's.
+
+@item set cp-abi @var{abi}
+@itemx set cp-abi auto
+Set the current C@t{++} ABI to @var{abi}, or return to automatic detection.
+@end table
+
+@node Messages/Warnings
+@section Optional warnings and messages
+
+By default, @value{GDBN} is silent about its inner workings.  If you are
+running on a slow machine, you may want to use the @code{set verbose}
+command.  This makes @value{GDBN} tell you when it does a lengthy
+internal operation, so you will not think it has crashed.
+
+Currently, the messages controlled by @code{set verbose} are those
+which announce that the symbol table for a source file is being read;
+see @code{symbol-file} in @ref{Files, ,Commands to specify files}.
+
+@table @code
+@kindex set verbose
+@item set verbose on
+Enables @value{GDBN} output of certain informational messages.
+
+@item set verbose off
+Disables @value{GDBN} output of certain informational messages.
+
+@kindex show verbose
+@item show verbose
+Displays whether @code{set verbose} is on or off.
+@end table
+
+By default, if @value{GDBN} encounters bugs in the symbol table of an
+object file, it is silent; but if you are debugging a compiler, you may
+find this information useful (@pxref{Symbol Errors, ,Errors reading
+symbol files}).
+
+@table @code
+
+@kindex set complaints
+@item set complaints @var{limit}
+Permits @value{GDBN} to output @var{limit} complaints about each type of
+unusual symbols before becoming silent about the problem.  Set
+@var{limit} to zero to suppress all complaints; set it to a large number
+to prevent complaints from being suppressed.
+
+@kindex show complaints
+@item show complaints
+Displays how many symbol complaints @value{GDBN} is permitted to produce.
+
+@end table
+
+By default, @value{GDBN} is cautious, and asks what sometimes seems to be a
+lot of stupid questions to confirm certain commands.  For example, if
+you try to run a program which is already running:
+
+@smallexample
+(@value{GDBP}) run
+The program being debugged has been started already.
+Start it from the beginning? (y or n)
+@end smallexample
+
+If you are willing to unflinchingly face the consequences of your own
+commands, you can disable this ``feature'':
+
+@table @code
+
+@kindex set confirm
+@cindex flinching
+@cindex confirmation
+@cindex stupid questions
+@item set confirm off
+Disables confirmation requests.
+
+@item set confirm on
+Enables confirmation requests (the default).
+
+@kindex show confirm
+@item show confirm
+Displays state of confirmation requests.
+
+@end table
+
+@node Debugging Output
+@section Optional messages about internal happenings
+@table @code
+@kindex set debug arch
+@item set debug arch
+Turns on or off display of gdbarch debugging info. The default is off
+@kindex show debug arch
+@item show debug arch
+Displays the current state of displaying gdbarch debugging info.
+@kindex set debug event
+@item set debug event
+Turns on or off display of @value{GDBN} event debugging info. The
+default is off.
+@kindex show debug event
+@item show debug event
+Displays the current state of displaying @value{GDBN} event debugging
+info.
+@kindex set debug expression
+@item set debug expression
+Turns on or off display of @value{GDBN} expression debugging info. The
+default is off.
+@kindex show debug expression
+@item show debug expression
+Displays the current state of displaying @value{GDBN} expression
+debugging info.
+@kindex set debug frame
+@item set debug frame
+Turns on or off display of @value{GDBN} frame debugging info.  The
+default is off.
+@kindex show debug frame
+@item show debug frame
+Displays the current state of displaying @value{GDBN} frame debugging
+info.
+@kindex set debug overload
+@item set debug overload
+Turns on or off display of @value{GDBN} C@t{++} overload debugging
+info. This includes info such as ranking of functions, etc. The default
+is off.
+@kindex show debug overload
+@item show debug overload
+Displays the current state of displaying @value{GDBN} C@t{++} overload
+debugging info.
+@kindex set debug remote
+@cindex packets, reporting on stdout
+@cindex serial connections, debugging
+@item set debug remote
+Turns on or off display of reports on all packets sent back and forth across
+the serial line to the remote machine.  The info is printed on the
+@value{GDBN} standard output stream. The default is off.
+@kindex show debug remote
+@item show debug remote
+Displays the state of display of remote packets.
+@kindex set debug serial
+@item set debug serial
+Turns on or off display of @value{GDBN} serial debugging info. The
+default is off.
+@kindex show debug serial
+@item show debug serial
+Displays the current state of displaying @value{GDBN} serial debugging
+info.
+@kindex set debug target
+@item set debug target
+Turns on or off display of @value{GDBN} target debugging info. This info
+includes what is going on at the target level of GDB, as it happens. The
+default is off.
+@kindex show debug target
+@item show debug target
+Displays the current state of displaying @value{GDBN} target debugging
+info.
+@kindex set debug varobj
+@item set debug varobj
+Turns on or off display of @value{GDBN} variable object debugging
+info. The default is off.
+@kindex show debug varobj
+@item show debug varobj
+Displays the current state of displaying @value{GDBN} variable object
+debugging info.
+@end table
+
+@node Sequences
+@chapter Canned Sequences of Commands
+
+Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
+command lists}), @value{GDBN} provides two ways to store sequences of
+commands for execution as a unit: user-defined commands and command
+files.
+
+@menu
+* Define::                      User-defined commands
+* Hooks::                       User-defined command hooks
+* Command Files::               Command files
+* Output::                      Commands for controlled output
+@end menu
+
+@node Define
+@section User-defined commands
+
+@cindex user-defined command
+A @dfn{user-defined command} is a sequence of @value{GDBN} commands to
+which you assign a new name as a command.  This is done with the
+@code{define} command.  User commands may accept up to 10 arguments
+separated by whitespace.  Arguments are accessed within the user command
+via @var{$arg0@dots{}$arg9}.  A trivial example:
+
+@smallexample
+define adder
+  print $arg0 + $arg1 + $arg2
+@end smallexample
+
+@noindent
+To execute the command use:
+
+@smallexample
+adder 1 2 3
+@end smallexample
+
+@noindent
+This defines the command @code{adder}, which prints the sum of
+its three arguments.  Note the arguments are text substitutions, so they may
+reference variables, use complex expressions, or even perform inferior
+functions calls.
+
+@table @code
+
+@kindex define
+@item define @var{commandname}
+Define a command named @var{commandname}.  If there is already a command
+by that name, you are asked to confirm that you want to redefine it.
+
+The definition of the command is made up of other @value{GDBN} command lines,
+which are given following the @code{define} command.  The end of these
+commands is marked by a line containing @code{end}.
+
+@kindex if
+@kindex else
+@item if
+Takes a single argument, which is an expression to evaluate.
+It is followed by a series of commands that are executed
+only if the expression is true (nonzero).
+There can then optionally be a line @code{else}, followed
+by a series of commands that are only executed if the expression
+was false.  The end of the list is marked by a line containing @code{end}.
+
+@kindex while
+@item while
+The syntax is similar to @code{if}: the command takes a single argument,
+which is an expression to evaluate, and must be followed by the commands to
+execute, one per line, terminated by an @code{end}.
+The commands are executed repeatedly as long as the expression
+evaluates to true.
+
+@kindex document
+@item document @var{commandname}
+Document the user-defined command @var{commandname}, so that it can be
+accessed by @code{help}.  The command @var{commandname} must already be
+defined.  This command reads lines of documentation just as @code{define}
+reads the lines of the command definition, ending with @code{end}.
+After the @code{document} command is finished, @code{help} on command
+@var{commandname} displays the documentation you have written.
+
+You may use the @code{document} command again to change the
+documentation of a command.  Redefining the command with @code{define}
+does not change the documentation.
+
+@kindex help user-defined
+@item help user-defined
+List all user-defined commands, with the first line of the documentation
+(if any) for each.
+
+@kindex show user
+@item show user
+@itemx show user @var{commandname}
+Display the @value{GDBN} commands used to define @var{commandname} (but
+not its documentation).  If no @var{commandname} is given, display the
+definitions for all user-defined commands.
+
+@kindex show max-user-call-depth
+@kindex set max-user-call-depth
+@item show max-user-call-depth
+@itemx set max-user-call-depth
+The value of @code{max-user-call-depth} controls how many recursion
+levels are allowed in user-defined commands before GDB suspects an
+infinite recursion and aborts the command.
+
+@end table
+
+When user-defined commands are executed, the
+commands of the definition are not printed.  An error in any command
+stops execution of the user-defined command.
+
+If used interactively, commands that would ask for confirmation proceed
+without asking when used inside a user-defined command.  Many @value{GDBN}
+commands that normally print messages to say what they are doing omit the
+messages when used in a user-defined command.
+
+@node Hooks
+@section User-defined command hooks
+@cindex command hooks
+@cindex hooks, for commands
+@cindex hooks, pre-command
+
+@kindex hook
+@kindex hook-
+You may define @dfn{hooks}, which are a special kind of user-defined
+command.  Whenever you run the command @samp{foo}, if the user-defined
+command @samp{hook-foo} exists, it is executed (with no arguments)
+before that command.
+
+@cindex hooks, post-command
+@kindex hookpost
+@kindex hookpost-
+A hook may also be defined which is run after the command you executed.
+Whenever you run the command @samp{foo}, if the user-defined command
+@samp{hookpost-foo} exists, it is executed (with no arguments) after
+that command.  Post-execution hooks may exist simultaneously with
+pre-execution hooks, for the same command.
+
+It is valid for a hook to call the command which it hooks.  If this
+occurs, the hook is not re-executed, thereby avoiding infinte recursion.
+
+@c It would be nice if hookpost could be passed a parameter indicating
+@c if the command it hooks executed properly or not.  FIXME!
+
+@kindex stop@r{, a pseudo-command}
+In addition, a pseudo-command, @samp{stop} exists.  Defining
+(@samp{hook-stop}) makes the associated commands execute every time
+execution stops in your program: before breakpoint commands are run,
+displays are printed, or the stack frame is printed.
+
+For example, to ignore @code{SIGALRM} signals while
+single-stepping, but treat them normally during normal execution,
+you could define:
+
+@smallexample
+define hook-stop
+handle SIGALRM nopass
+end
+
+define hook-run
+handle SIGALRM pass
+end
+
+define hook-continue
+handle SIGLARM pass
+end
+@end smallexample
+
+As a further example, to hook at the begining and end of the @code{echo}
+command, and to add extra text to the beginning and end of the message, 
+you could define:
+
+@smallexample
+define hook-echo
+echo <<<---
+end
+
+define hookpost-echo
+echo --->>>\n
+end
+
+(@value{GDBP}) echo Hello World
+<<<---Hello World--->>>
+(@value{GDBP})
+
+@end smallexample
+
+You can define a hook for any single-word command in @value{GDBN}, but
+not for command aliases; you should define a hook for the basic command
+name, e.g.  @code{backtrace} rather than @code{bt}.
+@c FIXME!  So how does Joe User discover whether a command is an alias
+@c or not?
+If an error occurs during the execution of your hook, execution of
+@value{GDBN} commands stops and @value{GDBN} issues a prompt
+(before the command that you actually typed had a chance to run).
+
+If you try to define a hook which does not match any known command, you
+get a warning from the @code{define} command.
+
+@node Command Files
+@section Command files
+
+@cindex command files
+A command file for @value{GDBN} is a file of lines that are @value{GDBN}
+commands.  Comments (lines starting with @kbd{#}) may also be included.
+An empty line in a command file does nothing; it does not mean to repeat
+the last command, as it would from the terminal.
+
+@cindex init file
+@cindex @file{.gdbinit}
+@cindex @file{gdb.ini}
+When you start @value{GDBN}, it automatically executes commands from its
+@dfn{init files}, normally called @file{.gdbinit}@footnote{The DJGPP
+port of @value{GDBN} uses the name @file{gdb.ini} instead, due to the
+limitations of file names imposed by DOS filesystems.}.
+During startup, @value{GDBN} does the following:
+
+@enumerate
+@item
+Reads the init file (if any) in your home directory@footnote{On
+DOS/Windows systems, the home directory is the one pointed to by the
+@code{HOME} environment variable.}.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads the init file (if any) in the current working directory.
+
+@item
+Reads command files specified by the @samp{-x} option.
+@end enumerate
+
+The init file in your home directory can set options (such as @samp{set
+complaints}) that affect subsequent processing of command line options
+and operands.  Init files are not executed if you use the @samp{-nx}
+option (@pxref{Mode Options, ,Choosing modes}).
+
+@cindex init file name
+On some configurations of @value{GDBN}, the init file is known by a
+different name (these are typically environments where a specialized
+form of @value{GDBN} may need to coexist with other forms, hence a
+different name for the specialized version's init file).  These are the
+environments with special init file names:
+
+@cindex @file{.vxgdbinit}
+@itemize @bullet
+@item
+VxWorks (Wind River Systems real-time OS): @file{.vxgdbinit}
+
+@cindex @file{.os68gdbinit}
+@item
+OS68K (Enea Data Systems real-time OS): @file{.os68gdbinit}
+
+@cindex @file{.esgdbinit}
+@item
+ES-1800 (Ericsson Telecom AB M68000 emulator): @file{.esgdbinit}
+@end itemize
+
+You can also request the execution of a command file with the
+@code{source} command:
+
+@table @code
+@kindex source
+@item source @var{filename}
+Execute the command file @var{filename}.
+@end table
+
+The lines in a command file are executed sequentially.  They are not
+printed as they are executed.  An error in any command terminates
+execution of the command file and control is returned to the console.
+
+Commands that would ask for confirmation if used interactively proceed
+without asking when used in a command file.  Many @value{GDBN} commands that
+normally print messages to say what they are doing omit the messages
+when called from command files.
+
+@value{GDBN} also accepts command input from standard input.  In this
+mode, normal output goes to standard output and error output goes to
+standard error.  Errors in a command file supplied on standard input do
+not terminate execution of the command file --- execution continues with
+the next command.
+
+@smallexample
+gdb < cmds > log 2>&1
+@end smallexample
+
+(The syntax above will vary depending on the shell used.) This example
+will execute commands from the file @file{cmds}. All output and errors
+would be directed to @file{log}.
+
+@node Output
+@section Commands for controlled output
+
+During the execution of a command file or a user-defined command, normal
+@value{GDBN} output is suppressed; the only output that appears is what is
+explicitly printed by the commands in the definition.  This section
+describes three commands useful for generating exactly the output you
+want.
+
+@table @code
+@kindex echo
+@item echo @var{text}
+@c I do not consider backslash-space a standard C escape sequence
+@c because it is not in ANSI.
+Print @var{text}.  Nonprinting characters can be included in
+@var{text} using C escape sequences, such as @samp{\n} to print a
+newline.  @strong{No newline is printed unless you specify one.}
+In addition to the standard C escape sequences, a backslash followed
+by a space stands for a space.  This is useful for displaying a
+string with spaces at the beginning or the end, since leading and
+trailing spaces are otherwise trimmed from all arguments.
+To print @samp{@w{ }and foo =@w{ }}, use the command
+@samp{echo \@w{ }and foo = \@w{ }}.
+
+A backslash at the end of @var{text} can be used, as in C, to continue
+the command onto subsequent lines.  For example,
+
+@smallexample
+echo This is some text\n\
+which is continued\n\
+onto several lines.\n
+@end smallexample
+
+produces the same output as
+
+@smallexample
+echo This is some text\n
+echo which is continued\n
+echo onto several lines.\n
+@end smallexample
+
+@kindex output
+@item output @var{expression}
+Print the value of @var{expression} and nothing but that value: no
+newlines, no @samp{$@var{nn} = }.  The value is not entered in the
+value history either.  @xref{Expressions, ,Expressions}, for more information
+on expressions.
+
+@item output/@var{fmt} @var{expression}
+Print the value of @var{expression} in format @var{fmt}.  You can use
+the same formats as for @code{print}.  @xref{Output Formats,,Output
+formats}, for more information.
+
+@kindex printf
+@item printf @var{string}, @var{expressions}@dots{}
+Print the values of the @var{expressions} under the control of
+@var{string}.  The @var{expressions} are separated by commas and may be
+either numbers or pointers.  Their values are printed as specified by
+@var{string}, exactly as if your program were to execute the C
+subroutine
+@c FIXME: the above implies that at least all ANSI C formats are
+@c supported, but it isn't true: %E and %G don't work (or so it seems).
+@c Either this is a bug, or the manual should document what formats are
+@c supported.
+
+@smallexample
+printf (@var{string}, @var{expressions}@dots{});
+@end smallexample
+
+For example, you can print two values in hex like this:
+
+@smallexample
+printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo
+@end smallexample
+
+The only backslash-escape sequences that you can use in the format
+string are the simple ones that consist of backslash followed by a
+letter.
+@end table
+
+@node Interpreters
+@chapter Command Interpreters
+@cindex command interpreters
+
+@value{GDBN} supports multiple command interpreters, and some command
+infrastructure to allow users or user interface writers to switch
+between interpreters or run commands in other interpreters.
+
+@value{GDBN} currently supports two command interpreters, the console
+interpreter (sometimes called the command-line interpreter or @sc{cli})
+and the machine interface interpreter (or @sc{gdb/mi}).  This manual
+describes both of these interfaces in great detail.
+
+By default, @value{GDBN} will start with the console interpreter.
+However, the user may choose to start @value{GDBN} with another
+interpreter by specifying the @option{-i} or @option{--interpreter}
+startup options.  Defined interpreters include:
+
+@table @code
+@item console
+@cindex console interpreter
+The traditional console or command-line interpreter.  This is the most often
+used interpreter with @value{GDBN}. With no interpreter specified at runtime,
+@value{GDBN} will use this interpreter.
+
+@item mi
+@cindex mi interpreter
+The newest @sc{gdb/mi} interface (currently @code{mi2}).  Used primarily
+by programs wishing to use @value{GDBN} as a backend for a debugger GUI
+or an IDE.  For more information, see @ref{GDB/MI, ,The @sc{gdb/mi}
+Interface}.
+
+@item mi2
+@cindex mi2 interpreter
+The current @sc{gdb/mi} interface.
+
+@item mi1
+@cindex mi1 interpreter
+The @sc{gdb/mi} interface included in @value{GDBN} 5.1, 5.2, and 5.3.
+
+@end table
+
+@cindex invoke another interpreter
+The interpreter being used by @value{GDBN} may not be dynamically
+switched at runtime.  Although possible, this could lead to a very
+precarious situation.  Consider an IDE using @sc{gdb/mi}.  If a user
+enters the command "interpreter-set console" in a console view,
+@value{GDBN} would switch to using the console interpreter, rendering
+the IDE inoperable!
+
+@kindex interpreter-exec
+Although you may only choose a single interpreter at startup, you may execute
+commands in any interpreter from the current interpreter using the appropriate
+command.  If you are running the console interpreter, simply use the
+@code{interpreter-exec} command:
+
+@smallexample
+interpreter-exec mi "-data-list-register-names"
+@end smallexample
+
+@sc{gdb/mi} has a similar command, although it is only available in versions of
+@value{GDBN} which support @sc{gdb/mi} version 2 (or greater).
+
+@node TUI
+@chapter @value{GDBN} Text User Interface
+@cindex TUI
+
+@menu
+* TUI Overview::                TUI overview
+* TUI Keys::                    TUI key bindings
+* TUI Single Key Mode::         TUI single key mode
+* TUI Commands::                TUI specific commands
+* TUI Configuration::           TUI configuration variables
+@end menu
+
+The @value{GDBN} Text User Interface, TUI in short,
+is a terminal interface which uses the @code{curses} library
+to show the source file, the assembly output, the program registers
+and @value{GDBN} commands in separate text windows.
+The TUI is available only when @value{GDBN} is configured
+with the @code{--enable-tui} configure option (@pxref{Configure Options}).
+
+@node TUI Overview
+@section TUI overview
+
+The TUI has two display modes that can be switched while
+@value{GDBN} runs:
+
+@itemize @bullet
+@item
+A curses (or TUI) mode in which it displays several text
+windows on the terminal.
+
+@item
+A standard mode which corresponds to the @value{GDBN} configured without
+the TUI.
+@end itemize
+
+In the TUI mode, @value{GDBN} can display several text window
+on the terminal:
+
+@table @emph
+@item command
+This window is the @value{GDBN} command window with the @value{GDBN}
+prompt and the @value{GDBN} outputs.  The @value{GDBN} input is still
+managed using readline but through the TUI.  The @emph{command}
+window is always visible.
+
+@item source
+The source window shows the source file of the program.  The current
+line as well as active breakpoints are displayed in this window.
+
+@item assembly
+The assembly window shows the disassembly output of the program.
+
+@item register
+This window shows the processor registers.  It detects when
+a register is changed and when this is the case, registers that have
+changed are highlighted.
+
+@end table
+
+The source and assembly windows show the current program position
+by highlighting the current line and marking them with the @samp{>} marker.
+Breakpoints are also indicated with two markers.  A first one
+indicates the breakpoint type:
+
+@table @code
+@item B
+Breakpoint which was hit at least once.
+
+@item b
+Breakpoint which was never hit.
+
+@item H
+Hardware breakpoint which was hit at least once.
+
+@item h
+Hardware breakpoint which was never hit.
+
+@end table
+
+The second marker indicates whether the breakpoint is enabled or not:
+
+@table @code
+@item +
+Breakpoint is enabled.
+
+@item -
+Breakpoint is disabled.
+
+@end table
+
+The source, assembly and register windows are attached to the thread
+and the frame position.  They are updated when the current thread
+changes, when the frame changes or when the program counter changes.
+These three windows are arranged by the TUI according to several
+layouts.  The layout defines which of these three windows are visible.
+The following layouts are available:
+
+@itemize @bullet
+@item
+source
+
+@item
+assembly
+
+@item
+source and assembly
+
+@item
+source and registers
+
+@item
+assembly and registers
+
+@end itemize
+
+On top of the command window a status line gives various information
+concerning the current process begin debugged.  The status line is
+updated when the information it shows changes.  The following fields
+are displayed:
+
+@table @emph
+@item target
+Indicates the current gdb target
+(@pxref{Targets, ,Specifying a Debugging Target}).
+
+@item process
+Gives information about the current process or thread number.
+When no process is being debugged, this field is set to @code{No process}.
+
+@item function
+Gives the current function name for the selected frame.
+The name is demangled if demangling is turned on (@pxref{Print Settings}).
+When there is no symbol corresponding to the current program counter
+the string @code{??} is displayed.
+
+@item line
+Indicates the current line number for the selected frame.
+When the current line number is not known the string @code{??} is displayed.
+
+@item pc
+Indicates the current program counter address.
+
+@end table
+
+@node TUI Keys
+@section TUI Key Bindings
+@cindex TUI key bindings
+
+The TUI installs several key bindings in the readline keymaps
+(@pxref{Command Line Editing}).
+They allow to leave or enter in the TUI mode or they operate
+directly on the TUI layout and windows.  The TUI also provides
+a @emph{SingleKey} keymap which binds several keys directly to
+@value{GDBN} commands.  The following key bindings
+are installed for both TUI mode and the @value{GDBN} standard mode.
+
+@table @kbd
+@kindex C-x C-a
+@item C-x C-a
+@kindex C-x a
+@itemx C-x a
+@kindex C-x A
+@itemx C-x A
+Enter or leave the TUI mode.  When the TUI mode is left,
+the curses window management is left and @value{GDBN} operates using
+its standard mode writing on the terminal directly.  When the TUI
+mode is entered, the control is given back to the curses windows.
+The screen is then refreshed.
+
+@kindex C-x 1
+@item C-x 1
+Use a TUI layout with only one window.  The layout will
+either be @samp{source} or @samp{assembly}.  When the TUI mode
+is not active, it will switch to the TUI mode.
+
+Think of this key binding as the Emacs @kbd{C-x 1} binding.
+
+@kindex C-x 2
+@item C-x 2
+Use a TUI layout with at least two windows.  When the current
+layout shows already two windows, a next layout with two windows is used.
+When a new layout is chosen, one window will always be common to the
+previous layout and the new one.
+
+Think of it as the Emacs @kbd{C-x 2} binding.
+
+@kindex C-x s
+@item C-x s
+Use the TUI @emph{SingleKey} keymap that binds single key to gdb commands
+(@pxref{TUI Single Key Mode}).
+
+@end table
+
+The following key bindings are handled only by the TUI mode:
+
+@table @key
+@kindex PgUp
+@item PgUp
+Scroll the active window one page up.
+
+@kindex PgDn
+@item PgDn
+Scroll the active window one page down.
+
+@kindex Up
+@item Up
+Scroll the active window one line up.
+
+@kindex Down
+@item Down
+Scroll the active window one line down.
+
+@kindex Left
+@item Left
+Scroll the active window one column left.
+
+@kindex Right
+@item Right
+Scroll the active window one column right.
+
+@kindex C-L
+@item C-L
+Refresh the screen.
+
+@end table
+
+In the TUI mode, the arrow keys are used by the active window
+for scrolling.  This means they are not available for readline.  It is
+necessary to use other readline key bindings such as @key{C-p}, @key{C-n},
+@key{C-b} and @key{C-f}.
+
+@node TUI Single Key Mode
+@section TUI Single Key Mode
+@cindex TUI single key mode
+
+The TUI provides a @emph{SingleKey} mode in which it installs a particular
+key binding in the readline keymaps to connect single keys to
+some gdb commands. 
+
+@table @kbd
+@kindex c @r{(SingleKey TUI key)}
+@item c
+continue
+
+@kindex d @r{(SingleKey TUI key)}
+@item d
+down
+
+@kindex f @r{(SingleKey TUI key)}
+@item f
+finish
+
+@kindex n @r{(SingleKey TUI key)}
+@item n
+next
+
+@kindex q @r{(SingleKey TUI key)}
+@item q
+exit the @emph{SingleKey} mode.
+
+@kindex r @r{(SingleKey TUI key)}
+@item r
+run
+
+@kindex s @r{(SingleKey TUI key)}
+@item s
+step
+
+@kindex u @r{(SingleKey TUI key)}
+@item u
+up
+
+@kindex v @r{(SingleKey TUI key)}
+@item v
+info locals
+
+@kindex w @r{(SingleKey TUI key)}
+@item w
+where
+
+@end table
+
+Other keys temporarily switch to the @value{GDBN} command prompt.
+The key that was pressed is inserted in the editing buffer so that
+it is possible to type most @value{GDBN} commands without interaction
+with the TUI @emph{SingleKey} mode.  Once the command is entered the TUI
+@emph{SingleKey} mode is restored.  The only way to permanently leave
+this mode is by hitting @key{q} or @samp{@key{C-x} @key{s}}.
+
+
+@node TUI Commands
+@section TUI specific commands
+@cindex TUI commands
+
+The TUI has specific commands to control the text windows.
+These commands are always available, that is they do not depend on
+the current terminal mode in which @value{GDBN} runs.  When @value{GDBN}
+is in the standard mode, using these commands will automatically switch
+in the TUI mode.
+
+@table @code
+@item info win
+@kindex info win
+List and give the size of all displayed windows.
+
+@item layout next
+@kindex layout next
+Display the next layout.
+
+@item layout prev
+@kindex layout prev
+Display the previous layout.
+
+@item layout src
+@kindex layout src
+Display the source window only.
+
+@item layout asm
+@kindex layout asm
+Display the assembly window only.
+
+@item layout split
+@kindex layout split
+Display the source and assembly window.
+
+@item layout regs
+@kindex layout regs
+Display the register window together with the source or assembly window.
+
+@item focus next | prev | src | asm | regs | split
+@kindex focus
+Set the focus to the named window.
+This command allows to change the active window so that scrolling keys
+can be affected to another window.
+
+@item refresh
+@kindex refresh
+Refresh the screen.  This is similar to using @key{C-L} key.
+
+@item update
+@kindex update
+Update the source window and the current execution point.
+
+@item winheight @var{name} +@var{count}
+@itemx winheight @var{name} -@var{count}
+@kindex winheight
+Change the height of the window @var{name} by @var{count}
+lines.  Positive counts increase the height, while negative counts
+decrease it.
+
+@end table
+
+@node TUI Configuration
+@section TUI configuration variables
+@cindex TUI configuration variables
+
+The TUI has several configuration variables that control the
+appearance of windows on the terminal.
+
+@table @code
+@item set tui border-kind @var{kind}
+@kindex set tui border-kind
+Select the border appearance for the source, assembly and register windows.
+The possible values are the following:
+@table @code
+@item space
+Use a space character to draw the border.
+
+@item ascii
+Use ascii characters + - and | to draw the border.
+
+@item acs
+Use the Alternate Character Set to draw the border.  The border is
+drawn using character line graphics if the terminal supports them.
+
+@end table
+
+@item set tui active-border-mode @var{mode}
+@kindex set tui active-border-mode
+Select the attributes to display the border of the active window.
+The possible values are @code{normal}, @code{standout}, @code{reverse},
+@code{half}, @code{half-standout}, @code{bold} and @code{bold-standout}.
+
+@item set tui border-mode @var{mode}
+@kindex set tui border-mode
+Select the attributes to display the border of other windows.
+The @var{mode} can be one of the following:
+@table @code
+@item normal
+Use normal attributes to display the border.
+
+@item standout
+Use standout mode.
+
+@item reverse
+Use reverse video mode.
+
+@item half
+Use half bright mode.
+
+@item half-standout
+Use half bright and standout mode.
+
+@item bold
+Use extra bright or bold mode.
+
+@item bold-standout
+Use extra bright or bold and standout mode.
+
+@end table
+
+@end table
+
+@node Emacs
+@chapter Using @value{GDBN} under @sc{gnu} Emacs
+
+@cindex Emacs
+@cindex @sc{gnu} Emacs
+A special interface allows you to use @sc{gnu} Emacs to view (and
+edit) the source files for the program you are debugging with
+@value{GDBN}.
+
+To use this interface, use the command @kbd{M-x gdb} in Emacs.  Give the
+executable file you want to debug as an argument.  This command starts
+@value{GDBN} as a subprocess of Emacs, with input and output through a newly
+created Emacs buffer.
+@c (Do not use the @code{-tui} option to run @value{GDBN} from Emacs.)
+
+Using @value{GDBN} under Emacs is just like using @value{GDBN} normally except for two
+things:
+
+@itemize @bullet
+@item
+All ``terminal'' input and output goes through the Emacs buffer.
+@end itemize
+
+This applies both to @value{GDBN} commands and their output, and to the input
+and output done by the program you are debugging.
+
+This is useful because it means that you can copy the text of previous
+commands and input them again; you can even use parts of the output
+in this way.
+
+All the facilities of Emacs' Shell mode are available for interacting
+with your program.  In particular, you can send signals the usual
+way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
+stop.
+
+@itemize @bullet
+@item
+@value{GDBN} displays source code through Emacs.
+@end itemize
+
+Each time @value{GDBN} displays a stack frame, Emacs automatically finds the
+source file for that frame and puts an arrow (@samp{=>}) at the
+left margin of the current line.  Emacs uses a separate buffer for
+source display, and splits the screen to show both your @value{GDBN} session
+and the source.
+
+Explicit @value{GDBN} @code{list} or search commands still produce output as
+usual, but you probably have no reason to use them from Emacs.
+
+@quotation
+@emph{Warning:} If the directory where your program resides is not your
+current directory, it can be easy to confuse Emacs about the location of
+the source files, in which case the auxiliary display buffer does not
+appear to show your source.  @value{GDBN} can find programs by searching your
+environment's @code{PATH} variable, so the @value{GDBN} input and output
+session proceeds normally; but Emacs does not get enough information
+back from @value{GDBN} to locate the source files in this situation.  To
+avoid this problem, either start @value{GDBN} mode from the directory where
+your program resides, or specify an absolute file name when prompted for the
+@kbd{M-x gdb} argument.
+
+A similar confusion can result if you use the @value{GDBN} @code{file} command to
+switch to debugging a program in some other location, from an existing
+@value{GDBN} buffer in Emacs.
+@end quotation
+
+By default, @kbd{M-x gdb} calls the program called @file{gdb}.  If
+you need to call @value{GDBN} by a different name (for example, if you keep
+several configurations around, with different names) you can set the
+Emacs variable @code{gdb-command-name}; for example,
+
+@smallexample
+(setq gdb-command-name "mygdb")
+@end smallexample
+
+@noindent
+(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
+in your @file{.emacs} file) makes Emacs call the program named
+``@code{mygdb}'' instead.
+
+In the @value{GDBN} I/O buffer, you can use these special Emacs commands in
+addition to the standard Shell mode commands:
+
+@table @kbd
+@item C-h m
+Describe the features of Emacs' @value{GDBN} Mode.
+
+@item M-s
+Execute to another source line, like the @value{GDBN} @code{step} command; also
+update the display window to show the current file and location.
+
+@item M-n
+Execute to next source line in this function, skipping all function
+calls, like the @value{GDBN} @code{next} command.  Then update the display window
+to show the current file and location.
+
+@item M-i
+Execute one instruction, like the @value{GDBN} @code{stepi} command; update
+display window accordingly.
+
+@item M-x gdb-nexti
+Execute to next instruction, using the @value{GDBN} @code{nexti} command; update
+display window accordingly.
+
+@item C-c C-f
+Execute until exit from the selected stack frame, like the @value{GDBN}
+@code{finish} command.
+
+@item M-c
+Continue execution of your program, like the @value{GDBN} @code{continue}
+command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
+
+@item M-u
+Go up the number of frames indicated by the numeric argument
+(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
+like the @value{GDBN} @code{up} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
+
+@item M-d
+Go down the number of frames indicated by the numeric argument, like the
+@value{GDBN} @code{down} command.
+
+@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
+
+@item C-x &
+Read the number where the cursor is positioned, and insert it at the end
+of the @value{GDBN} I/O buffer.  For example, if you wish to disassemble code
+around an address that was displayed earlier, type @kbd{disassemble};
+then move the cursor to the address display, and pick up the
+argument for @code{disassemble} by typing @kbd{C-x &}.
+
+You can customize this further by defining elements of the list
+@code{gdb-print-command}; once it is defined, you can format or
+otherwise process numbers picked up by @kbd{C-x &} before they are
+inserted.  A numeric argument to @kbd{C-x &} indicates that you
+wish special formatting, and also acts as an index to pick an element of the
+list.  If the list element is a string, the number to be inserted is
+formatted using the Emacs function @code{format}; otherwise the number
+is passed as an argument to the corresponding list element.
+@end table
+
+In any source file, the Emacs command @kbd{C-x SPC} (@code{gdb-break})
+tells @value{GDBN} to set a breakpoint on the source line point is on.
+
+If you accidentally delete the source-display buffer, an easy way to get
+it back is to type the command @code{f} in the @value{GDBN} buffer, to
+request a frame display; when you run under Emacs, this recreates
+the source buffer if necessary to show you the context of the current
+frame.
+
+The source files displayed in Emacs are in ordinary Emacs buffers
+which are visiting the source files in the usual way.  You can edit
+the files with these buffers if you wish; but keep in mind that @value{GDBN}
+communicates with Emacs in terms of line numbers.  If you add or
+delete lines from the text, the line numbers that @value{GDBN} knows cease
+to correspond properly with the code.
+
+@c The following dropped because Epoch is nonstandard.  Reactivate
+@c if/when v19 does something similar. ---doc@cygnus.com 19dec1990
+@ignore
+@kindex Emacs Epoch environment
+@kindex Epoch
+@kindex inspect
+
+Version 18 of @sc{gnu} Emacs has a built-in window system
+called the @code{epoch}
+environment.  Users of this environment can use a new command,
+@code{inspect} which performs identically to @code{print} except that
+each value is printed in its own window.
+@end ignore
+
+
+@node GDB/MI
+@chapter The @sc{gdb/mi} Interface
+
+@unnumberedsec Function and Purpose
+
+@cindex @sc{gdb/mi}, its purpose
+@sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN}.  It is
+specifically intended to support the development of systems which use
+the debugger as just one small component of a larger system.
+
+This chapter is a specification of the @sc{gdb/mi} interface.  It is written
+in the form of a reference manual.
+
+Note that @sc{gdb/mi} is still under construction, so some of the
+features described below are incomplete and subject to change.
+
+@unnumberedsec Notation and Terminology
+
+@cindex notational conventions, for @sc{gdb/mi}
+This chapter uses the following notation:
+
+@itemize @bullet
+@item
+@code{|} separates two alternatives.
+
+@item
+@code{[ @var{something} ]} indicates that @var{something} is optional:
+it may or may not be given.
+
+@item
+@code{( @var{group} )*} means that @var{group} inside the parentheses
+may repeat zero or more times.
+
+@item
+@code{( @var{group} )+} means that @var{group} inside the parentheses
+may repeat one or more times.
+
+@item
+@code{"@var{string}"} means a literal @var{string}.
+@end itemize
+
+@ignore
+@heading Dependencies
+@end ignore
+
+@heading Acknowledgments
+
+In alphabetic order: Andrew Cagney, Fernando Nasser, Stan Shebs and
+Elena Zannoni.
+
+@menu
+* GDB/MI Command Syntax::
+* GDB/MI Compatibility with CLI::
+* GDB/MI Output Records::
+* GDB/MI Command Description Format::
+* GDB/MI Breakpoint Table Commands::
+* GDB/MI Data Manipulation::
+* GDB/MI Program Control::
+* GDB/MI Miscellaneous Commands::
+@ignore
+* GDB/MI Kod Commands::
+* GDB/MI Memory Overlay Commands::
+* GDB/MI Signal Handling Commands::
+@end ignore
+* GDB/MI Stack Manipulation::
+* GDB/MI Symbol Query::
+* GDB/MI Target Manipulation::
+* GDB/MI Thread Commands::
+* GDB/MI Tracepoint Commands::
+* GDB/MI Variable Objects::
+@end menu
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Command Syntax
+@section @sc{gdb/mi} Command Syntax
+
+@menu
+* GDB/MI Input Syntax::
+* GDB/MI Output Syntax::
+* GDB/MI Simple Examples::
+@end menu
+
+@node GDB/MI Input Syntax
+@subsection @sc{gdb/mi} Input Syntax
+
+@cindex input syntax for @sc{gdb/mi}
+@cindex @sc{gdb/mi}, input syntax
+@table @code
+@item @var{command} @expansion{}
+@code{@var{cli-command} | @var{mi-command}}
+
+@item @var{cli-command} @expansion{}
+@code{[ @var{token} ] @var{cli-command} @var{nl}}, where
+@var{cli-command} is any existing @value{GDBN} CLI command.
+
+@item @var{mi-command} @expansion{}
+@code{[ @var{token} ] "-" @var{operation} ( " " @var{option} )*
+@code{[} " --" @code{]} ( " " @var{parameter} )* @var{nl}}
+
+@item @var{token} @expansion{}
+"any sequence of digits"
+
+@item @var{option} @expansion{}
+@code{"-" @var{parameter} [ " " @var{parameter} ]}
+
+@item @var{parameter} @expansion{}
+@code{@var{non-blank-sequence} | @var{c-string}}
+
+@item @var{operation} @expansion{}
+@emph{any of the operations described in this chapter}
+
+@item @var{non-blank-sequence} @expansion{}
+@emph{anything, provided it doesn't contain special characters such as
+"-", @var{nl}, """ and of course " "}
+
+@item @var{c-string} @expansion{}
+@code{""" @var{seven-bit-iso-c-string-content} """}
+
+@item @var{nl} @expansion{}
+@code{CR | CR-LF}
+@end table
+
+@noindent
+Notes:
+
+@itemize @bullet
+@item
+The CLI commands are still handled by the @sc{mi} interpreter; their
+output is described below.
+
+@item
+The @code{@var{token}}, when present, is passed back when the command
+finishes.
+
+@item
+Some @sc{mi} commands accept optional arguments as part of the parameter
+list.  Each option is identified by a leading @samp{-} (dash) and may be
+followed by an optional argument parameter.  Options occur first in the
+parameter list and can be delimited from normal parameters using
+@samp{--} (this is useful when some parameters begin with a dash).
+@end itemize
+
+Pragmatics:
+
+@itemize @bullet
+@item
+We want easy access to the existing CLI syntax (for debugging).
+
+@item
+We want it to be easy to spot a @sc{mi} operation.
+@end itemize
+
+@node GDB/MI Output Syntax
+@subsection @sc{gdb/mi} Output Syntax
+
+@cindex output syntax of @sc{gdb/mi}
+@cindex @sc{gdb/mi}, output syntax
+The output from @sc{gdb/mi} consists of zero or more out-of-band records
+followed, optionally, by a single result record.  This result record
+is for the most recent command.  The sequence of output records is
+terminated by @samp{(@value{GDBP})}.
+
+If an input command was prefixed with a @code{@var{token}} then the
+corresponding output for that command will also be prefixed by that same
+@var{token}.
+
+@table @code
+@item @var{output} @expansion{}
+@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}}
+
+@item @var{result-record} @expansion{}
+@code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}}
+
+@item @var{out-of-band-record} @expansion{}
+@code{@var{async-record} | @var{stream-record}}
+
+@item @var{async-record} @expansion{}
+@code{@var{exec-async-output} | @var{status-async-output} | @var{notify-async-output}}
+
+@item @var{exec-async-output} @expansion{}
+@code{[ @var{token} ] "*" @var{async-output}}
+
+@item @var{status-async-output} @expansion{}
+@code{[ @var{token} ] "+" @var{async-output}}
+
+@item @var{notify-async-output} @expansion{}
+@code{[ @var{token} ] "=" @var{async-output}}
+
+@item @var{async-output} @expansion{}
+@code{@var{async-class} ( "," @var{result} )* @var{nl}}
+
+@item @var{result-class} @expansion{}
+@code{"done" | "running" | "connected" | "error" | "exit"}
+
+@item @var{async-class} @expansion{}
+@code{"stopped" | @var{others}} (where @var{others} will be added
+depending on the needs---this is still in development).
+
+@item @var{result} @expansion{}
+@code{ @var{variable} "=" @var{value}}
+
+@item @var{variable} @expansion{}
+@code{ @var{string} }
+
+@item @var{value} @expansion{}
+@code{ @var{const} | @var{tuple} | @var{list} }
+
+@item @var{const} @expansion{}
+@code{@var{c-string}}
+
+@item @var{tuple} @expansion{}
+@code{ "@{@}" | "@{" @var{result} ( "," @var{result} )* "@}" }
+
+@item @var{list} @expansion{}
+@code{ "[]" | "[" @var{value} ( "," @var{value} )* "]" | "["
+@var{result} ( "," @var{result} )* "]" }
+
+@item @var{stream-record} @expansion{}
+@code{@var{console-stream-output} | @var{target-stream-output} | @var{log-stream-output}}
+
+@item @var{console-stream-output} @expansion{}
+@code{"~" @var{c-string}}
+
+@item @var{target-stream-output} @expansion{}
+@code{"@@" @var{c-string}}
+
+@item @var{log-stream-output} @expansion{}
+@code{"&" @var{c-string}}
+
+@item @var{nl} @expansion{}
+@code{CR | CR-LF}
+
+@item @var{token} @expansion{}
+@emph{any sequence of digits}.
+@end table
+
+@noindent
+Notes:
+
+@itemize @bullet
+@item
+All output sequences end in a single line containing a period.
+
+@item
+The @code{@var{token}} is from the corresponding request.  If an execution
+command is interrupted by the @samp{-exec-interrupt} command, the
+@var{token} associated with the @samp{*stopped} message is the one of the
+original execution command, not the one of the interrupt command.
+
+@item
+@cindex status output in @sc{gdb/mi}
+@var{status-async-output} contains on-going status information about the
+progress of a slow operation.  It can be discarded.  All status output is
+prefixed by @samp{+}.
+
+@item
+@cindex async output in @sc{gdb/mi}
+@var{exec-async-output} contains asynchronous state change on the target
+(stopped, started, disappeared).  All async output is prefixed by
+@samp{*}.
+
+@item
+@cindex notify output in @sc{gdb/mi}
+@var{notify-async-output} contains supplementary information that the
+client should handle (e.g., a new breakpoint information).  All notify
+output is prefixed by @samp{=}.
+
+@item
+@cindex console output in @sc{gdb/mi}
+@var{console-stream-output} is output that should be displayed as is in the
+console.  It is the textual response to a CLI command.  All the console
+output is prefixed by @samp{~}.
+
+@item
+@cindex target output in @sc{gdb/mi}
+@var{target-stream-output} is the output produced by the target program.
+All the target output is prefixed by @samp{@@}.
+
+@item
+@cindex log output in @sc{gdb/mi}
+@var{log-stream-output} is output text coming from @value{GDBN}'s internals, for
+instance messages that should be displayed as part of an error log.  All
+the log output is prefixed by @samp{&}.
+
+@item
+@cindex list output in @sc{gdb/mi}
+New @sc{gdb/mi} commands should only output @var{lists} containing
+@var{values}.
+
+
+@end itemize
+
+@xref{GDB/MI Stream Records, , @sc{gdb/mi} Stream Records}, for more
+details about the various output records.
+
+@node GDB/MI Simple Examples
+@subsection Simple Examples of @sc{gdb/mi} Interaction
+@cindex @sc{gdb/mi}, simple examples
+
+This subsection presents several simple examples of interaction using
+the @sc{gdb/mi} interface.  In these examples, @samp{->} means that the
+following line is passed to @sc{gdb/mi} as input, while @samp{<-} means
+the output received from @sc{gdb/mi}.
+
+@subsubheading Target Stop
+@c Ummm... There is no "-stop" command. This assumes async, no?
+Here's an example of stopping the inferior process:
+
+@smallexample
+-> -stop
+<- (@value{GDBP})
+@end smallexample
+
+@noindent
+and later:
+
+@smallexample
+<- *stop,reason="stop",address="0x123",source="a.c:123"
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading Simple CLI Command
+
+Here's an example of a simple CLI command being passed through
+@sc{gdb/mi} and on to the CLI.
+
+@smallexample
+-> print 1+2
+<- &"print 1+2\n"
+<- ~"$1 = 3\n"
+<- ^done
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading Command With Side Effects
+
+@smallexample
+-> -symbol-file xyz.exe
+<- *breakpoint,nr="3",address="0x123",source="a.c:123"
+<- (@value{GDBP})
+@end smallexample
+
+@subsubheading A Bad Command
+
+Here's what happens if you pass a non-existent command:
+
+@smallexample
+-> -rubbish
+<- ^error,msg="Undefined MI command: rubbish"
+<- (@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Compatibility with CLI
+@section @sc{gdb/mi} Compatibility with CLI
+
+@cindex compatibility, @sc{gdb/mi} and CLI
+@cindex @sc{gdb/mi}, compatibility with CLI
+To help users familiar with @value{GDBN}'s existing CLI interface, @sc{gdb/mi}
+accepts existing CLI commands.  As specified by the syntax, such
+commands can be directly entered into the @sc{gdb/mi} interface and @value{GDBN} will
+respond.
+
+This mechanism is provided as an aid to developers of @sc{gdb/mi}
+clients and not as a reliable interface into the CLI.  Since the command
+is being interpreteted in an environment that assumes @sc{gdb/mi}
+behaviour, the exact output of such commands is likely to end up being
+an un-supported hybrid of @sc{gdb/mi} and CLI output.
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Output Records
+@section @sc{gdb/mi} Output Records
+
+@menu
+* GDB/MI Result Records::
+* GDB/MI Stream Records::
+* GDB/MI Out-of-band Records::
+@end menu
+
+@node GDB/MI Result Records
+@subsection @sc{gdb/mi} Result Records
+
+@cindex result records in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, result records
+In addition to a number of out-of-band notifications, the response to a
+@sc{gdb/mi} command includes one of the following result indications:
+
+@table @code
+@findex ^done
+@item "^done" [ "," @var{results} ]
+The synchronous operation was successful, @code{@var{results}} are the return
+values.
+
+@item "^running"
+@findex ^running
+@c Is this one correct?  Should it be an out-of-band notification?
+The asynchronous operation was successfully started.  The target is
+running.
+
+@item "^error" "," @var{c-string}
+@findex ^error
+The operation failed.  The @code{@var{c-string}} contains the corresponding
+error message.
+@end table
+
+@node GDB/MI Stream Records
+@subsection @sc{gdb/mi} Stream Records
+
+@cindex @sc{gdb/mi}, stream records
+@cindex stream records in @sc{gdb/mi}
+@value{GDBN} internally maintains a number of output streams: the console, the
+target, and the log.  The output intended for each of these streams is
+funneled through the @sc{gdb/mi} interface using @dfn{stream records}.
+
+Each stream record begins with a unique @dfn{prefix character} which
+identifies its stream (@pxref{GDB/MI Output Syntax, , @sc{gdb/mi} Output
+Syntax}).  In addition to the prefix, each stream record contains a
+@code{@var{string-output}}.  This is either raw text (with an implicit new
+line) or a quoted C string (which does not contain an implicit newline).
+
+@table @code
+@item "~" @var{string-output}
+The console output stream contains text that should be displayed in the
+CLI console window.  It contains the textual responses to CLI commands.
+
+@item "@@" @var{string-output}
+The target output stream contains any textual output from the running
+target.
+
+@item "&" @var{string-output}
+The log stream contains debugging messages being produced by @value{GDBN}'s
+internals.
+@end table
+
+@node GDB/MI Out-of-band Records
+@subsection @sc{gdb/mi} Out-of-band Records
+
+@cindex out-of-band records in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, out-of-band records
+@dfn{Out-of-band} records are used to notify the @sc{gdb/mi} client of
+additional changes that have occurred.  Those changes can either be a
+consequence of @sc{gdb/mi} (e.g., a breakpoint modified) or a result of
+target activity (e.g., target stopped).
+
+The following is a preliminary list of possible out-of-band records.
+
+@table @code
+@item "*" "stop"
+@end table
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Command Description Format
+@section @sc{gdb/mi} Command Description Format
+
+The remaining sections describe blocks of commands.  Each block of
+commands is laid out in a fashion similar to this section.
+
+Note the the line breaks shown in the examples are here only for
+readability.  They don't appear in the real output.
+Also note that the commands with a non-available example (N.A.@:) are
+not yet implemented.
+
+@subheading Motivation
+
+The motivation for this collection of commands.
+
+@subheading Introduction
+
+A brief introduction to this collection of commands as a whole.
+
+@subheading Commands
+
+For each command in the block, the following is described:
+
+@subsubheading Synopsis
+
+@smallexample
+ -command @var{args}@dots{}
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} CLI command.
+
+@subsubheading Result
+
+@subsubheading Out-of-band
+
+@subsubheading Notes
+
+@subsubheading Example
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Breakpoint Table Commands
+@section @sc{gdb/mi} Breakpoint table commands
+
+@cindex breakpoint commands for @sc{gdb/mi}
+@cindex @sc{gdb/mi}, breakpoint commands
+This section documents @sc{gdb/mi} commands for manipulating
+breakpoints.
+
+@subheading The @code{-break-after} Command
+@findex -break-after
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-after @var{number} @var{count}
+@end smallexample
+
+The breakpoint number @var{number} is not in effect until it has been
+hit @var{count} times.  To see how this is reflected in the output of
+the @samp{-break-list} command, see the description of the
+@samp{-break-list} command below.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{ignore}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x000100d0",file="hello.c",line="5"@}
+(@value{GDBP})
+-break-after 1 3
+~
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0",
+ignore="3"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@subheading The @code{-break-catch} Command
+@findex -break-catch
+
+@subheading The @code{-break-commands} Command
+@findex -break-commands
+@end ignore
+
+
+@subheading The @code{-break-condition} Command
+@findex -break-condition
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-condition @var{number} @var{expr}
+@end smallexample
+
+Breakpoint @var{number} will stop the program only if the condition in
+@var{expr} is true.  The condition becomes part of the
+@samp{-break-list} output (see the description of the @samp{-break-list}
+command below).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{condition}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-condition 1 1
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",cond="1",
+times="0",ignore="3"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-delete} Command
+@findex -break-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-delete ( @var{breakpoint} )+
+@end smallexample
+
+Delete the breakpoint(s) whose number(s) are specified in the argument
+list.  This is obviously reflected in the breakpoint list.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{delete}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-delete 1
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-disable} Command
+@findex -break-disable
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-disable ( @var{breakpoint} )+
+@end smallexample
+
+Disable the named @var{breakpoint}(s).  The field @samp{enabled} in the
+break list is now set to @samp{n} for the named @var{breakpoint}(s).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{disable}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-disable 2
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="n",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-enable} Command
+@findex -break-enable
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-enable ( @var{breakpoint} )+
+@end smallexample
+
+Enable (previously disabled) @var{breakpoint}(s).
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{enable}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-enable 2
+^done
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-info} Command
+@findex -break-info
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-info @var{breakpoint}
+@end smallexample
+
+@c REDUNDANT???
+Get information about a single breakpoint.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{info break @var{breakpoint}}.
+
+@subsubheading Example
+N.A.
+
+@subheading The @code{-break-insert} Command
+@findex -break-insert
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-insert [ -t ] [ -h ] [ -r ]
+    [ -c @var{condition} ] [ -i @var{ignore-count} ]
+    [ -p @var{thread} ] [ @var{line} | @var{addr} ]
+@end smallexample
+
+@noindent
+If specified, @var{line}, can be one of:
+
+@itemize @bullet
+@item function
+@c @item +offset
+@c @item -offset
+@c @item linenum
+@item filename:linenum
+@item filename:function
+@item *address
+@end itemize
+
+The possible optional parameters of this command are:
+
+@table @samp
+@item -t
+Insert a tempoary breakpoint.
+@item -h
+Insert a hardware breakpoint.
+@item -c @var{condition}
+Make the breakpoint conditional on @var{condition}.
+@item -i @var{ignore-count}
+Initialize the @var{ignore-count}.
+@item -r
+Insert a regular breakpoint in all the functions whose names match the
+given regular expression.  Other flags are not applicable to regular
+expresson.
+@end table
+
+@subsubheading Result
+
+The result is in the form:
+
+@smallexample
+ ^done,bkptno="@var{number}",func="@var{funcname}",
+  file="@var{filename}",line="@var{lineno}"
+@end smallexample
+
+@noindent
+where @var{number} is the @value{GDBN} number for this breakpoint, @var{funcname}
+is the name of the function where the breakpoint was inserted,
+@var{filename} is the name of the source file which contains this
+function, and @var{lineno} is the source line number within that file.
+
+Note: this format is open to change.
+@c An out-of-band breakpoint instead of part of the result?
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{break}, @samp{tbreak},
+@samp{hbreak}, @samp{thbreak}, and @samp{rbreak}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
+(@value{GDBP})
+-break-insert -t foo
+^done,bkpt=@{number="2",addr="0x00010774",file="recursive2.c",line="11"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x0001072c", func="main",file="recursive2.c",line="4",times="0"@},
+bkpt=@{number="2",type="breakpoint",disp="del",enabled="y",
+addr="0x00010774",func="foo",file="recursive2.c",line="11",times="0"@}]@}
+(@value{GDBP})
+-break-insert -r foo.*
+~int foo(int, int);
+^done,bkpt=@{number="3",addr="0x00010774",file="recursive2.c",line="11"@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-list} Command
+@findex -break-list
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-list
+@end smallexample
+
+Displays the list of inserted breakpoints, showing the following fields:
+
+@table @samp
+@item Number
+number of the breakpoint
+@item Type
+type of the breakpoint: @samp{breakpoint} or @samp{watchpoint}
+@item Disposition
+should the breakpoint be deleted or disabled when it is hit: @samp{keep}
+or @samp{nokeep}
+@item Enabled
+is the breakpoint enabled or no: @samp{y} or @samp{n}
+@item Address
+memory location at which the breakpoint is set
+@item What
+logical location of the breakpoint, expressed by function name, file
+name, line number
+@item Times
+number of times the breakpoint has been hit
+@end table
+
+If there are no breakpoints or watchpoints, the @code{BreakpointTable}
+@code{body} field is an empty list.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info break}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x000100d0",func="main",file="hello.c",line="5",times="0"@},
+bkpt=@{number="2",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010114",func="foo",file="hello.c",line="13",times="0"@}]@}
+(@value{GDBP})
+@end smallexample
+
+Here's an example of the result when there are no breakpoints:
+
+@smallexample
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="0",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[]@}
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-break-watch} Command
+@findex -break-watch
+
+@subsubheading Synopsis
+
+@smallexample
+ -break-watch [ -a | -r ]
+@end smallexample
+
+Create a watchpoint.  With the @samp{-a} option it will create an
+@dfn{access} watchpoint, i.e. a watchpoint that triggers either on a
+read from or on a write to the memory location.  With the @samp{-r}
+option, the watchpoint created is a @dfn{read} watchpoint, i.e. it will
+trigger only when the memory location is accessed for reading.  Without
+either of the options, the watchpoint created is a regular watchpoint,
+i.e. it will trigger when the memory location is accessed for writing.
+@xref{Set Watchpoints, , Setting watchpoints}.
+
+Note that @samp{-break-list} will report a single list of watchpoints and
+breakpoints inserted.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{watch}, @samp{awatch}, and
+@samp{rwatch}.
+
+@subsubheading Example
+
+Setting a watchpoint on a variable in the @code{main} function:
+
+@smallexample
+(@value{GDBP})
+-break-watch x
+^done,wpt=@{number="2",exp="x"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",wpt=@{number="2",exp="x"@},
+value=@{old="-268439212",new="55"@},
+frame=@{func="main",args=[],file="recursive2.c",line="5"@}
+(@value{GDBP})
+@end smallexample
+
+Setting a watchpoint on a variable local to a function.  @value{GDBN} will stop
+the program execution twice: first for the variable changing value, then
+for the watchpoint going out of scope.
+
+@smallexample
+(@value{GDBP})
+-break-watch C
+^done,wpt=@{number="5",exp="C"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",
+wpt=@{number="5",exp="C"@},value=@{old="-276895068",new="3"@},
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-scope",wpnum="5",
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+@end smallexample
+
+Listing breakpoints and watchpoints, at different points in the program
+execution.  Note that once the watchpoint goes out of scope, it is
+deleted.
+
+@smallexample
+(@value{GDBP})
+-break-watch C
+^done,wpt=@{number="2",exp="C"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
+bkpt=@{number="2",type="watchpoint",disp="keep",
+enabled="y",addr="",what="C",times="0"@}]@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-trigger",wpt=@{number="2",exp="C"@},
+value=@{old="-276895068",new="3"@},
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="13"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="2",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@},
+bkpt=@{number="2",type="watchpoint",disp="keep",
+enabled="y",addr="",what="C",times="-5"@}]@}
+(@value{GDBP})
+-exec-continue
+^running
+^done,reason="watchpoint-scope",wpnum="2",
+frame=@{func="callee3",args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+-break-list
+^done,BreakpointTable=@{nr_rows="1",nr_cols="6",
+hdr=[@{width="3",alignment="-1",col_name="number",colhdr="Num"@},
+@{width="14",alignment="-1",col_name="type",colhdr="Type"@},
+@{width="4",alignment="-1",col_name="disp",colhdr="Disp"@},
+@{width="3",alignment="-1",col_name="enabled",colhdr="Enb"@},
+@{width="10",alignment="-1",col_name="addr",colhdr="Address"@},
+@{width="40",alignment="2",col_name="what",colhdr="What"@}],
+body=[bkpt=@{number="1",type="breakpoint",disp="keep",enabled="y",
+addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8",times="1"@}]@}
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Data Manipulation
+@section @sc{gdb/mi} Data Manipulation
+
+@cindex data manipulation, in @sc{gdb/mi}
+@cindex @sc{gdb/mi}, data manipulation
+This section describes the @sc{gdb/mi} commands that manipulate data:
+examine memory and registers, evaluate expressions, etc.
+
+@c REMOVED FROM THE INTERFACE.
+@c @subheading -data-assign
+@c Change the value of a program variable. Plenty of side effects.
+@c @subsubheading GDB command
+@c set variable
+@c @subsubheading Example
+@c N.A.
+
+@subheading The @code{-data-disassemble} Command
+@findex -data-disassemble
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-disassemble
+    [ -s @var{start-addr} -e @var{end-addr} ]
+  | [ -f @var{filename} -l @var{linenum} [ -n @var{lines} ] ]
+  -- @var{mode}
+@end smallexample
+
+@noindent
+Where:
+
+@table @samp
+@item @var{start-addr}
+is the beginning address (or @code{$pc})
+@item @var{end-addr}
+is the end address
+@item @var{filename}
+is the name of the file to disassemble
+@item @var{linenum}
+is the line number to disassemble around
+@item @var{lines}
+is the the number of disassembly lines to be produced.  If it is -1,
+the whole function will be disassembled, in case no @var{end-addr} is
+specified.  If @var{end-addr} is specified as a non-zero value, and
+@var{lines} is lower than the number of disassembly lines between
+@var{start-addr} and @var{end-addr}, only @var{lines} lines are
+displayed; if @var{lines} is higher than the number of lines between
+@var{start-addr} and @var{end-addr}, only the lines up to @var{end-addr}
+are displayed.
+@item @var{mode}
+is either 0 (meaning only disassembly) or 1 (meaning mixed source and
+disassembly).
+@end table
+
+@subsubheading Result
+
+The output for each instruction is composed of four fields:
+
+@itemize @bullet
+@item Address
+@item Func-name
+@item Offset
+@item Instruction
+@end itemize
+
+Note that whatever included in the instruction field, is not manipulated
+directely by @sc{gdb/mi}, i.e. it is not possible to adjust its format.
+
+@subsubheading @value{GDBN} Command
+
+There's no direct mapping from this command to the CLI.
+
+@subsubheading Example
+
+Disassemble from the current value of @code{$pc} to @code{$pc + 20}:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -s $pc -e "$pc + 20" -- 0
+^done,
+asm_insns=[
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov  2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi  %hi(0x11800), %o2"@},
+@{address="0x000107c8",func-name="main",offset="12",
+inst="or  %o2, 0x140, %o1\t! 0x11940 <_lib_version+8>"@},
+@{address="0x000107cc",func-name="main",offset="16",
+inst="sethi  %hi(0x11800), %o2"@},
+@{address="0x000107d0",func-name="main",offset="20",
+inst="or  %o2, 0x168, %o4\t! 0x11968 <_lib_version+48>"@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble the whole @code{main} function.  Line 32 is part of
+@code{main}.
+
+@smallexample
+-data-disassemble -f basics.c -l 32 -- 0
+^done,asm_insns=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save  %sp, -112, %sp"@},
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov   2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi %hi(0x11800), %o2"@},
+[@dots{}]
+@{address="0x0001081c",func-name="main",offset="96",inst="ret "@},
+@{address="0x00010820",func-name="main",offset="100",inst="restore "@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble 3 instructions from the start of @code{main}:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -f basics.c -l 32 -n 3 -- 0
+^done,asm_insns=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save  %sp, -112, %sp"@},
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov  2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi  %hi(0x11800), %o2"@}]
+(@value{GDBP})
+@end smallexample
+
+Disassemble 3 instructions from the start of @code{main} in mixed mode:
+
+@smallexample
+(@value{GDBP})
+-data-disassemble -f basics.c -l 32 -n 3 -- 1
+^done,asm_insns=[
+src_and_asm_line=@{line="31",
+file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
+  testsuite/gdb.mi/basics.c",line_asm_insn=[
+@{address="0x000107bc",func-name="main",offset="0",
+inst="save  %sp, -112, %sp"@}]@},
+src_and_asm_line=@{line="32",
+file="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb/ \
+  testsuite/gdb.mi/basics.c",line_asm_insn=[
+@{address="0x000107c0",func-name="main",offset="4",
+inst="mov  2, %o0"@},
+@{address="0x000107c4",func-name="main",offset="8",
+inst="sethi  %hi(0x11800), %o2"@}]@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-evaluate-expression} Command
+@findex -data-evaluate-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-evaluate-expression @var{expr}
+@end smallexample
+
+Evaluate @var{expr} as an expression.  The expression could contain an
+inferior function call.  The function call will execute synchronously.
+If the expression contains spaces, it must be enclosed in double quotes.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{print}, @samp{output}, and
+@samp{call}.  In @code{gdbtk} only, there's a corresponding
+@samp{gdb_eval} command.
+
+@subsubheading Example
+
+In the following example, the numbers that precede the commands are the
+@dfn{tokens} described in @ref{GDB/MI Command Syntax, ,@sc{gdb/mi}
+Command Syntax}.  Notice how @sc{gdb/mi} returns the same tokens in its
+output.
+
+@smallexample
+211-data-evaluate-expression A
+211^done,value="1"
+(@value{GDBP})
+311-data-evaluate-expression &A
+311^done,value="0xefffeb7c"
+(@value{GDBP})
+411-data-evaluate-expression A+3
+411^done,value="4"
+(@value{GDBP})
+511-data-evaluate-expression "A + 3"
+511^done,value="4"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-list-changed-registers} Command
+@findex -data-list-changed-registers
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-changed-registers
+@end smallexample
+
+Display a list of the registers that have changed.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} doesn't have a direct analog for this command; @code{gdbtk}
+has the corresponding command @samp{gdb_changed_register_list}.
+
+@subsubheading Example
+
+On a PPC MBX board:
+
+@smallexample
+(@value{GDBP})
+-exec-continue
+^running
+
+(@value{GDBP})
+*stopped,reason="breakpoint-hit",bkptno="1",frame=@{func="main",
+args=[],file="try.c",line="5"@}
+(@value{GDBP})
+-data-list-changed-registers
+^done,changed-registers=["0","1","2","4","5","6","7","8","9",
+"10","11","13","14","15","16","17","18","19","20","21","22","23",
+"24","25","26","27","28","30","31","64","65","66","67","69"]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-list-register-names} Command
+@findex -data-list-register-names
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-register-names [ ( @var{regno} )+ ]
+@end smallexample
+
+Show a list of register names for the current target.  If no arguments
+are given, it shows a list of the names of all the registers.  If
+integer numbers are given as arguments, it will print a list of the
+names of the registers corresponding to the arguments.  To ensure
+consistency between a register name and its number, the output list may
+include empty register names.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} does not have a command which corresponds to
+@samp{-data-list-register-names}.  In @code{gdbtk} there is a
+corresponding command @samp{gdb_regnames}.
+
+@subsubheading Example
+
+For the PPC MBX board:
+@smallexample
+(@value{GDBP})
+-data-list-register-names
+^done,register-names=["r0","r1","r2","r3","r4","r5","r6","r7",
+"r8","r9","r10","r11","r12","r13","r14","r15","r16","r17","r18",
+"r19","r20","r21","r22","r23","r24","r25","r26","r27","r28","r29",
+"r30","r31","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9",
+"f10","f11","f12","f13","f14","f15","f16","f17","f18","f19","f20",
+"f21","f22","f23","f24","f25","f26","f27","f28","f29","f30","f31",
+"", "pc","ps","cr","lr","ctr","xer"]
+(@value{GDBP})
+-data-list-register-names 1 2 3
+^done,register-names=["r1","r2","r3"]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-data-list-register-values} Command
+@findex -data-list-register-values
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-list-register-values @var{fmt} [ ( @var{regno} )*]
+@end smallexample
+
+Display the registers' contents.  @var{fmt} is the format according to
+which the registers' contents are to be returned, followed by an optional
+list of numbers specifying the registers to display.  A missing list of
+numbers indicates that the contents of all the registers must be returned.
+
+Allowed formats for @var{fmt} are:
+
+@table @code
+@item x
+Hexadecimal
+@item o
+Octal
+@item t
+Binary
+@item d
+Decimal
+@item r
+Raw
+@item N
+Natural
+@end table
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{info reg}, @samp{info
+all-reg}, and (in @code{gdbtk}) @samp{gdb_fetch_registers}.
+
+@subsubheading Example
+
+For a PPC MBX board (note: line breaks are for readability only, they
+don't appear in the actual output):
+
+@smallexample
+(@value{GDBP})
+-data-list-register-values r 64 65
+^done,register-values=[@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x00029002"@}]
+(@value{GDBP})
+-data-list-register-values x
+^done,register-values=[@{number="0",value="0xfe0043c8"@},
+@{number="1",value="0x3fff88"@},@{number="2",value="0xfffffffe"@},
+@{number="3",value="0x0"@},@{number="4",value="0xa"@},
+@{number="5",value="0x3fff68"@},@{number="6",value="0x3fff58"@},
+@{number="7",value="0xfe011e98"@},@{number="8",value="0x2"@},
+@{number="9",value="0xfa202820"@},@{number="10",value="0xfa202808"@},
+@{number="11",value="0x1"@},@{number="12",value="0x0"@},
+@{number="13",value="0x4544"@},@{number="14",value="0xffdfffff"@},
+@{number="15",value="0xffffffff"@},@{number="16",value="0xfffffeff"@},
+@{number="17",value="0xefffffed"@},@{number="18",value="0xfffffffe"@},
+@{number="19",value="0xffffffff"@},@{number="20",value="0xffffffff"@},
+@{number="21",value="0xffffffff"@},@{number="22",value="0xfffffff7"@},
+@{number="23",value="0xffffffff"@},@{number="24",value="0xffffffff"@},
+@{number="25",value="0xffffffff"@},@{number="26",value="0xfffffffb"@},
+@{number="27",value="0xffffffff"@},@{number="28",value="0xf7bfffff"@},
+@{number="29",value="0x0"@},@{number="30",value="0xfe010000"@},
+@{number="31",value="0x0"@},@{number="32",value="0x0"@},
+@{number="33",value="0x0"@},@{number="34",value="0x0"@},
+@{number="35",value="0x0"@},@{number="36",value="0x0"@},
+@{number="37",value="0x0"@},@{number="38",value="0x0"@},
+@{number="39",value="0x0"@},@{number="40",value="0x0"@},
+@{number="41",value="0x0"@},@{number="42",value="0x0"@},
+@{number="43",value="0x0"@},@{number="44",value="0x0"@},
+@{number="45",value="0x0"@},@{number="46",value="0x0"@},
+@{number="47",value="0x0"@},@{number="48",value="0x0"@},
+@{number="49",value="0x0"@},@{number="50",value="0x0"@},
+@{number="51",value="0x0"@},@{number="52",value="0x0"@},
+@{number="53",value="0x0"@},@{number="54",value="0x0"@},
+@{number="55",value="0x0"@},@{number="56",value="0x0"@},
+@{number="57",value="0x0"@},@{number="58",value="0x0"@},
+@{number="59",value="0x0"@},@{number="60",value="0x0"@},
+@{number="61",value="0x0"@},@{number="62",value="0x0"@},
+@{number="63",value="0x0"@},@{number="64",value="0xfe00a300"@},
+@{number="65",value="0x29002"@},@{number="66",value="0x202f04b5"@},
+@{number="67",value="0xfe0043b0"@},@{number="68",value="0xfe00b3e4"@},
+@{number="69",value="0x20002b03"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-data-read-memory} Command
+@findex -data-read-memory
+
+@subsubheading Synopsis
+
+@smallexample
+ -data-read-memory [ -o @var{byte-offset} ]
+   @var{address} @var{word-format} @var{word-size}
+   @var{nr-rows} @var{nr-cols} [ @var{aschar} ]
+@end smallexample
+
+@noindent
+where:
+
+@table @samp
+@item @var{address}
+An expression specifying the address of the first memory word to be
+read.  Complex expressions containing embedded white space should be
+quoted using the C convention.
+
+@item @var{word-format}
+The format to be used to print the memory words.  The notation is the
+same as for @value{GDBN}'s @code{print} command (@pxref{Output Formats,
+,Output formats}).
+
+@item @var{word-size}
+The size of each memory word in bytes.
+
+@item @var{nr-rows}
+The number of rows in the output table.
+
+@item @var{nr-cols}
+The number of columns in the output table.
+
+@item @var{aschar}
+If present, indicates that each row should include an @sc{ascii} dump.  The
+value of @var{aschar} is used as a padding character when a byte is not a
+member of the printable @sc{ascii} character set (printable @sc{ascii}
+characters are those whose code is between 32 and 126, inclusively).
+
+@item @var{byte-offset}
+An offset to add to the @var{address} before fetching memory.
+@end table
+
+This command displays memory contents as a table of @var{nr-rows} by
+@var{nr-cols} words, each word being @var{word-size} bytes.  In total,
+@code{@var{nr-rows} * @var{nr-cols} * @var{word-size}} bytes are read
+(returned as @samp{total-bytes}).  Should less than the requested number
+of bytes be returned by the target, the missing words are identified
+using @samp{N/A}.  The number of bytes read from the target is returned
+in @samp{nr-bytes} and the starting address used to read memory in
+@samp{addr}.
+
+The address of the next/previous row or page is available in
+@samp{next-row} and @samp{prev-row}, @samp{next-page} and
+@samp{prev-page}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{x}.  @code{gdbtk} has
+@samp{gdb_get_mem} memory read command.
+
+@subsubheading Example
+
+Read six bytes of memory starting at @code{bytes+6} but then offset by
+@code{-6} bytes.  Format as three rows of two columns.  One byte per
+word.  Display each word in hex.
+
+@smallexample
+(@value{GDBP})
+9-data-read-memory -o -6 -- bytes+6 x 1 3 2
+9^done,addr="0x00001390",nr-bytes="6",total-bytes="6",
+next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396",
+prev-page="0x0000138a",memory=[
+@{addr="0x00001390",data=["0x00","0x01"]@},
+@{addr="0x00001392",data=["0x02","0x03"]@},
+@{addr="0x00001394",data=["0x04","0x05"]@}]
+(@value{GDBP})
+@end smallexample
+
+Read two bytes of memory starting at address @code{shorts + 64} and
+display as a single word formatted in decimal.
+
+@smallexample
+(@value{GDBP})
+5-data-read-memory shorts+64 d 2 1 1
+5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",
+next-row="0x00001512",prev-row="0x0000150e",
+next-page="0x00001512",prev-page="0x0000150e",memory=[
+@{addr="0x00001510",data=["128"]@}]
+(@value{GDBP})
+@end smallexample
+
+Read thirty two bytes of memory starting at @code{bytes+16} and format
+as eight rows of four columns.  Include a string encoding with @samp{x}
+used as the non-printable character.
+
+@smallexample
+(@value{GDBP})
+4-data-read-memory bytes+16 x 1 8 4 x
+4^done,addr="0x000013a0",nr-bytes="32",total-bytes="32",
+next-row="0x000013c0",prev-row="0x0000139c",
+next-page="0x000013c0",prev-page="0x00001380",memory=[
+@{addr="0x000013a0",data=["0x10","0x11","0x12","0x13"],ascii="xxxx"@},
+@{addr="0x000013a4",data=["0x14","0x15","0x16","0x17"],ascii="xxxx"@},
+@{addr="0x000013a8",data=["0x18","0x19","0x1a","0x1b"],ascii="xxxx"@},
+@{addr="0x000013ac",data=["0x1c","0x1d","0x1e","0x1f"],ascii="xxxx"@},
+@{addr="0x000013b0",data=["0x20","0x21","0x22","0x23"],ascii=" !\"#"@},
+@{addr="0x000013b4",data=["0x24","0x25","0x26","0x27"],ascii="$%&'"@},
+@{addr="0x000013b8",data=["0x28","0x29","0x2a","0x2b"],ascii="()*+"@},
+@{addr="0x000013bc",data=["0x2c","0x2d","0x2e","0x2f"],ascii=",-./"@}]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-display-delete} Command
+@findex -display-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-delete @var{number}
+@end smallexample
+
+Delete the display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{delete display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-disable} Command
+@findex -display-disable
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-disable @var{number}
+@end smallexample
+
+Disable display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{disable display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-enable} Command
+@findex -display-enable
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-enable @var{number}
+@end smallexample
+
+Enable display @var{number}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{enable display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-insert} Command
+@findex -display-insert
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-insert @var{expression}
+@end smallexample
+
+Display @var{expression} every time the program stops.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-display-list} Command
+@findex -display-list
+
+@subsubheading Synopsis
+
+@smallexample
+ -display-list
+@end smallexample
+
+List the displays.  Do not show the current values.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info display}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-environment-cd} Command
+@findex -environment-cd
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-cd @var{pathdir}
+@end smallexample
+
+Set @value{GDBN}'s working directory.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{cd}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-cd /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-directory} Command
+@findex -environment-directory
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-directory [ -r ] [ @var{pathdir} ]+
+@end smallexample
+
+Add directories @var{pathdir} to beginning of search path for source files.
+If the @samp{-r} option is used, the search path is reset to the default
+search path.  If directories @var{pathdir} are supplied in addition to the 
+@samp{-r} option, the search path is first reset and then addition
+occurs as normal.
+Multiple directories may be specified, separated by blanks.  Specifying 
+multiple directories in a single command
+results in the directories added to the beginning of the
+search path in the same order they were presented in the command.
+If blanks are needed as
+part of a directory name, double-quotes should be used around
+the name.  In the command output, the path will show up separated
+by the system directory-separator character.  The directory-seperator 
+character must not be used
+in any directory name.
+If no directories are specified, the current search path is displayed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{dir}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-directory /kwikemart/marge/ezannoni/flathead-dev/devo/gdb
+^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory ""
+^done,source-path="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory -r /home/jjohnstn/src/gdb /usr/src
+^done,source-path="/home/jjohnstn/src/gdb:/usr/src:$cdir:$cwd"
+(@value{GDBP})
+-environment-directory -r
+^done,source-path="$cdir:$cwd"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-path} Command
+@findex -environment-path
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-path [ -r ] [ @var{pathdir} ]+
+@end smallexample
+
+Add directories @var{pathdir} to beginning of search path for object files.
+If the @samp{-r} option is used, the search path is reset to the original
+search path that existed at gdb start-up.  If directories @var{pathdir} are 
+supplied in addition to the 
+@samp{-r} option, the search path is first reset and then addition
+occurs as normal.
+Multiple directories may be specified, separated by blanks.  Specifying 
+multiple directories in a single command
+results in the directories added to the beginning of the
+search path in the same order they were presented in the command.
+If blanks are needed as
+part of a directory name, double-quotes should be used around
+the name.  In the command output, the path will show up separated
+by the system directory-separator character.  The directory-seperator 
+character must not be used
+in any directory name.
+If no directories are specified, the current path is displayed.
+
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{path}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-path 
+^done,path="/usr/bin"
+(@value{GDBP})
+-environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin
+^done,path="/kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb:/bin:/usr/bin"
+(@value{GDBP})
+-environment-path -r /usr/local/bin
+^done,path="/usr/local/bin:/usr/bin"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-environment-pwd} Command
+@findex -environment-pwd
+
+@subsubheading Synopsis
+
+@smallexample
+ -environment-pwd
+@end smallexample
+
+Show the current working directory.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{pwd}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-environment-pwd
+^done,cwd="/kwikemart/marge/ezannoni/flathead-dev/devo/gdb"
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Program Control
+@section @sc{gdb/mi} Program control
+
+@subsubheading Program termination
+
+As a result of execution, the inferior program can run to completion, if
+it doesn't encounter any breakpoints.  In this case the output will
+include an exit code, if the program has exited exceptionally.
+
+@subsubheading Examples
+
+@noindent
+Program exited normally:
+
+@smallexample
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="exited-normally"
+(@value{GDBP})
+@end smallexample
+
+@noindent
+Program exited exceptionally:
+
+@smallexample
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="exited",exit-code="01"
+(@value{GDBP})
+@end smallexample
+
+Another way the program can terminate is if it receives a signal such as
+@code{SIGINT}.  In this case, @sc{gdb/mi} displays this:
+
+@smallexample
+(@value{GDBP})
+*stopped,reason="exited-signalled",signal-name="SIGINT",
+signal-meaning="Interrupt"
+@end smallexample
+
+
+@subheading The @code{-exec-abort} Command
+@findex -exec-abort
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-abort
+@end smallexample
+
+Kill the inferior running program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{kill}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-exec-arguments} Command
+@findex -exec-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-arguments @var{args}
+@end smallexample
+
+Set the inferior program arguments, to be used in the next
+@samp{-exec-run}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{set args}.
+
+@subsubheading Example
+
+@c FIXME!
+Don't have one around.
+
+
+@subheading The @code{-exec-continue} Command
+@findex -exec-continue
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-continue
+@end smallexample
+
+Asynchronous command.  Resumes the execution of the inferior program
+until a breakpoint is encountered, or until the inferior exits.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} corresponding is @samp{continue}.
+
+@subsubheading Example
+
+@smallexample
+-exec-continue
+^running
+(@value{GDBP})
+@@Hello world
+*stopped,reason="breakpoint-hit",bkptno="2",frame=@{func="foo",args=[],
+file="hello.c",line="13"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-finish} Command
+@findex -exec-finish
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-finish
+@end smallexample
+
+Asynchronous command.  Resumes the execution of the inferior program
+until the current function is exited.  Displays the results returned by
+the function.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{finish}.
+
+@subsubheading Example
+
+Function returning @code{void}.
+
+@smallexample
+-exec-finish
+^running
+(@value{GDBP})
+@@hello from foo
+*stopped,reason="function-finished",frame=@{func="main",args=[],
+file="hello.c",line="7"@}
+(@value{GDBP})
+@end smallexample
+
+Function returning other than @code{void}.  The name of the internal
+@value{GDBN} variable storing the result is printed, together with the
+value itself.
+
+@smallexample
+-exec-finish
+^running
+(@value{GDBP})
+*stopped,reason="function-finished",frame=@{addr="0x000107b0",func="foo",
+args=[@{name="a",value="1"],@{name="b",value="9"@}@},
+file="recursive2.c",line="14"@},
+gdb-result-var="$1",return-value="0"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-interrupt} Command
+@findex -exec-interrupt
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-interrupt
+@end smallexample
+
+Asynchronous command.  Interrupts the background execution of the target.
+Note how the token associated with the stop message is the one for the
+execution command that has been interrupted.  The token for the interrupt
+itself only appears in the @samp{^done} output.  If the user is trying to
+interrupt a non-running program, an error message will be printed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{interrupt}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+111-exec-continue
+111^running
+
+(@value{GDBP})
+222-exec-interrupt
+222^done
+(@value{GDBP})
+111*stopped,signal-name="SIGINT",signal-meaning="Interrupt",
+frame=@{addr="0x00010140",func="foo",args=[],file="try.c",line="13"@}
+(@value{GDBP})
+
+(@value{GDBP})
+-exec-interrupt
+^error,msg="mi_cmd_exec_interrupt: Inferior not executing."
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-next} Command
+@findex -exec-next
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-next
+@end smallexample
+
+Asynchronous command.  Resumes execution of the inferior program, stopping
+when the beginning of the next source line is reached.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{next}.
+
+@subsubheading Example
+
+@smallexample
+-exec-next
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",line="8",file="hello.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-next-instruction} Command
+@findex -exec-next-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-next-instruction
+@end smallexample
+
+Asynchronous command.  Executes one machine instruction.  If the
+instruction is a function call continues until the function returns.  If
+the program stops at an instruction in the middle of a source line, the
+address will be printed as well.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{nexti}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-next-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+addr="0x000100d4",line="5",file="hello.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-return} Command
+@findex -exec-return
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-return
+@end smallexample
+
+Makes current function return immediately.  Doesn't execute the inferior.
+Displays the new current frame.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{return}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+200-break-insert callee4
+200^done,bkpt=@{number="1",addr="0x00010734",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
+(@value{GDBP})
+000-exec-run
+000^running
+(@value{GDBP})
+000*stopped,reason="breakpoint-hit",bkptno="1",
+frame=@{func="callee4",args=[],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@}
+(@value{GDBP})
+205-break-delete
+205^done
+(@value{GDBP})
+111-exec-return
+111^done,frame=@{level="0",func="callee3",
+args=[@{name="strarg",
+value="0x11940 \"A string argument.\""@}],
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="18"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-run} Command
+@findex -exec-run
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-run
+@end smallexample
+
+Asynchronous command.  Starts execution of the inferior from the
+beginning.  The inferior executes until either a breakpoint is
+encountered or the program exits.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{run}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-break-insert main
+^done,bkpt=@{number="1",addr="0x0001072c",file="recursive2.c",line="4"@}
+(@value{GDBP})
+-exec-run
+^running
+(@value{GDBP})
+*stopped,reason="breakpoint-hit",bkptno="1",
+frame=@{func="main",args=[],file="recursive2.c",line="4"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-show-arguments} Command
+@findex -exec-show-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-show-arguments
+@end smallexample
+
+Print the arguments of the program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{show args}.
+
+@subsubheading Example
+N.A.
+
+@c @subheading -exec-signal
+
+@subheading The @code{-exec-step} Command
+@findex -exec-step
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-step
+@end smallexample
+
+Asynchronous command.  Resumes execution of the inferior program, stopping
+when the beginning of the next source line is reached, if the next
+source line is not a function call.  If it is, stop at the first
+instruction of the called function.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{step}.
+
+@subsubheading Example
+
+Stepping into a function:
+
+@smallexample
+-exec-step
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{func="foo",args=[@{name="a",value="10"@},
+@{name="b",value="0"@}],file="recursive2.c",line="11"@}
+(@value{GDBP})
+@end smallexample
+
+Regular stepping:
+
+@smallexample
+-exec-step
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",line="14",file="recursive2.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-step-instruction} Command
+@findex -exec-step-instruction
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-step-instruction
+@end smallexample
+
+Asynchronous command.  Resumes the inferior which executes one machine
+instruction.  The output, once @value{GDBN} has stopped, will vary depending on
+whether we have stopped in the middle of a source line or not.  In the
+former case, the address at which the program stopped will be printed as
+well.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{stepi}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-step-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{func="foo",args=[],file="try.c",line="10"@}
+(@value{GDBP})
+-exec-step-instruction
+^running
+
+(@value{GDBP})
+*stopped,reason="end-stepping-range",
+frame=@{addr="0x000100f4",func="foo",args=[],file="try.c",line="10"@}
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-exec-until} Command
+@findex -exec-until
+
+@subsubheading Synopsis
+
+@smallexample
+ -exec-until [ @var{location} ]
+@end smallexample
+
+Asynchronous command.  Executes the inferior until the @var{location}
+specified in the argument is reached.  If there is no argument, the inferior
+executes until a source line greater than the current one is reached.
+The reason for stopping in this case will be @samp{location-reached}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{until}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-until recursive2.c:6
+^running
+(@value{GDBP})
+x = 55
+*stopped,reason="location-reached",frame=@{func="main",args=[],
+file="recursive2.c",line="6"@}
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@subheading -file-clear
+Is this going away????
+@end ignore
+
+
+@subheading The @code{-file-exec-and-symbols} Command
+@findex -file-exec-and-symbols
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-exec-and-symbols @var{file}
+@end smallexample
+
+Specify the executable file to be debugged.  This file is the one from
+which the symbol table is also read.  If no file is specified, the
+command clears the executable and symbol information.  If breakpoints
+are set when using this command with no arguments, @value{GDBN} will produce
+error messages.  Otherwise, no output is produced, except a completion
+notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-exec-and-symbols /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-exec-file} Command
+@findex -file-exec-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-exec-file @var{file}
+@end smallexample
+
+Specify the executable file to be debugged.  Unlike
+@samp{-file-exec-and-symbols}, the symbol table is @emph{not} read
+from this file.  If used without argument, @value{GDBN} clears the information
+about the executable file.  No output is produced, except a completion
+notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{exec-file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-exec-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-list-exec-sections} Command
+@findex -file-list-exec-sections
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-sections
+@end smallexample
+
+List the sections of the current executable file.
+
+@subsubheading @value{GDBN} Command
+
+The @value{GDBN} command @samp{info file} shows, among the rest, the same
+information as this command.  @code{gdbtk} has a corresponding command
+@samp{gdb_load_info}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-exec-source-file} Command
+@findex -file-list-exec-source-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-source-file
+@end smallexample
+
+List the line number, the current source file, and the absolute path 
+to the current source file for the current executable.
+
+@subsubheading @value{GDBN} Command
+
+There's no @value{GDBN} command which directly corresponds to this one.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+123-file-list-exec-source-file
+123^done,line="1",file="foo.c",fullname="/home/bar/foo.c"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-file-list-exec-source-files} Command
+@findex -file-list-exec-source-files
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-exec-source-files
+@end smallexample
+
+List the source files for the current executable.
+
+@subsubheading @value{GDBN} Command
+
+There's no @value{GDBN} command which directly corresponds to this one.
+@code{gdbtk} has an analogous command @samp{gdb_listfiles}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-shared-libraries} Command
+@findex -file-list-shared-libraries
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-shared-libraries
+@end smallexample
+
+List the shared libraries in the program.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info shared}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-list-symbol-files} Command
+@findex -file-list-symbol-files
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-list-symbol-files
+@end smallexample
+
+List symbol files.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info file} (part of it).
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-file-symbol-file} Command
+@findex -file-symbol-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -file-symbol-file @var{file}
+@end smallexample
+
+Read symbol table info from the specified @var{file} argument.  When
+used without arguments, clears @value{GDBN}'s symbol table info.  No output is
+produced, except for a completion notification.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{symbol-file}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-file-symbol-file /kwikemart/marge/ezannoni/TRUNK/mbx/hello.mbx
+^done
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Miscellaneous Commands
+@section Miscellaneous @value{GDBN} commands in @sc{gdb/mi}
+
+@c @subheading -gdb-complete
+
+@subheading The @code{-gdb-exit} Command
+@findex -gdb-exit
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-exit
+@end smallexample
+
+Exit @value{GDBN} immediately.
+
+@subsubheading @value{GDBN} Command
+
+Approximately corresponds to @samp{quit}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-exit
+@end smallexample
+
+@subheading The @code{-gdb-set} Command
+@findex -gdb-set
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-set
+@end smallexample
+
+Set an internal @value{GDBN} variable.
+@c IS THIS A DOLLAR VARIABLE? OR SOMETHING LIKE ANNOTATE ?????
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{set}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-set $foo=3
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-gdb-show} Command
+@findex -gdb-show
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-show
+@end smallexample
+
+Show the current value of a @value{GDBN} variable.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{show}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-gdb-show annotate
+^done,value="0"
+(@value{GDBP})
+@end smallexample
+
+@c @subheading -gdb-source
+
+
+@subheading The @code{-gdb-version} Command
+@findex -gdb-version
+
+@subsubheading Synopsis
+
+@smallexample
+ -gdb-version
+@end smallexample
+
+Show version information for @value{GDBN}.  Used mostly in testing.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.  @value{GDBN} by default shows this
+information when you start an interactive session.
+
+@subsubheading Example
+
+@c This example modifies the actual output from GDB to avoid overfull
+@c box in TeX.
+@smallexample
+(@value{GDBP})
+-gdb-version
+~GNU gdb 5.2.1
+~Copyright 2000 Free Software Foundation, Inc.
+~GDB is free software, covered by the GNU General Public License, and
+~you are welcome to change it and/or distribute copies of it under
+~ certain conditions.
+~Type "show copying" to see the conditions.
+~There is absolutely no warranty for GDB.  Type "show warranty" for
+~ details.
+~This GDB was configured as 
+ "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
+^done
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-interpreter-exec} Command
+@findex -interpreter-exec
+
+@subheading Synopsis
+
+@smallexample
+-interpreter-exec @var{interpreter} @var{command}
+@end smallexample
+
+Execute the specified @var{command} in the given @var{interpreter}.
+
+@subheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{interpreter-exec}.
+
+@subheading Example
+
+@smallexample
+(@value{GDBP})
+-interpreter-exec console "break main"
+&"During symbol reading, couldn't parse type; debugger out of date?.\n"
+&"During symbol reading, bad structure-type format.\n"
+~"Breakpoint 1 at 0x8074fc6: file ../../src/gdb/main.c, line 743.\n"
+^done
+(@value{GDBP})
+@end smallexample
+
+@ignore
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Kod Commands
+@section @sc{gdb/mi} Kod Commands
+
+The Kod commands are not implemented.
+
+@c @subheading -kod-info
+
+@c @subheading -kod-list
+
+@c @subheading -kod-list-object-types
+
+@c @subheading -kod-show
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Memory Overlay Commands
+@section @sc{gdb/mi} Memory Overlay Commands
+
+The memory overlay commands are not implemented.
+
+@c @subheading -overlay-auto
+
+@c @subheading -overlay-list-mapping-state
+
+@c @subheading -overlay-list-overlays
+
+@c @subheading -overlay-map
+
+@c @subheading -overlay-off
+
+@c @subheading -overlay-on
+
+@c @subheading -overlay-unmap
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Signal Handling Commands
+@section @sc{gdb/mi} Signal Handling Commands
+
+Signal handling commands are not implemented.
+
+@c @subheading -signal-handle
+
+@c @subheading -signal-list-handle-actions
+
+@c @subheading -signal-list-signal-types
+@end ignore
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Stack Manipulation
+@section @sc{gdb/mi} Stack Manipulation Commands
+
+
+@subheading The @code{-stack-info-frame} Command
+@findex -stack-info-frame
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-info-frame
+@end smallexample
+
+Get info on the current frame.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame}
+(without arguments).
+
+@subsubheading Example
+N.A.
+
+@subheading The @code{-stack-info-depth} Command
+@findex -stack-info-depth
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-info-depth [ @var{max-depth} ]
+@end smallexample
+
+Return the depth of the stack.  If the integer argument @var{max-depth}
+is specified, do not count beyond @var{max-depth} frames.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.
+
+@subsubheading Example
+
+For a stack with frame levels 0 through 11:
+
+@smallexample
+(@value{GDBP})
+-stack-info-depth
+^done,depth="12"
+(@value{GDBP})
+-stack-info-depth 4
+^done,depth="4"
+(@value{GDBP})
+-stack-info-depth 12
+^done,depth="12"
+(@value{GDBP})
+-stack-info-depth 11
+^done,depth="11"
+(@value{GDBP})
+-stack-info-depth 13
+^done,depth="12"
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-stack-list-arguments} Command
+@findex -stack-list-arguments
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-arguments @var{show-values}
+    [ @var{low-frame} @var{high-frame} ]
+@end smallexample
+
+Display a list of the arguments for the frames between @var{low-frame}
+and @var{high-frame} (inclusive).  If @var{low-frame} and
+@var{high-frame} are not provided, list the arguments for the whole call
+stack.
+
+The @var{show-values} argument must have a value of 0 or 1.  A value of
+0 means that only the names of the arguments are listed, a value of 1
+means that both names and values of the arguments are printed.
+
+@subsubheading @value{GDBN} Command
+
+@value{GDBN} does not have an equivalent command.  @code{gdbtk} has a
+@samp{gdb_get_args} command which partially overlaps with the
+functionality of @samp{-stack-list-arguments}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames
+^done,
+stack=[
+frame=@{level="0",addr="0x00010734",func="callee4",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="8"@},
+frame=@{level="1",addr="0x0001076c",func="callee3",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="17"@},
+frame=@{level="2",addr="0x0001078c",func="callee2",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="22"@},
+frame=@{level="3",addr="0x000107b4",func="callee1",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="27"@},
+frame=@{level="4",addr="0x000107e0",func="main",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",line="32"@}]
+(@value{GDBP})
+-stack-list-arguments 0
+^done,
+stack-args=[
+frame=@{level="0",args=[]@},
+frame=@{level="1",args=[name="strarg"]@},
+frame=@{level="2",args=[name="intarg",name="strarg"]@},
+frame=@{level="3",args=[name="intarg",name="strarg",name="fltarg"]@},
+frame=@{level="4",args=[]@}]
+(@value{GDBP})
+-stack-list-arguments 1
+^done,
+stack-args=[
+frame=@{level="0",args=[]@},
+frame=@{level="1",
+ args=[@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+frame=@{level="2",args=[
+@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@}]@},
+@{frame=@{level="3",args=[
+@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@},
+@{name="fltarg",value="3.5"@}]@},
+frame=@{level="4",args=[]@}]
+(@value{GDBP})
+-stack-list-arguments 0 2 2
+^done,stack-args=[frame=@{level="2",args=[name="intarg",name="strarg"]@}]
+(@value{GDBP})
+-stack-list-arguments 1 2 2
+^done,stack-args=[frame=@{level="2",
+args=[@{name="intarg",value="2"@},
+@{name="strarg",value="0x11940 \"A string argument.\""@}]@}]
+(@value{GDBP})
+@end smallexample
+
+@c @subheading -stack-list-exception-handlers
+
+
+@subheading The @code{-stack-list-frames} Command
+@findex -stack-list-frames
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-frames [ @var{low-frame} @var{high-frame} ]
+@end smallexample
+
+List the frames currently on the stack.  For each frame it displays the
+following info:
+
+@table @samp
+@item @var{level}
+The frame number, 0 being the topmost frame, i.e. the innermost function.
+@item @var{addr}
+The @code{$pc} value for that frame.
+@item @var{func}
+Function name.
+@item @var{file}
+File name of the source file where the function lives.
+@item @var{line}
+Line number corresponding to the @code{$pc}.
+@end table
+
+If invoked without arguments, this command prints a backtrace for the
+whole stack.  If given two integer arguments, it shows the frames whose
+levels are between the two arguments (inclusive).  If the two arguments
+are equal, it shows the single frame at the corresponding level.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{backtrace} and @samp{where}.
+
+@subsubheading Example
+
+Full stack backtrace:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames
+^done,stack=
+[frame=@{level="0",addr="0x0001076c",func="foo",
+  file="recursive2.c",line="11"@},
+frame=@{level="1",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="2",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="3",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="4",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="5",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="6",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="7",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="8",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="9",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="10",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="11",addr="0x00010738",func="main",
+  file="recursive2.c",line="4"@}]
+(@value{GDBP})
+@end smallexample
+
+Show frames between @var{low_frame} and @var{high_frame}:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames 3 5
+^done,stack=
+[frame=@{level="3",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="4",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@},
+frame=@{level="5",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@}]
+(@value{GDBP})
+@end smallexample
+
+Show a single frame:
+
+@smallexample
+(@value{GDBP})
+-stack-list-frames 3 3
+^done,stack=
+[frame=@{level="3",addr="0x000107a4",func="foo",
+  file="recursive2.c",line="14"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-stack-list-locals} Command
+@findex -stack-list-locals
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-list-locals @var{print-values}
+@end smallexample
+
+Display the local variable names for the current frame.  With an
+argument of 0 prints only the names of the variables, with argument of 1
+prints also their values.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info locals} in @value{GDBN}, @samp{gdb_get_locals} in @code{gdbtk}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-list-locals 0
+^done,locals=[name="A",name="B",name="C"]
+(@value{GDBP})
+-stack-list-locals 1
+^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
+  @{name="C",value="3"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-stack-select-frame} Command
+@findex -stack-select-frame
+
+@subsubheading Synopsis
+
+@smallexample
+ -stack-select-frame @var{framenum}
+@end smallexample
+
+Change the current frame.  Select a different frame @var{framenum} on
+the stack.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} commands are @samp{frame}, @samp{up},
+@samp{down}, @samp{select-frame}, @samp{up-silent}, and @samp{down-silent}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-stack-select-frame 2
+^done
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Symbol Query
+@section @sc{gdb/mi} Symbol Query Commands
+
+
+@subheading The @code{-symbol-info-address} Command
+@findex -symbol-info-address
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-address @var{symbol}
+@end smallexample
+
+Describe where @var{symbol} is stored.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info address}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-file} Command
+@findex -symbol-info-file
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-file
+@end smallexample
+
+Show the file for the symbol.
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.  @code{gdbtk} has
+@samp{gdb_find_file}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-function} Command
+@findex -symbol-info-function
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-function
+@end smallexample
+
+Show which function the symbol lives in.
+
+@subsubheading @value{GDBN} Command
+
+@samp{gdb_get_function} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-line} Command
+@findex -symbol-info-line
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-line
+@end smallexample
+
+Show the core addresses of the code for a source line.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} comamnd is @samp{info line}.
+@code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-info-symbol} Command
+@findex -symbol-info-symbol
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-info-symbol @var{addr}
+@end smallexample
+
+Describe what symbol is at location @var{addr}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{info symbol}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-functions} Command
+@findex -symbol-list-functions
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-functions
+@end smallexample
+
+List the functions in the executable.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info functions} in @value{GDBN}, @samp{gdb_listfunc} and
+@samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-lines} Command
+@findex -symbol-list-lines
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-lines @var{filename}
+@end smallexample
+
+Print the list of lines that contain code and their associated program
+addresses for the given source filename.  The entries are sorted in
+ascending PC order.
+
+@subsubheading @value{GDBN} Command
+
+There is no corresponding @value{GDBN} command.
+
+@subsubheading Example
+@smallexample
+(@value{GDBP})
+-symbol-list-lines basics.c
+^done,lines=[@{pc="0x08048554",line="7"@},@{pc="0x0804855a",line="8"@}]
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-symbol-list-types} Command
+@findex -symbol-list-types
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-types
+@end smallexample
+
+List all the type names.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding commands are @samp{info types} in @value{GDBN},
+@samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-list-variables} Command
+@findex -symbol-list-variables
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-list-variables
+@end smallexample
+
+List all the global and static variable names.
+
+@subsubheading @value{GDBN} Command
+
+@samp{info variables} in @value{GDBN}, @samp{gdb_search} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-locate} Command
+@findex -symbol-locate
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-locate
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+@samp{gdb_loc} in @code{gdbtk}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-symbol-type} Command
+@findex -symbol-type
+
+@subsubheading Synopsis
+
+@smallexample
+ -symbol-type @var{variable}
+@end smallexample
+
+Show type of @var{variable}.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{ptype}, @code{gdbtk} has
+@samp{gdb_obj_variable}.
+
+@subsubheading Example
+N.A.
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Target Manipulation
+@section @sc{gdb/mi} Target Manipulation Commands
+
+
+@subheading The @code{-target-attach} Command
+@findex -target-attach
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-attach @var{pid} | @var{file}
+@end smallexample
+
+Attach to a process @var{pid} or a file @var{file} outside of @value{GDBN}.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{attach}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-compare-sections} Command
+@findex -target-compare-sections
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-compare-sections [ @var{section} ]
+@end smallexample
+
+Compare data of section @var{section} on target to the exec file.
+Without the argument, all sections are compared.
+
+@subsubheading @value{GDBN} Command
+
+The @value{GDBN} equivalent is @samp{compare-sections}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-detach} Command
+@findex -target-detach
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-detach
+@end smallexample
+
+Disconnect from the remote target.  There's no output.
+
+@subsubheading @value{GDBN} command
+
+The corresponding @value{GDBN} command is @samp{detach}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-target-detach
+^done
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-target-download} Command
+@findex -target-download
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-download
+@end smallexample
+
+Loads the executable onto the remote target.
+It prints out an update message every half second, which includes the fields:
+
+@table @samp
+@item section
+The name of the section.
+@item section-sent
+The size of what has been sent so far for that section.
+@item section-size
+The size of the section.
+@item total-sent
+The total size of what was sent so far (the current and the previous sections).
+@item total-size
+The size of the overall executable to download.
+@end table
+
+@noindent
+Each message is sent as status record (@pxref{GDB/MI Output Syntax, ,
+@sc{gdb/mi} Output Syntax}).
+
+In addition, it prints the name and size of the sections, as they are
+downloaded.  These messages include the following fields:
+
+@table @samp
+@item section
+The name of the section.
+@item section-size
+The size of the section.
+@item total-size
+The size of the overall executable to download.
+@end table
+
+@noindent
+At the end, a summary is printed.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{load}.
+
+@subsubheading Example
+
+Note: each status message appears on a single line.  Here the messages
+have been broken down so that they can fit onto a page.
+
+@smallexample
+(@value{GDBP})
+-target-download
++download,@{section=".text",section-size="6668",total-size="9880"@}
++download,@{section=".text",section-sent="512",section-size="6668",
+total-sent="512",total-size="9880"@}
++download,@{section=".text",section-sent="1024",section-size="6668",
+total-sent="1024",total-size="9880"@}
++download,@{section=".text",section-sent="1536",section-size="6668",
+total-sent="1536",total-size="9880"@}
++download,@{section=".text",section-sent="2048",section-size="6668",
+total-sent="2048",total-size="9880"@}
++download,@{section=".text",section-sent="2560",section-size="6668",
+total-sent="2560",total-size="9880"@}
++download,@{section=".text",section-sent="3072",section-size="6668",
+total-sent="3072",total-size="9880"@}
++download,@{section=".text",section-sent="3584",section-size="6668",
+total-sent="3584",total-size="9880"@}
++download,@{section=".text",section-sent="4096",section-size="6668",
+total-sent="4096",total-size="9880"@}
++download,@{section=".text",section-sent="4608",section-size="6668",
+total-sent="4608",total-size="9880"@}
++download,@{section=".text",section-sent="5120",section-size="6668",
+total-sent="5120",total-size="9880"@}
++download,@{section=".text",section-sent="5632",section-size="6668",
+total-sent="5632",total-size="9880"@}
++download,@{section=".text",section-sent="6144",section-size="6668",
+total-sent="6144",total-size="9880"@}
++download,@{section=".text",section-sent="6656",section-size="6668",
+total-sent="6656",total-size="9880"@}
++download,@{section=".init",section-size="28",total-size="9880"@}
++download,@{section=".fini",section-size="28",total-size="9880"@}
++download,@{section=".data",section-size="3156",total-size="9880"@}
++download,@{section=".data",section-sent="512",section-size="3156",
+total-sent="7236",total-size="9880"@}
++download,@{section=".data",section-sent="1024",section-size="3156",
+total-sent="7748",total-size="9880"@}
++download,@{section=".data",section-sent="1536",section-size="3156",
+total-sent="8260",total-size="9880"@}
++download,@{section=".data",section-sent="2048",section-size="3156",
+total-sent="8772",total-size="9880"@}
++download,@{section=".data",section-sent="2560",section-size="3156",
+total-sent="9284",total-size="9880"@}
++download,@{section=".data",section-sent="3072",section-size="3156",
+total-sent="9796",total-size="9880"@}
+^done,address="0x10004",load-size="9880",transfer-rate="6586",
+write-rate="429"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-target-exec-status} Command
+@findex -target-exec-status
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-exec-status
+@end smallexample
+
+Provide information on the state of the target (whether it is running or
+not, for instance).
+
+@subsubheading @value{GDBN} Command
+
+There's no equivalent @value{GDBN} command.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-available-targets} Command
+@findex -target-list-available-targets
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-available-targets
+@end smallexample
+
+List the possible targets to connect to.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{help target}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-current-targets} Command
+@findex -target-list-current-targets
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-current-targets
+@end smallexample
+
+Describe the current target.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding information is printed by @samp{info file} (among
+other things).
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-list-parameters} Command
+@findex -target-list-parameters
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-list-parameters
+@end smallexample
+
+@c ????
+
+@subsubheading @value{GDBN} Command
+
+No equivalent.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-target-select} Command
+@findex -target-select
+
+@subsubheading Synopsis
+
+@smallexample
+ -target-select @var{type} @var{parameters @dots{}}
+@end smallexample
+
+Connect @value{GDBN} to the remote target.  This command takes two args:
+
+@table @samp
+@item @var{type}
+The type of target, for instance @samp{async}, @samp{remote}, etc.
+@item @var{parameters}
+Device names, host names and the like.  @xref{Target Commands, ,
+Commands for managing targets}, for more details.
+@end table
+
+The output is a connection notification, followed by the address at
+which the target program is, in the following form:
+
+@smallexample
+^connected,addr="@var{address}",func="@var{function name}",
+  args=[@var{arg list}]
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{target}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-target-select async /dev/ttya
+^connected,addr="0xfe00a300",func="??",args=[]
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Thread Commands
+@section @sc{gdb/mi} Thread Commands
+
+
+@subheading The @code{-thread-info} Command
+@findex -thread-info
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-info
+@end smallexample
+
+@subsubheading @value{GDBN} command
+
+No equivalent.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-thread-list-all-threads} Command
+@findex -thread-list-all-threads
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-list-all-threads
+@end smallexample
+
+@subsubheading @value{GDBN} Command
+
+The equivalent @value{GDBN} command is @samp{info threads}.
+
+@subsubheading Example
+N.A.
+
+
+@subheading The @code{-thread-list-ids} Command
+@findex -thread-list-ids
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-list-ids
+@end smallexample
+
+Produces a list of the currently known @value{GDBN} thread ids.  At the
+end of the list it also prints the total number of such threads.
+
+@subsubheading @value{GDBN} Command
+
+Part of @samp{info threads} supplies the same information.
+
+@subsubheading Example
+
+No threads present, besides the main process:
+
+@smallexample
+(@value{GDBP})
+-thread-list-ids
+^done,thread-ids=@{@},number-of-threads="0"
+(@value{GDBP})
+@end smallexample
+
+
+Several threads:
+
+@smallexample
+(@value{GDBP})
+-thread-list-ids
+^done,thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
+number-of-threads="3"
+(@value{GDBP})
+@end smallexample
+
+
+@subheading The @code{-thread-select} Command
+@findex -thread-select
+
+@subsubheading Synopsis
+
+@smallexample
+ -thread-select @var{threadnum}
+@end smallexample
+
+Make @var{threadnum} the current thread.  It prints the number of the new
+current thread, and the topmost frame for that thread.
+
+@subsubheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{thread}.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-exec-next
+^running
+(@value{GDBP})
+*stopped,reason="end-stepping-range",thread-id="2",line="187",
+file="../../../devo/gdb/testsuite/gdb.threads/linux-dp.c"
+(@value{GDBP})
+-thread-list-ids
+^done,
+thread-ids=@{thread-id="3",thread-id="2",thread-id="1"@},
+number-of-threads="3"
+(@value{GDBP})
+-thread-select 3
+^done,new-thread-id="3",
+frame=@{level="0",func="vprintf",
+args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
+@{name="arg",value="0x2"@}],file="vprintf.c",line="31"@}
+(@value{GDBP})
+@end smallexample
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Tracepoint Commands
+@section @sc{gdb/mi} Tracepoint Commands
+
+The tracepoint commands are not yet implemented.
+
+@c @subheading -trace-actions
+
+@c @subheading -trace-delete
+
+@c @subheading -trace-disable
+
+@c @subheading -trace-dump
+
+@c @subheading -trace-enable
+
+@c @subheading -trace-exists
+
+@c @subheading -trace-find
+
+@c @subheading -trace-frame-number
+
+@c @subheading -trace-info
+
+@c @subheading -trace-insert
+
+@c @subheading -trace-list
+
+@c @subheading -trace-pass-count
+
+@c @subheading -trace-save
+
+@c @subheading -trace-start
+
+@c @subheading -trace-stop
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Variable Objects
+@section @sc{gdb/mi} Variable Objects
+
+
+@subheading Motivation for Variable Objects in @sc{gdb/mi}
 
-This section describes details specific to particular native
-configurations.
+For the implementation of a variable debugger window (locals, watched
+expressions, etc.), we are proposing the adaptation of the existing code
+used by @code{Insight}.
+
+The two main reasons for that are:
+
+@enumerate 1
+@item
+It has been proven in practice (it is already on its second generation).
+
+@item
+It will shorten development time (needless to say how important it is
+now).
+@end enumerate
+
+The original interface was designed to be used by Tcl code, so it was
+slightly changed so it could be used through @sc{gdb/mi}.  This section
+describes the @sc{gdb/mi} operations that will be available and gives some
+hints about their use.
+
+@emph{Note}: In addition to the set of operations described here, we
+expect the @sc{gui} implementation of a variable window to require, at
+least, the following operations:
+
+@itemize @bullet
+@item @code{-gdb-show} @code{output-radix}
+@item @code{-stack-list-arguments}
+@item @code{-stack-list-locals}
+@item @code{-stack-select-frame}
+@end itemize
+
+@subheading Introduction to Variable Objects in @sc{gdb/mi}
+
+@cindex variable objects in @sc{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 @code{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@t{++} 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 @code{int}, hex
+for pointers, etc.).
+
+The following is the complete set of @sc{gdb/mi} operations defined to
+access this functionality:
+
+@multitable @columnfractions .4 .6
+@item @strong{Operation}
+@tab @strong{Description}
+
+@item @code{-var-create}
+@tab create a variable object
+@item @code{-var-delete}
+@tab delete the variable object and its children
+@item @code{-var-set-format}
+@tab set the display format of this variable
+@item @code{-var-show-format}
+@tab show the display format of this variable
+@item @code{-var-info-num-children}
+@tab tells how many children this object has
+@item @code{-var-list-children}
+@tab return a list of the object's children
+@item @code{-var-info-type}
+@tab show the type of this variable object
+@item @code{-var-info-expression}
+@tab print what this variable object represents
+@item @code{-var-show-attributes}
+@tab is this variable editable? does it exist here?
+@item @code{-var-evaluate-expression}
+@tab get the value of this variable
+@item @code{-var-assign}
+@tab set the value of this variable
+@item @code{-var-update}
+@tab update the variable and its children
+@end multitable
+
+In the next subsection we describe each operation in detail and suggest
+how it can be used.
+
+@subheading Description And Use of Operations on Variable Objects
+
+@subheading The @code{-var-create} Command
+@findex -var-create
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-create @{@var{name} | "-"@}
+    @{@var{frame-addr} | "*"@} @var{expression}
+@end smallexample
+
+This operation creates a variable object, which allows the monitoring of
+a variable, the result of an expression, a memory cell or a CPU
+register.
+
+The @var{name} parameter is the string by which the object can be
+referenced.  It must be unique.  If @samp{-} is specified, the varobj
+system will generate a string ``varNNNNNN'' automatically.  It will be
+unique provided that one does not specify @var{name} on that format.
+The command fails if a duplicate name is found.
+
+The frame under which the expression should be evaluated can be
+specified by @var{frame-addr}.  A @samp{*} indicates that the current
+frame should be used.
+
+@var{expression} is any expression valid on the current language set (must not
+begin with a @samp{*}), or one of the following:
+
+@itemize @bullet
+@item
+@samp{*@var{addr}}, where @var{addr} is the address of a memory cell
+
+@item
+@samp{*@var{addr}-@var{addr}} --- a memory address range (TBD)
+
+@item
+@samp{$@var{regname}} --- a CPU register name
+@end itemize
+
+@subsubheading Result
+
+This operation returns the name, number of children and the type of the
+object created.  Type is returned as a string as the ones generated by
+the @value{GDBN} CLI:
+
+@smallexample
+ name="@var{name}",numchild="N",type="@var{type}"
+@end smallexample
+
+
+@subheading The @code{-var-delete} Command
+@findex -var-delete
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-delete @var{name}
+@end smallexample
+
+Deletes a previously created variable object and all of its children.
+
+Returns an error if the object @var{name} is not found.
+
+
+@subheading The @code{-var-set-format} Command
+@findex -var-set-format
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-set-format @var{name} @var{format-spec}
+@end smallexample
+
+Sets the output format for the value of the object @var{name} to be
+@var{format-spec}.
+
+The syntax for the @var{format-spec} is as follows:
+
+@smallexample
+ @var{format-spec} @expansion{}
+ @{binary | decimal | hexadecimal | octal | natural@}
+@end smallexample
+
+
+@subheading The @code{-var-show-format} Command
+@findex -var-show-format
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-show-format @var{name}
+@end smallexample
+
+Returns the format used to display the value of the object @var{name}.
+
+@smallexample
+ @var{format} @expansion{}
+ @var{format-spec}
+@end smallexample
+
+
+@subheading The @code{-var-info-num-children} Command
+@findex -var-info-num-children
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-num-children @var{name}
+@end smallexample
+
+Returns the number of children of a variable object @var{name}:
+
+@smallexample
+ numchild=@var{n}
+@end smallexample
+
+
+@subheading The @code{-var-list-children} Command
+@findex -var-list-children
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-list-children @var{name}
+@end smallexample
+
+Returns a list of the children of the specified variable object:
+
+@smallexample
+ numchild=@var{n},children=[@{name=@var{name},
+ numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
+@end smallexample
+
+
+@subheading The @code{-var-info-type} Command
+@findex -var-info-type
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-type @var{name}
+@end smallexample
+
+Returns the type of the specified variable @var{name}.  The type is
+returned as a string in the same format as it is output by the
+@value{GDBN} CLI:
+
+@smallexample
+ type=@var{typename}
+@end smallexample
+
+
+@subheading The @code{-var-info-expression} Command
+@findex -var-info-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-info-expression @var{name}
+@end smallexample
+
+Returns what is represented by the variable object @var{name}:
+
+@smallexample
+ lang=@var{lang-spec},exp=@var{expression}
+@end smallexample
+
+@noindent
+where @var{lang-spec} is @code{@{"C" | "C++" | "Java"@}}.
+
+@subheading The @code{-var-show-attributes} Command
+@findex -var-show-attributes
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-show-attributes @var{name}
+@end smallexample
+
+List attributes of the specified variable object @var{name}:
+
+@smallexample
+ status=@var{attr} [ ( ,@var{attr} )* ]
+@end smallexample
+
+@noindent
+where @var{attr} is @code{@{ @{ editable | noneditable @} | TBD @}}.
+
+@subheading The @code{-var-evaluate-expression} Command
+@findex -var-evaluate-expression
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-evaluate-expression @var{name}
+@end smallexample
+
+Evaluates the expression that is represented by the specified variable
+object and returns its value as a string in the current format specified
+for the object:
+
+@smallexample
+ value=@var{value}
+@end smallexample
+
+Note that one must invoke @code{-var-list-children} for a variable
+before the value of a child variable can be evaluated.
+
+@subheading The @code{-var-assign} Command
+@findex -var-assign
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-assign @var{name} @var{expression}
+@end smallexample
+
+Assigns the value of @var{expression} to the variable object specified
+by @var{name}.  The object must be @samp{editable}.  If the variable's
+value is altered by the assign, the variable will show up in any 
+subsequent @code{-var-update} list.
+
+@subsubheading Example
+
+@smallexample
+(@value{GDBP})
+-var-assign var1 3
+^done,value="3"
+(@value{GDBP})
+-var-update *
+^done,changelist=[@{name="var1",in_scope="true",type_changed="false"@}]
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-var-update} Command
+@findex -var-update
+
+@subsubheading Synopsis
+
+@smallexample
+ -var-update @{@var{name} | "*"@}
+@end smallexample
+
+Update the value of the variable object @var{name} by evaluating its
+expression after fetching all the new values from memory or registers.
+A @samp{*} causes all existing variable objects to be updated.
+
+
+@node Annotations
+@chapter @value{GDBN} Annotations
+
+This chapter describes annotations in @value{GDBN}.  Annotations are
+designed to interface @value{GDBN} to graphical user interfaces or
+other similar programs which want to interact with @value{GDBN} at a
+relatively high level.
+
+@ignore
+This is Edition @value{EDITION}, @value{DATE}.
+@end ignore
 
 @menu
-* HP-UX::                       HP-UX
-* SVR4 Process Information::    SVR4 process information
-* DJGPP Native::                Features specific to the DJGPP port
+* Annotations Overview::  What annotations are; the general syntax.
+* Server Prefix::       Issuing a command without affecting user state.
+* Value Annotations::   Values are marked as such.
+* Frame Annotations::   Stack frames are annotated.
+* Displays::            @value{GDBN} can be told to display something periodically.
+* Prompting::           Annotations marking @value{GDBN}'s need for input.
+* Errors::              Annotations for error messages.
+* Breakpoint Info::     Information on breakpoints.
+* Invalidation::        Some annotations describe things now invalid.
+* Annotations for Running::
+                        Whether the program is running, how it stopped, etc.
+* Source Annotations::  Annotations describing source code.
+* TODO::                Annotations which might be added in the future.
 @end menu
 
-@node HP-UX
-@subsection HP-UX
+@node Annotations Overview
+@section What is an Annotation?
+@cindex annotations
 
-On HP-UX systems, if you refer to a function or variable name that
-begins with a dollar sign, @value{GDBN} searches for a user or system
-name first, before it searches for a convenience variable.
+To produce annotations, start @value{GDBN} with the @code{--annotate=2} option.
 
-@node SVR4 Process Information
-@subsection SVR4 process information
+Annotations start with a newline character, two @samp{control-z}
+characters, and the name of the annotation.  If there is no additional
+information associated with this annotation, the name of the annotation
+is followed immediately by a newline.  If there is additional
+information, the name of the annotation is followed by a space, the
+additional information, and a newline.  The additional information
+cannot contain newline characters.
 
-@kindex /proc
-@cindex process image
+Any output not beginning with a newline and two @samp{control-z}
+characters denotes literal output from @value{GDBN}.  Currently there is
+no need for @value{GDBN} to output a newline followed by two
+@samp{control-z} characters, but if there was such a need, the
+annotations could be extended with an @samp{escape} annotation which
+means those three characters as output.
 
-Many versions of SVR4 provide a facility called @samp{/proc} that can be
-used to examine the image of a running process using file-system
-subroutines.  If @value{GDBN} is configured for an operating system with
-this facility, the command @code{info proc} is available to report on
-several kinds of information about the process running your program.
-@code{info proc} works only on SVR4 systems that include the
-@code{procfs} code.  This includes OSF/1 (Digital Unix), Solaris, Irix,
-and Unixware, but not HP-UX or Linux, for example.
+A simple example of starting up @value{GDBN} with annotations is:
+
+@smallexample
+$ gdb --annotate=2
+GNU GDB 5.0
+Copyright 2000 Free Software Foundation, Inc.
+GDB is free software, covered by the GNU General Public License,
+and you are welcome to change it and/or distribute copies of it
+under certain conditions.
+Type "show copying" to see the conditions.
+There is absolutely no warranty for GDB.  Type "show warranty"
+for details.
+This GDB was configured as "sparc-sun-sunos4.1.3"
+
+^Z^Zpre-prompt
+(gdb) 
+^Z^Zprompt
+quit
+
+^Z^Zpost-prompt
+$ 
+@end smallexample
+
+Here @samp{quit} is input to @value{GDBN}; the rest is output from
+@value{GDBN}.  The three lines beginning @samp{^Z^Z} (where @samp{^Z}
+denotes a @samp{control-z} character) are annotations; the rest is
+output from @value{GDBN}.
+
+@node Server Prefix
+@section The Server Prefix
+@cindex server prefix for annotations
+
+To issue a command to @value{GDBN} without affecting certain aspects of
+the state which is seen by users, prefix it with @samp{server }.  This
+means that this command will not affect the command history, nor will it
+affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
+pressed on a line by itself.
+
+The server prefix does not affect the recording of values into the value
+history; to print a value without recording it into the value history,
+use the @code{output} command instead of the @code{print} command.
+
+@node Value Annotations
+@section Values
+
+@cindex annotations for values
+When a value is printed in various contexts, @value{GDBN} uses
+annotations to delimit the value from the surrounding text.
+
+@findex value-history-begin
+@findex value-history-value
+@findex value-history-end
+If a value is printed using @code{print} and added to the value history,
+the annotation looks like
+
+@smallexample
+^Z^Zvalue-history-begin @var{history-number} @var{value-flags}
+@var{history-string}
+^Z^Zvalue-history-value
+@var{the-value}
+^Z^Zvalue-history-end
+@end smallexample
+
+@noindent
+where @var{history-number} is the number it is getting in the value
+history, @var{history-string} is a string, such as @samp{$5 = }, which
+introduces the value to the user, @var{the-value} is the output
+corresponding to the value itself, and @var{value-flags} is @samp{*} for
+a value which can be dereferenced and @samp{-} for a value which cannot.
+
+@findex value-begin
+@findex value-end
+If the value is not added to the value history (it is an invalid float
+or it is printed with the @code{output} command), the annotation is similar:
+
+@smallexample
+^Z^Zvalue-begin @var{value-flags}
+@var{the-value}
+^Z^Zvalue-end
+@end smallexample
+
+@findex arg-begin
+@findex arg-name-end
+@findex arg-value
+@findex arg-end
+When @value{GDBN} prints an argument to a function (for example, in the output
+from the @code{backtrace} command), it annotates it as follows:
+
+@smallexample
+^Z^Zarg-begin
+@var{argument-name}
+^Z^Zarg-name-end
+@var{separator-string}
+^Z^Zarg-value @var{value-flags}
+@var{the-value}
+^Z^Zarg-end
+@end smallexample
+
+@noindent
+where @var{argument-name} is the name of the argument,
+@var{separator-string} is text which separates the name from the value
+for the user's benefit (such as @samp{=}), and @var{value-flags} and
+@var{the-value} have the same meanings as in a
+@code{value-history-begin} annotation.
+
+@findex field-begin
+@findex field-name-end
+@findex field-value
+@findex field-end
+When printing a structure, @value{GDBN} annotates it as follows:
+
+@smallexample
+^Z^Zfield-begin @var{value-flags}
+@var{field-name}
+^Z^Zfield-name-end
+@var{separator-string}
+^Z^Zfield-value
+@var{the-value}
+^Z^Zfield-end
+@end smallexample
+
+@noindent
+where @var{field-name} is the name of the field, @var{separator-string}
+is text which separates the name from the value for the user's benefit
+(such as @samp{=}), and @var{value-flags} and @var{the-value} have the
+same meanings as in a @code{value-history-begin} annotation.
+
+When printing an array, @value{GDBN} annotates it as follows:
+
+@smallexample
+^Z^Zarray-section-begin @var{array-index} @var{value-flags}
+@end smallexample
+
+@noindent
+where @var{array-index} is the index of the first element being
+annotated and @var{value-flags} has the same meaning as in a
+@code{value-history-begin} annotation.  This is followed by any number
+of elements, where is element can be either a single element:
+
+@findex elt
+@smallexample
+@samp{,} @var{whitespace}         ; @r{omitted for the first element}
+@var{the-value}
+^Z^Zelt
+@end smallexample
+
+or a repeated element
+
+@findex elt-rep
+@findex elt-rep-end
+@smallexample
+@samp{,} @var{whitespace}         ; @r{omitted for the first element}
+@var{the-value}
+^Z^Zelt-rep @var{number-of-repetitions}
+@var{repetition-string}
+^Z^Zelt-rep-end
+@end smallexample
+
+In both cases, @var{the-value} is the output for the value of the
+element and @var{whitespace} can contain spaces, tabs, and newlines.  In
+the repeated case, @var{number-of-repetitions} is the number of
+consecutive array elements which contain that value, and
+@var{repetition-string} is a string which is designed to convey to the
+user that repetition is being depicted.
+
+@findex array-section-end
+Once all the array elements have been output, the array annotation is
+ended with
+
+@smallexample
+^Z^Zarray-section-end
+@end smallexample
+
+@node Frame Annotations
+@section Frames
+
+@cindex annotations for frames
+Whenever @value{GDBN} prints a frame, it annotates it.  For example, this applies
+to frames printed when @value{GDBN} stops, output from commands such as
+@code{backtrace} or @code{up}, etc.
+
+@findex frame-begin
+The frame annotation begins with
+
+@smallexample
+^Z^Zframe-begin @var{level} @var{address}
+@var{level-string}
+@end smallexample
+
+@noindent
+where @var{level} is the number of the frame (0 is the innermost frame,
+and other frames have positive numbers), @var{address} is the address of
+the code executing in that frame, and @var{level-string} is a string
+designed to convey the level to the user.  @var{address} is in the form
+@samp{0x} followed by one or more lowercase hex digits (note that this
+does not depend on the language).  The frame ends with
+
+@findex frame-end
+@smallexample
+^Z^Zframe-end
+@end smallexample
+
+Between these annotations is the main body of the frame, which can
+consist of
+
+@itemize @bullet
+@item
+@findex function-call
+@smallexample
+^Z^Zfunction-call
+@var{function-call-string}
+@end smallexample
+
+where @var{function-call-string} is text designed to convey to the user
+that this frame is associated with a function call made by @value{GDBN} to a
+function in the program being debugged.
+
+@item
+@findex signal-handler-caller
+@smallexample
+^Z^Zsignal-handler-caller
+@var{signal-handler-caller-string}
+@end smallexample
+
+where @var{signal-handler-caller-string} is text designed to convey to
+the user that this frame is associated with whatever mechanism is used
+by this operating system to call a signal handler (it is the frame which
+calls the signal handler, not the frame for the signal handler itself).
 
-@table @code
-@kindex info proc
-@item info proc
-Summarize available information about the process.
+@item
+A normal frame.
 
-@kindex info proc mappings
-@item info proc mappings
-Report on the address ranges accessible in the program, with information
-on whether your program may read, write, or execute each range.
-@ignore
-@comment These sub-options of 'info proc' were not included when
-@comment procfs.c was re-written.  Keep their descriptions around
-@comment against the day when someone finds the time to put them back in.
-@kindex info proc times
-@item info proc times
-Starting time, user CPU time, and system CPU time for your program and
-its children.
+@findex frame-address
+@findex frame-address-end
+This can optionally (depending on whether this is thought of as
+interesting information for the user to see) begin with
 
-@kindex info proc id
-@item info proc id
-Report on the process IDs related to your program: its own process ID,
-the ID of its parent, the process group ID, and the session ID.
+@smallexample
+^Z^Zframe-address
+@var{address}
+^Z^Zframe-address-end
+@var{separator-string}
+@end smallexample
 
-@kindex info proc status
-@item info proc status
-General information on the state of the process.  If the process is
-stopped, this report includes the reason for stopping, and any signal
-received.
+where @var{address} is the address executing in the frame (the same
+address as in the @code{frame-begin} annotation, but printed in a form
+which is intended for user consumption---in particular, the syntax varies
+depending on the language), and @var{separator-string} is a string
+intended to separate this address from what follows for the user's
+benefit.
 
-@item info proc all
-Show all the above information about the process.
-@end ignore
-@end table
+@findex frame-function-name
+@findex frame-args
+Then comes
 
-@node DJGPP Native
-@subsection Features for Debugging @sc{djgpp} Programs
-@cindex @sc{djgpp} debugging
-@cindex native @sc{djgpp} debugging
-@cindex MS-DOS-specific commands
+@smallexample
+^Z^Zframe-function-name
+@var{function-name}
+^Z^Zframe-args
+@var{arguments}
+@end smallexample
 
-@sc{djgpp} is the port of @sc{gnu} development tools to MS-DOS and
-MS-Windows.  @sc{djgpp} programs are 32-bit protected-mode programs
-that use the @dfn{DPMI} (DOS Protected-Mode Interface) API to run on
-top of real-mode DOS systems and their emulations.
+where @var{function-name} is the name of the function executing in the
+frame, or @samp{??} if not known, and @var{arguments} are the arguments
+to the frame, with parentheses around them (each argument is annotated
+individually as well, @pxref{Value Annotations}).
 
-@value{GDBN} supports native debugging of @sc{djgpp} programs, and
-defines a few commands specific to the @sc{djgpp} port.  This
-subsection describes those commands.
+@findex frame-source-begin
+@findex frame-source-file
+@findex frame-source-file-end
+@findex frame-source-line
+@findex frame-source-end
+If source information is available, a reference to it is then printed:
 
-@table @code
-@kindex info dos
-@item info dos
-This is a prefix of @sc{djgpp}-specific commands which print
-information about the target system and important OS structures.
+@smallexample
+^Z^Zframe-source-begin
+@var{source-intro-string}
+^Z^Zframe-source-file
+@var{filename}
+^Z^Zframe-source-file-end
+:
+^Z^Zframe-source-line
+@var{line-number}
+^Z^Zframe-source-end
+@end smallexample
 
-@kindex sysinfo
-@cindex MS-DOS system info
-@cindex free memory information (MS-DOS)
-@item info dos sysinfo
-This command displays assorted information about the underlying
-platform: the CPU type and features, the OS version and flavor, the
-DPMI version, and the available conventional and DPMI memory.
+where @var{source-intro-string} separates for the user's benefit the
+reference from the text which precedes it, @var{filename} is the name of
+the source file, and @var{line-number} is the line number within that
+file (the first line is line 1).
 
-@cindex GDT
-@cindex LDT
-@cindex IDT
-@cindex segment descriptor tables
-@cindex descriptor tables display
-@item info dos gdt
-@itemx info dos ldt
-@itemx info dos idt
-These 3 commands display entries from, respectively, Global, Local,
-and Interrupt Descriptor Tables (GDT, LDT, and IDT).  The descriptor
-tables are data structures which store a descriptor for each segment
-that is currently in use.  The segment's selector is an index into a
-descriptor table; the table entry for that index holds the
-descriptor's base address and limit, and its attributes and access
-rights.
+@findex frame-where
+If @value{GDBN} prints some information about where the frame is from (which
+library, which load segment, etc.; currently only done on the RS/6000),
+it is annotated with
 
-A typical @sc{djgpp} program uses 3 segments: a code segment, a data
-segment (used for both data and the stack), and a DOS segment (which
-allows access to DOS/BIOS data structures and absolute addresses in
-conventional memory).  However, the DPMI host will usually define
-additional segments in order to support the DPMI environment.
+@smallexample
+^Z^Zframe-where
+@var{information}
+@end smallexample
 
-@cindex garbled pointers
-These commands allow to display entries from the descriptor tables.
-Without an argument, all entries from the specified table are
-displayed.  An argument, which should be an integer expression, means
-display a single entry whose index is given by the argument.  For
-example, here's a convenient way to display information about the
-debugged program's data segment:
+Then, if source is to actually be displayed for this frame (for example,
+this is not true for output from the @code{backtrace} command), then a
+@code{source} annotation (@pxref{Source Annotations}) is displayed.  Unlike
+most annotations, this is output instead of the normal text which would be
+output, not in addition.
+@end itemize
+
+@node Displays
+@section Displays
+
+@findex display-begin
+@findex display-number-end
+@findex display-format
+@findex display-expression
+@findex display-expression-end
+@findex display-value
+@findex display-end
+@cindex annotations for display
+When @value{GDBN} is told to display something using the @code{display} command,
+the results of the display are annotated:
 
 @smallexample
-@exdent @code{(@value{GDBP}) info dos ldt $ds}
-@exdent @code{0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)}
+^Z^Zdisplay-begin
+@var{number}
+^Z^Zdisplay-number-end
+@var{number-separator}
+^Z^Zdisplay-format
+@var{format}
+^Z^Zdisplay-expression
+@var{expression}
+^Z^Zdisplay-expression-end
+@var{expression-separator}
+^Z^Zdisplay-value
+@var{value}
+^Z^Zdisplay-end
 @end smallexample
 
 @noindent
-This comes in handy when you want to see whether a pointer is outside
-the data segment's limit (i.e.@: @dfn{garbled}).
+where @var{number} is the number of the display, @var{number-separator}
+is intended to separate the number from what follows for the user,
+@var{format} includes information such as the size, format, or other
+information about how the value is being displayed, @var{expression} is
+the expression being displayed, @var{expression-separator} is intended
+to separate the expression from the text that follows for the user,
+and @var{value} is the actual value being displayed.
+
+@node Prompting
+@section Annotation for @value{GDBN} Input
+
+@cindex annotations for prompts
+When @value{GDBN} prompts for input, it annotates this fact so it is possible
+to know when to send output, when the output from a given command is
+over, etc.
+
+Different kinds of input each have a different @dfn{input type}.  Each
+input type has three annotations: a @code{pre-} annotation, which
+denotes the beginning of any prompt which is being output, a plain
+annotation, which denotes the end of the prompt, and then a @code{post-}
+annotation which denotes the end of any echo which may (or may not) be
+associated with the input.  For example, the @code{prompt} input type
+features the following annotations:
 
-@cindex page tables display (MS-DOS)
-@item info dos pde
-@itemx info dos pte
-These two commands display entries from, respectively, the Page
-Directory and the Page Tables.  Page Directories and Page Tables are
-data structures which control how virtual memory addresses are mapped
-into physical addresses.  A Page Table includes an entry for every
-page of memory that is mapped into the program's address space; there
-may be several Page Tables, each one holding up to 4096 entries.  A
-Page Directory has up to 4096 entries, one each for every Page Table
-that is currently in use.
+@smallexample
+^Z^Zpre-prompt
+^Z^Zprompt
+^Z^Zpost-prompt
+@end smallexample
 
-Without an argument, @kbd{info dos pde} displays the entire Page
-Directory, and @kbd{info dos pte} displays all the entries in all of
-the Page Tables.  An argument, an integer expression, given to the
-@kbd{info dos pde} command means display only that entry from the Page
-Directory table.  An argument given to the @kbd{info dos pte} command
-means display entries from a single Page Table, the one pointed to by
-the specified entry in the Page Directory.
+The input types are
 
-@cindex direct memory access (DMA) on MS-DOS
-These commands are useful when your program uses @dfn{DMA} (Direct
-Memory Access), which needs physical addresses to program the DMA
-controller.
+@table @code
+@findex pre-prompt
+@findex prompt
+@findex post-prompt
+@item prompt
+When @value{GDBN} is prompting for a command (the main @value{GDBN} prompt).
+
+@findex pre-commands
+@findex commands
+@findex post-commands
+@item commands
+When @value{GDBN} prompts for a set of commands, like in the @code{commands}
+command.  The annotations are repeated for each command which is input.
+
+@findex pre-overload-choice
+@findex overload-choice
+@findex post-overload-choice
+@item overload-choice
+When @value{GDBN} wants the user to select between various overloaded functions.
+
+@findex pre-query
+@findex query
+@findex post-query
+@item query
+When @value{GDBN} wants the user to confirm a potentially dangerous operation.
+
+@findex pre-prompt-for-continue
+@findex prompt-for-continue
+@findex post-prompt-for-continue
+@item prompt-for-continue
+When @value{GDBN} is asking the user to press return to continue.  Note: Don't
+expect this to work well; instead use @code{set height 0} to disable
+prompting.  This is because the counting of lines is buggy in the
+presence of annotations.
+@end table
 
-These commands are supported only with some DPMI servers.
+@node Errors
+@section Errors
+@cindex annotations for errors, warnings and interrupts
 
-@cindex physical address from linear address
-@item info dos address-pte @var{addr}
-This command displays the Page Table entry for a specified linear
-address.  The argument linear address @var{addr} should already have the
-appropriate segment's base address added to it, because this command
-accepts addresses which may belong to @emph{any} segment.  For
-example, here's how to display the Page Table entry for the page where
-the variable @code{i} is stored:
+@findex quit
+@smallexample
+^Z^Zquit
+@end smallexample
 
-@smallexample 
-@exdent @code{(@value{GDBP}) info dos address-pte __djgpp_base_address + (char *)&i}
-@exdent @code{Page Table entry for address 0x11a00d30:}
-@exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30} 
+This annotation occurs right before @value{GDBN} responds to an interrupt.
+
+@findex error
+@smallexample
+^Z^Zerror
 @end smallexample
 
-@noindent
-This says that @code{i} is stored at offset @code{0xd30} from the page
-whose physical base address is @code{0x02698000}, and prints all the
-attributes of that page.
+This annotation occurs right before @value{GDBN} responds to an error.
 
-Note that you must cast the addresses of variables to a @code{char *},
-since otherwise the value of @code{__djgpp_base_address}, the base
-address of all variables and functions in a @sc{djgpp} program, will
-be added using the rules of C pointer arithmetics: if @code{i} is
-declared an @code{int}, @value{GDBN} will add 4 times the value of
-@code{__djgpp_base_address} to the address of @code{i}.
+Quit and error annotations indicate that any annotations which @value{GDBN} was
+in the middle of may end abruptly.  For example, if a
+@code{value-history-begin} annotation is followed by a @code{error}, one
+cannot expect to receive the matching @code{value-history-end}.  One
+cannot expect not to receive it either, however; an error annotation
+does not necessarily mean that @value{GDBN} is immediately returning all the way
+to the top level.
 
-Here's another example, it displays the Page Table entry for the
-transfer buffer:
+@findex error-begin
+A quit or error annotation may be preceded by
 
 @smallexample
-@exdent @code{(@value{GDBP}) info dos address-pte *((unsigned *)&_go32_info_block + 3)}
-@exdent @code{Page Table entry for address 0x29110:}
-@exdent @code{Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110}
+^Z^Zerror-begin
 @end smallexample
 
-@noindent
-(The @code{+ 3} offset is because the transfer buffer's address is the
-3rd member of the @code{_go32_info_block} structure.)  The output of
-this command clearly shows that addresses in conventional memory are
-mapped 1:1, i.e.@: the physical and linear addresses are identical.
+Any output between that and the quit or error annotation is the error
+message.
 
-This command is supported only with some DPMI servers.
-@end table
+Warning messages are not yet annotated.
+@c If we want to change that, need to fix warning(), type_error(),
+@c range_error(), and possibly other places.
 
-@node Embedded OS
-@section Embedded Operating Systems
+@node Breakpoint Info
+@section Information on Breakpoints
 
-This section describes configurations involving the debugging of
-embedded operating systems that are available for several different
-architectures.
+@cindex annotations for breakpoints
+The output from the @code{info breakpoints} command is annotated as follows:
 
-@menu
-* VxWorks::                     Using @value{GDBN} with VxWorks
-@end menu
+@findex breakpoints-headers
+@findex breakpoints-table
+@smallexample
+^Z^Zbreakpoints-headers
+@var{header-entry}
+^Z^Zbreakpoints-table
+@end smallexample
 
-@value{GDBN} includes the ability to debug programs running on
-various real-time operating systems.
+@noindent
+where @var{header-entry} has the same syntax as an entry (see below) but
+instead of containing data, it contains strings which are intended to
+convey the meaning of each field to the user.  This is followed by any
+number of entries.  If a field does not apply for this entry, it is
+omitted.  Fields may contain trailing whitespace.  Each entry consists
+of:
+
+@findex record
+@findex field
+@smallexample
+^Z^Zrecord
+^Z^Zfield 0
+@var{number}
+^Z^Zfield 1
+@var{type}
+^Z^Zfield 2
+@var{disposition}
+^Z^Zfield 3
+@var{enable}
+^Z^Zfield 4
+@var{address}
+^Z^Zfield 5
+@var{what}
+^Z^Zfield 6
+@var{frame}
+^Z^Zfield 7
+@var{condition}
+^Z^Zfield 8
+@var{ignore-count}
+^Z^Zfield 9
+@var{commands}
+@end smallexample
 
-@node VxWorks
-@subsection Using @value{GDBN} with VxWorks
+Note that @var{address} is intended for user consumption---the syntax
+varies depending on the language.
 
-@cindex VxWorks
+The output ends with
+
+@findex breakpoints-table-end
+@smallexample
+^Z^Zbreakpoints-table-end
+@end smallexample
+
+@node Invalidation
+@section Invalidation Notices
+
+@cindex annotations for invalidation messages
+The following annotations say that certain pieces of state may have
+changed.
 
 @table @code
+@findex frames-invalid
+@item ^Z^Zframes-invalid
 
-@kindex target vxworks
-@item target vxworks @var{machinename}
-A VxWorks system, attached via TCP/IP.  The argument @var{machinename}
-is the target system's machine name or IP address.
+The frames (for example, output from the @code{backtrace} command) may
+have changed.
+
+@findex breakpoints-invalid
+@item ^Z^Zbreakpoints-invalid
 
+The breakpoints may have changed.  For example, the user just added or
+deleted a breakpoint.
 @end table
 
-On VxWorks, @code{load} links @var{filename} dynamically on the
-current target system as well as adding its symbols in @value{GDBN}.
+@node Annotations for Running
+@section Running the Program
+@cindex annotations for running programs
 
-@value{GDBN} enables developers to spawn and debug tasks running on networked
-VxWorks targets from a Unix host.  Already-running tasks spawned from
-the VxWorks shell can also be debugged.  @value{GDBN} uses code that runs on
-both the Unix host and on the VxWorks target.  The program
-@code{@value{GDBP}} is installed and executed on the Unix host.  (It may be
-installed with the name @code{vxgdb}, to distinguish it from a
-@value{GDBN} for debugging programs on the host itself.)
+@findex starting
+@findex stopping
+When the program starts executing due to a @value{GDBN} command such as
+@code{step} or @code{continue}, 
+
+@smallexample
+^Z^Zstarting
+@end smallexample
+
+is output.  When the program stops, 
+
+@smallexample
+^Z^Zstopped
+@end smallexample
+
+is output.  Before the @code{stopped} annotation, a variety of
+annotations describe how the program stopped.
 
 @table @code
-@item VxWorks-timeout @var{args}
-@kindex vxworks-timeout
-All VxWorks-based targets now support the option @code{vxworks-timeout}.
-This option is set by the user, and  @var{args} represents the number of
-seconds @value{GDBN} waits for responses to rpc's.  You might use this if
-your VxWorks target is a slow software simulator or is on the far side
-of a thin network line.
+@findex exited
+@item ^Z^Zexited @var{exit-status}
+The program exited, and @var{exit-status} is the exit status (zero for
+successful exit, otherwise nonzero).
+
+@findex signalled
+@findex signal-name
+@findex signal-name-end
+@findex signal-string
+@findex signal-string-end
+@item ^Z^Zsignalled
+The program exited with a signal.  After the @code{^Z^Zsignalled}, the
+annotation continues:
+
+@smallexample
+@var{intro-text}
+^Z^Zsignal-name
+@var{name}
+^Z^Zsignal-name-end
+@var{middle-text}
+^Z^Zsignal-string
+@var{string}
+^Z^Zsignal-string-end
+@var{end-text}
+@end smallexample
+
+@noindent
+where @var{name} is the name of the signal, such as @code{SIGILL} or
+@code{SIGSEGV}, and @var{string} is the explanation of the signal, such
+as @code{Illegal Instruction} or @code{Segmentation fault}.
+@var{intro-text}, @var{middle-text}, and @var{end-text} are for the
+user's benefit and have no particular format.
+
+@findex signal
+@item ^Z^Zsignal
+The syntax of this annotation is just like @code{signalled}, but @value{GDBN} is
+just saying that the program received the signal, not that it was
+terminated with it.
+
+@findex breakpoint
+@item ^Z^Zbreakpoint @var{number}
+The program hit breakpoint number @var{number}.
+
+@findex watchpoint
+@item ^Z^Zwatchpoint @var{number}
+The program hit watchpoint number @var{number}.
 @end table
 
-The following information on connecting to VxWorks was current when
-this manual was produced; newer releases of VxWorks may use revised
-procedures.
+@node Source Annotations
+@section Displaying Source
+@cindex annotations for source display
 
-@kindex INCLUDE_RDB
-To use @value{GDBN} with VxWorks, you must rebuild your VxWorks kernel
-to include the remote debugging interface routines in the VxWorks
-library @file{rdb.a}.  To do this, define @code{INCLUDE_RDB} in the
-VxWorks configuration file @file{configAll.h} and rebuild your VxWorks
-kernel.  The resulting kernel contains @file{rdb.a}, and spawns the
-source debugging task @code{tRdbTask} when VxWorks is booted.  For more
-information on configuring and remaking VxWorks, see the manufacturer's
-manual.
-@c VxWorks, see the @cite{VxWorks Programmer's Guide}.
+@findex source
+The following annotation is used instead of displaying source code:
 
-Once you have included @file{rdb.a} in your VxWorks system image and set
-your Unix execution search path to find @value{GDBN}, you are ready to
-run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}} (or
-@code{vxgdb}, depending on your installation).
+@smallexample
+^Z^Zsource @var{filename}:@var{line}:@var{character}:@var{middle}:@var{addr}
+@end smallexample
 
-@value{GDBN} comes up showing the prompt:
+where @var{filename} is an absolute file name indicating which source
+file, @var{line} is the line number within that file (where 1 is the
+first line in the file), @var{character} is the character position
+within the file (where 0 is the first character in the file) (for most
+debug formats this will necessarily point to the beginning of a line),
+@var{middle} is @samp{middle} if @var{addr} is in the middle of the
+line, or @samp{beg} if @var{addr} is at the beginning of the line, and
+@var{addr} is the address in the target program associated with the
+source which is being displayed.  @var{addr} is in the form @samp{0x}
+followed by one or more lowercase hex digits (note that this does not
+depend on the language).
+
+@node TODO
+@section Annotations We Might Want in the Future
+
+@format
+    - target-invalid
+      the target might have changed (registers, heap contents, or
+      execution status).  For performance, we might eventually want
+      to hit `registers-invalid' and `all-registers-invalid' with
+      greater precision
+
+    - systematic annotation for set/show parameters (including
+      invalidation notices).
+
+    - similarly, `info' returns a list of candidates for invalidation
+      notices.
+@end format
 
-@example
-(vxgdb)
-@end example
+@node GDB Bugs
+@chapter Reporting Bugs in @value{GDBN}
+@cindex bugs in @value{GDBN}
+@cindex reporting bugs in @value{GDBN}
 
-@menu
-* VxWorks Connection::          Connecting to VxWorks
-* VxWorks Download::            VxWorks download
-* VxWorks Attach::              Running tasks
-@end menu
+Your bug reports play an essential role in making @value{GDBN} reliable.
 
-@node VxWorks Connection
-@subsubsection Connecting to VxWorks
+Reporting a bug may help you by bringing a solution to your problem, or it
+may not.  But in any case the principal function of a bug report is to help
+the entire community by making the next version of @value{GDBN} work better.  Bug
+reports are your contribution to the maintenance of @value{GDBN}.
 
-The @value{GDBN} command @code{target} lets you connect to a VxWorks target on the
-network.  To connect to a target whose host name is ``@code{tt}'', type:
+In order for a bug report to serve its purpose, you must include the
+information that enables us to fix the bug.
 
-@example
-(vxgdb) target vxworks tt
-@end example
+@menu
+* Bug Criteria::                Have you found a bug?
+* Bug Reporting::               How to report bugs
+@end menu
 
-@need 750
-@value{GDBN} displays messages like these:
+@node Bug Criteria
+@section Have you found a bug?
+@cindex bug criteria
 
-@smallexample
-Attaching remote machine across net...
-Connected to tt.
-@end smallexample
+If you are not sure whether you have found a bug, here are some guidelines:
 
-@need 1000
-@value{GDBN} then attempts to read the symbol tables of any object modules
-loaded into the VxWorks target since it was last booted.  @value{GDBN} locates
-these files by searching the directories listed in the command search
-path (@pxref{Environment, ,Your program's environment}); if it fails
-to find an object file, it displays a message such as:
+@itemize @bullet
+@cindex fatal signal
+@cindex debugger crash
+@cindex crash of debugger
+@item
+If the debugger gets a fatal signal, for any input whatever, that is a
+@value{GDBN} bug.  Reliable debuggers never crash.
 
-@example
-prog.o: No such file or directory.
-@end example
+@cindex error on valid input
+@item
+If @value{GDBN} produces an error message for valid input, that is a
+bug.  (Note that if you're cross debugging, the problem may also be
+somewhere in the connection to the target.)
 
-When this happens, add the appropriate directory to the search path with
-the @value{GDBN} command @code{path}, and execute the @code{target}
-command again.
+@cindex invalid input
+@item
+If @value{GDBN} does not produce an error message for invalid input,
+that is a bug.  However, you should note that your idea of
+``invalid input'' might be our idea of ``an extension'' or ``support
+for traditional practice''.
 
-@node VxWorks Download
-@subsubsection VxWorks download
+@item
+If you are an experienced user of debugging tools, your suggestions
+for improvement of @value{GDBN} are welcome in any case.
+@end itemize
 
-@cindex download to VxWorks
-If you have connected to the VxWorks target and you want to debug an
-object that has not yet been loaded, you can use the @value{GDBN}
-@code{load} command to download a file from Unix to VxWorks
-incrementally.  The object file given as an argument to the @code{load}
-command is actually opened twice: first by the VxWorks target in order
-to download the code, then by @value{GDBN} in order to read the symbol
-table.  This can lead to problems if the current working directories on
-the two systems differ.  If both systems have NFS mounted the same
-filesystems, you can avoid these problems by using absolute paths.
-Otherwise, it is simplest to set the working directory on both systems
-to the directory in which the object file resides, and then to reference
-the file by its name, without any path.  For instance, a program
-@file{prog.o} may reside in @file{@var{vxpath}/vw/demo/rdb} in VxWorks
-and in @file{@var{hostpath}/vw/demo/rdb} on the host.  To load this
-program, type this on VxWorks:
+@node Bug Reporting
+@section How to report bugs
+@cindex bug reports
+@cindex @value{GDBN} bugs, reporting
 
-@example
--> cd "@var{vxpath}/vw/demo/rdb"
-@end example
+A number of companies and individuals offer support for @sc{gnu} products.
+If you obtained @value{GDBN} from a support organization, we recommend you
+contact that organization first.
 
-@noindent
-Then, in @value{GDBN}, type:
+You can find contact information for many support companies and
+individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
+distribution.
+@c should add a web page ref...
 
-@example
-(vxgdb) cd @var{hostpath}/vw/demo/rdb
-(vxgdb) load prog.o
-@end example
+In any event, we also recommend that you submit bug reports for
+@value{GDBN}.  The prefered method is to submit them directly using
+@uref{http://www.gnu.org/software/gdb/bugs/, @value{GDBN}'s Bugs web
+page}.  Alternatively, the @email{bug-gdb@@gnu.org, e-mail gateway} can
+be used.
 
-@value{GDBN} displays a response similar to this:
+@strong{Do not send bug reports to @samp{info-gdb}, or to
+@samp{help-gdb}, or to any newsgroups.}  Most users of @value{GDBN} do
+not want to receive bug reports.  Those that do have arranged to receive
+@samp{bug-gdb}.
 
-@smallexample
-Reading symbol data from wherever/vw/demo/rdb/prog.o... done.
-@end smallexample
+The mailing list @samp{bug-gdb} has a newsgroup @samp{gnu.gdb.bug} which
+serves as a repeater.  The mailing list and the newsgroup carry exactly
+the same messages.  Often people think of posting bug reports to the
+newsgroup instead of mailing them.  This appears to work, but it has one
+problem which can be crucial: a newsgroup posting often lacks a mail
+path back to the sender.  Thus, if we need to ask for more information,
+we may be unable to reach you.  For this reason, it is better to send
+bug reports to the mailing list.
 
-You can also use the @code{load} command to reload an object module
-after editing and recompiling the corresponding source file.  Note that
-this makes @value{GDBN} delete all currently-defined breakpoints,
-auto-displays, and convenience variables, and to clear the value
-history.  (This is necessary in order to preserve the integrity of
-debugger's data structures that reference the target system's symbol
-table.)
+The fundamental principle of reporting bugs usefully is this:
+@strong{report all the facts}.  If you are not sure whether to state a
+fact or leave it out, state it!
 
-@node VxWorks Attach
-@subsubsection Running tasks
+Often people omit facts because they think they know what causes the
+problem and assume that some details do not matter.  Thus, you might
+assume that the name of the variable you use in an example does not matter.
+Well, probably it does not, but one cannot be sure.  Perhaps the bug is a
+stray memory reference which happens to fetch from the location where that
+name is stored in memory; perhaps, if the name were different, the contents
+of that location would fool the debugger into doing the right thing despite
+the bug.  Play it safe and give a specific, complete example.  That is the
+easiest thing for you to do, and the most helpful.
 
-@cindex running VxWorks tasks
-You can also attach to an existing task using the @code{attach} command as
-follows:
+Keep in mind that the purpose of a bug report is to enable us to fix the
+bug.  It may be that the bug has been reported previously, but neither
+you nor we can know that unless your bug report is complete and
+self-contained.
 
-@example
-(vxgdb) attach @var{task}
-@end example
+Sometimes people give a few sketchy facts and ask, ``Does this ring a
+bell?''  Those bug reports are useless, and we urge everyone to
+@emph{refuse to respond to them} except to chide the sender to report
+bugs properly.
 
-@noindent
-where @var{task} is the VxWorks hexadecimal task ID.  The task can be running
-or suspended when you attach to it.  Running tasks are suspended at
-the time of attachment.
+To enable us to fix the bug, you should include all these things:
 
-@node Embedded Processors
-@section Embedded Processors
+@itemize @bullet
+@item
+The version of @value{GDBN}.  @value{GDBN} announces it if you start
+with no arguments; you can also print it at any time using @code{show
+version}.
 
-This section goes into details specific to particular embedded
-configurations.
+Without this, we will not know whether there is any point in looking for
+the bug in the current version of @value{GDBN}.
 
+@item
+The type of machine you are using, and the operating system name and
+version number.
 
-@c OBSOLETE * A29K Embedded::               AMD A29K Embedded
-@menu
-* ARM::                         ARM
-* H8/300::                      Hitachi H8/300
-* H8/500::                      Hitachi H8/500
-* i960::                        Intel i960
-* M32R/D::                      Mitsubishi M32R/D
-* M68K::                        Motorola M68K
-* M88K::                        Motorola M88K
-* MIPS Embedded::               MIPS Embedded
-* PA::                          HP PA Embedded
-* PowerPC:                      PowerPC
-* SH::                          Hitachi SH
-* Sparclet::                    Tsqware Sparclet
-* Sparclite::                   Fujitsu Sparclite
-* ST2000::                      Tandem ST2000
-* Z8000::                       Zilog Z8000
-@end menu
+@item
+What compiler (and its version) was used to compile @value{GDBN}---e.g.
+``@value{GCC}--2.8.1''.
 
-@c OBSOLETE @node A29K Embedded
-@c OBSOLETE @subsection AMD A29K Embedded
-@c OBSOLETE 
-@c OBSOLETE @menu
-@c OBSOLETE * A29K UDI::
-@c OBSOLETE * A29K EB29K::
-@c OBSOLETE * Comms (EB29K)::               Communications setup
-@c OBSOLETE * gdb-EB29K::                   EB29K cross-debugging
-@c OBSOLETE * Remote Log::                  Remote log
-@c OBSOLETE @end menu
-@c OBSOLETE 
-@c OBSOLETE @table @code
-@c OBSOLETE 
-@c OBSOLETE @kindex target adapt
-@c OBSOLETE @item target adapt @var{dev}
-@c OBSOLETE Adapt monitor for A29K.
-@c OBSOLETE 
-@c OBSOLETE @kindex target amd-eb
-@c OBSOLETE @item target amd-eb @var{dev} @var{speed} @var{PROG}
-@c OBSOLETE @cindex AMD EB29K
-@c OBSOLETE Remote PC-resident AMD EB29K board, attached over serial lines.
-@c OBSOLETE @var{dev} is the serial device, as for @code{target remote};
-@c OBSOLETE @var{speed} allows you to specify the linespeed; and @var{PROG} is the
-@c OBSOLETE name of the program to be debugged, as it appears to DOS on the PC.
-@c OBSOLETE @xref{A29K EB29K, ,EBMON protocol for AMD29K}.
-@c OBSOLETE 
-@c OBSOLETE @end table
-@c OBSOLETE 
-@c OBSOLETE @node A29K UDI
-@c OBSOLETE @subsubsection A29K UDI
-@c OBSOLETE 
-@c OBSOLETE @cindex UDI
-@c OBSOLETE @cindex AMD29K via UDI
-@c OBSOLETE 
-@c OBSOLETE @value{GDBN} supports AMD's UDI (``Universal Debugger Interface'')
-@c OBSOLETE protocol for debugging the a29k processor family.  To use this
-@c OBSOLETE configuration with AMD targets running the MiniMON monitor, you need the
-@c OBSOLETE program @code{MONTIP}, available from AMD at no charge.  You can also
-@c OBSOLETE use @value{GDBN} with the UDI-conformant a29k simulator program
-@c OBSOLETE @code{ISSTIP}, also available from AMD.
-@c OBSOLETE 
-@c OBSOLETE @table @code
-@c OBSOLETE @item target udi @var{keyword}
-@c OBSOLETE @kindex udi
-@c OBSOLETE Select the UDI interface to a remote a29k board or simulator, where
-@c OBSOLETE @var{keyword} is an entry in the AMD configuration file @file{udi_soc}.
-@c OBSOLETE This file contains keyword entries which specify parameters used to
-@c OBSOLETE connect to a29k targets.  If the @file{udi_soc} file is not in your
-@c OBSOLETE working directory, you must set the environment variable @samp{UDICONF}
-@c OBSOLETE to its pathname.
-@c OBSOLETE @end table
-@c OBSOLETE 
-@c OBSOLETE @node A29K EB29K
-@c OBSOLETE @subsubsection EBMON protocol for AMD29K
-@c OBSOLETE 
-@c OBSOLETE @cindex EB29K board
-@c OBSOLETE @cindex running 29K programs
-@c OBSOLETE 
-@c OBSOLETE AMD distributes a 29K development board meant to fit in a PC, together
-@c OBSOLETE with a DOS-hosted monitor program called @code{EBMON}.  As a shorthand
-@c OBSOLETE term, this development system is called the ``EB29K''.  To use
-@c OBSOLETE @value{GDBN} from a Unix system to run programs on the EB29K board, you
-@c OBSOLETE must first connect a serial cable between the PC (which hosts the EB29K
-@c OBSOLETE board) and a serial port on the Unix system.  In the following, we
-@c OBSOLETE assume you've hooked the cable between the PC's @file{COM1} port and
-@c OBSOLETE @file{/dev/ttya} on the Unix system.
-@c OBSOLETE 
-@c OBSOLETE @node Comms (EB29K)
-@c OBSOLETE @subsubsection Communications setup
-@c OBSOLETE 
-@c OBSOLETE The next step is to set up the PC's port, by doing something like this
-@c OBSOLETE in DOS on the PC:
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE C:\> MODE com1:9600,n,8,1,none
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @noindent
-@c OBSOLETE This example---run on an MS DOS 4.0 system---sets the PC port to 9600
-@c OBSOLETE bps, no parity, eight data bits, one stop bit, and no ``retry'' action;
-@c OBSOLETE you must match the communications parameters when establishing the Unix
-@c OBSOLETE end of the connection as well.
-@c OBSOLETE @c FIXME: Who knows what this "no retry action" crud from the DOS manual may
-@c OBSOLETE @c       mean?  It's optional; leave it out? ---doc@cygnus.com, 25feb91
-@c OBSOLETE @c
-@c OBSOLETE @c It's optional, but it's unwise to omit it: who knows what is the
-@c OBSOLETE @c default value set when the DOS machines boots?  "No retry" means that
-@c OBSOLETE @c the DOS serial device driver won't retry the operation if it fails;
-@c OBSOLETE @c I understand that this is needed because the GDB serial protocol
-@c OBSOLETE @c handles any errors and retransmissions itself. ---Eli Zaretskii, 3sep99
-@c OBSOLETE 
-@c OBSOLETE To give control of the PC to the Unix side of the serial line, type
-@c OBSOLETE the following at the DOS console:
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE C:\> CTTY com1
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @noindent
-@c OBSOLETE (Later, if you wish to return control to the DOS console, you can use
-@c OBSOLETE the command @code{CTTY con}---but you must send it over the device that
-@c OBSOLETE had control, in our example over the @file{COM1} serial line.)
-@c OBSOLETE 
-@c OBSOLETE From the Unix host, use a communications program such as @code{tip} or
-@c OBSOLETE @code{cu} to communicate with the PC; for example,
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE cu -s 9600 -l /dev/ttya
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @noindent
-@c OBSOLETE The @code{cu} options shown specify, respectively, the linespeed and the
-@c OBSOLETE serial port to use.  If you use @code{tip} instead, your command line
-@c OBSOLETE may look something like the following:
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE tip -9600 /dev/ttya
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @noindent
-@c OBSOLETE Your system may require a different name where we show
-@c OBSOLETE @file{/dev/ttya} as the argument to @code{tip}.  The communications
-@c OBSOLETE parameters, including which port to use, are associated with the
-@c OBSOLETE @code{tip} argument in the ``remote'' descriptions file---normally the
-@c OBSOLETE system table @file{/etc/remote}.
-@c OBSOLETE @c FIXME: What if anything needs doing to match the "n,8,1,none" part of
-@c OBSOLETE @c the DOS side's comms setup?  cu can support -o (odd
-@c OBSOLETE @c parity), -e (even parity)---apparently no settings for no parity or
-@c OBSOLETE @c for character size.  Taken from stty maybe...?  John points out tip
-@c OBSOLETE @c can set these as internal variables, eg ~s parity=none; man stty
-@c OBSOLETE @c suggests that it *might* work to stty these options with stdin or
-@c OBSOLETE @c stdout redirected... ---doc@cygnus.com, 25feb91
-@c OBSOLETE @c
-@c OBSOLETE @c There's nothing to be done for the "none" part of the DOS MODE
-@c OBSOLETE @c command.  The rest of the parameters should be matched by the
-@c OBSOLETE @c baudrate, bits, and parity used by the Unix side. ---Eli Zaretskii, 3Sep99
-@c OBSOLETE 
-@c OBSOLETE @kindex EBMON
-@c OBSOLETE Using the @code{tip} or @code{cu} connection, change the DOS working
-@c OBSOLETE directory to the directory containing a copy of your 29K program, then
-@c OBSOLETE start the PC program @code{EBMON} (an EB29K control program supplied
-@c OBSOLETE with your board by AMD).  You should see an initial display from
-@c OBSOLETE @code{EBMON} similar to the one that follows, ending with the
-@c OBSOLETE @code{EBMON} prompt @samp{#}---
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE C:\> G:
-@c OBSOLETE 
-@c OBSOLETE G:\> CD \usr\joe\work29k
-@c OBSOLETE 
-@c OBSOLETE G:\USR\JOE\WORK29K> EBMON
-@c OBSOLETE Am29000 PC Coprocessor Board Monitor, version 3.0-18
-@c OBSOLETE Copyright 1990 Advanced Micro Devices, Inc.
-@c OBSOLETE Written by Gibbons and Associates, Inc.
-@c OBSOLETE 
-@c OBSOLETE Enter '?' or 'H' for help
-@c OBSOLETE 
-@c OBSOLETE PC Coprocessor Type   = EB29K
-@c OBSOLETE I/O Base              = 0x208
-@c OBSOLETE Memory Base           = 0xd0000
-@c OBSOLETE 
-@c OBSOLETE Data Memory Size      = 2048KB
-@c OBSOLETE Available I-RAM Range = 0x8000 to 0x1fffff
-@c OBSOLETE Available D-RAM Range = 0x80002000 to 0x801fffff
-@c OBSOLETE 
-@c OBSOLETE PageSize              = 0x400
-@c OBSOLETE Register Stack Size   = 0x800
-@c OBSOLETE Memory Stack Size     = 0x1800
-@c OBSOLETE 
-@c OBSOLETE CPU PRL               = 0x3
-@c OBSOLETE Am29027 Available     = No
-@c OBSOLETE Byte Write Available  = Yes
-@c OBSOLETE 
-@c OBSOLETE # ~.
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE Then exit the @code{cu} or @code{tip} program (done in the example by
-@c OBSOLETE typing @code{~.} at the @code{EBMON} prompt).  @code{EBMON} keeps
-@c OBSOLETE running, ready for @value{GDBN} to take over.
-@c OBSOLETE 
-@c OBSOLETE For this example, we've assumed what is probably the most convenient
-@c OBSOLETE way to make sure the same 29K program is on both the PC and the Unix
-@c OBSOLETE system: a PC/NFS connection that establishes ``drive @file{G:}'' on the
-@c OBSOLETE PC as a file system on the Unix host.  If you do not have PC/NFS or
-@c OBSOLETE something similar connecting the two systems, you must arrange some
-@c OBSOLETE other way---perhaps floppy-disk transfer---of getting the 29K program
-@c OBSOLETE from the Unix system to the PC; @value{GDBN} does @emph{not} download it over the
-@c OBSOLETE serial line.
-@c OBSOLETE 
-@c OBSOLETE @node gdb-EB29K
-@c OBSOLETE @subsubsection EB29K cross-debugging
-@c OBSOLETE 
-@c OBSOLETE Finally, @code{cd} to the directory containing an image of your 29K
-@c OBSOLETE program on the Unix system, and start @value{GDBN}---specifying as argument the
-@c OBSOLETE name of your 29K program:
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE cd /usr/joe/work29k
-@c OBSOLETE @value{GDBP} myfoo
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @need 500
-@c OBSOLETE Now you can use the @code{target} command:
-@c OBSOLETE 
-@c OBSOLETE @example
-@c OBSOLETE target amd-eb /dev/ttya 9600 MYFOO
-@c OBSOLETE @c FIXME: test above 'target amd-eb' as spelled, with caps!  caps are meant to
-@c OBSOLETE @c emphasize that this is the name as seen by DOS (since I think DOS is
-@c OBSOLETE @c single-minded about case of letters).  ---doc@cygnus.com, 25feb91
-@c OBSOLETE @end example
-@c OBSOLETE 
-@c OBSOLETE @noindent
-@c OBSOLETE In this example, we've assumed your program is in a file called
-@c OBSOLETE @file{myfoo}.  Note that the filename given as the last argument to
-@c OBSOLETE @code{target amd-eb} should be the name of the program as it appears to DOS.
-@c OBSOLETE In our example this is simply @code{MYFOO}, but in general it can include
-@c OBSOLETE a DOS path, and depending on your transfer mechanism may not resemble
-@c OBSOLETE the name on the Unix side.
-@c OBSOLETE 
-@c OBSOLETE At this point, you can set any breakpoints you wish; when you are ready
-@c OBSOLETE to see your program run on the 29K board, use the @value{GDBN} command
-@c OBSOLETE @code{run}.
-@c OBSOLETE 
-@c OBSOLETE To stop debugging the remote program, use the @value{GDBN} @code{detach}
-@c OBSOLETE command.
-@c OBSOLETE 
-@c OBSOLETE To return control of the PC to its console, use @code{tip} or @code{cu}
-@c OBSOLETE once again, after your @value{GDBN} session has concluded, to attach to
-@c OBSOLETE @code{EBMON}.  You can then type the command @code{q} to shut down
-@c OBSOLETE @code{EBMON}, returning control to the DOS command-line interpreter.
-@c OBSOLETE Type @kbd{CTTY con} to return command input to the main DOS console,
-@c OBSOLETE and type @kbd{~.} to leave @code{tip} or @code{cu}.
-@c OBSOLETE 
-@c OBSOLETE @node Remote Log
-@c OBSOLETE @subsubsection Remote log
-@c OBSOLETE @cindex @file{eb.log}, a log file for EB29K
-@c OBSOLETE @cindex log file for EB29K
-@c OBSOLETE 
-@c OBSOLETE The @code{target amd-eb} command creates a file @file{eb.log} in the
-@c OBSOLETE current working directory, to help debug problems with the connection.
-@c OBSOLETE @file{eb.log} records all the output from @code{EBMON}, including echoes
-@c OBSOLETE of the commands sent to it.  Running @samp{tail -f} on this file in
-@c OBSOLETE another window often helps to understand trouble with @code{EBMON}, or
-@c OBSOLETE unexpected events on the PC side of the connection.
+@item
+What compiler (and its version) was used to compile the program you are
+debugging---e.g.  ``@value{GCC}--2.8.1'', or ``HP92453-01 A.10.32.03 HP
+C Compiler''.  For GCC, you can say @code{gcc --version} to get this
+information; for other compilers, see the documentation for those
+compilers.
 
-@node ARM
-@subsection ARM
+@item
+The command arguments you gave the compiler to compile your example and
+observe the bug.  For example, did you use @samp{-O}?  To guarantee
+you will not omit something important, list them all.  A copy of the
+Makefile (or the output from make) is sufficient.
 
-@table @code
+If we were to try to guess the arguments, we would probably guess wrong
+and then we might not encounter the bug.
 
-@kindex target rdi
-@item target rdi @var{dev}
-ARM Angel monitor, via RDI library interface to ADP protocol.  You may
-use this target to communicate with both boards running the Angel
-monitor, or with the EmbeddedICE JTAG debug device.
+@item
+A complete input script, and all necessary source files, that will
+reproduce the bug.
 
-@kindex target rdp
-@item target rdp @var{dev}
-ARM Demon monitor.
+@item
+A description of what behavior you observe that you believe is
+incorrect.  For example, ``It gets a fatal signal.''
 
-@end table
+Of course, if the bug is that @value{GDBN} gets a fatal signal, then we
+will certainly notice it.  But if the bug is incorrect output, we might
+not notice unless it is glaringly wrong.  You might as well not give us
+a chance to make a mistake.
 
-@node H8/300
-@subsection Hitachi H8/300
+Even if the problem you experience is a fatal signal, you should still
+say so explicitly.  Suppose something strange is going on, such as, your
+copy of @value{GDBN} is out of synch, or you have encountered a bug in
+the C library on your system.  (This has happened!)  Your copy might
+crash and ours would not.  If you told us to expect a crash, then when
+ours fails to crash, we would know that the bug was not happening for
+us.  If you had not told us to expect a crash, then we would not be able
+to draw any conclusion from our observations.
 
-@table @code
+@item
+If you wish to suggest changes to the @value{GDBN} source, send us context
+diffs.  If you even discuss something in the @value{GDBN} source, refer to
+it by context, not by line number.
 
-@kindex target hms@r{, with H8/300}
-@item target hms @var{dev}
-A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
-Use special commands @code{device} and @code{speed} to control the serial
-line and the communications speed used.
+The line numbers in our development sources will not match those in your
+sources.  Your line numbers would convey no useful information to us.
 
-@kindex target e7000@r{, with H8/300}
-@item target e7000 @var{dev}
-E7000 emulator for Hitachi H8 and SH.
+@end itemize
 
-@kindex target sh3@r{, with H8/300}
-@kindex target sh3e@r{, with H8/300}
-@item target sh3 @var{dev}
-@itemx target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Here are some things that are not necessary:
 
-@end table
+@itemize @bullet
+@item
+A description of the envelope of the bug.
 
-@cindex download to H8/300 or H8/500
-@cindex H8/300 or H8/500 download
-@cindex download to Hitachi SH
-@cindex Hitachi SH download
-When you select remote debugging to a Hitachi SH, H8/300, or H8/500
-board, the @code{load} command downloads your program to the Hitachi
-board and also opens it as the current executable target for
-@value{GDBN} on your host (like the @code{file} command).
+Often people who encounter a bug spend a lot of time investigating
+which changes to the input file will make the bug go away and which
+changes will not affect it.
+
+This is often time consuming and not very useful, because the way we
+will find the bug is by running a single example under the debugger
+with breakpoints, not by pure deduction from a series of examples.
+We recommend that you save your time for something else.
 
-@value{GDBN} needs to know these things to talk to your
-Hitachi SH, H8/300, or H8/500:
+Of course, if you can find a simpler example to report @emph{instead}
+of the original one, that is a convenience for us.  Errors in the
+output will be easier to spot, running under the debugger will take
+less time, and so on.
 
-@enumerate
-@item
-that you want to use @samp{target hms}, the remote debugging interface
-for Hitachi microprocessors, or @samp{target e7000}, the in-circuit
-emulator for the Hitachi SH and the Hitachi 300H.  (@samp{target hms} is
-the default when @value{GDBN} is configured specifically for the Hitachi SH,
-H8/300, or H8/500.)
+However, simplification is not vital; if you do not want to do this,
+report the bug anyway and send us the entire test case you used.
 
 @item
-what serial device connects your host to your Hitachi board (the first
-serial device available on your host is the default).
+A patch for the bug.
+
+A patch for the bug does help us if it is a good one.  But do not omit
+the necessary information, such as the test case, on the assumption that
+a patch is all we need.  We might see problems with your patch and decide
+to fix the problem another way, or we might not understand it at all.
+
+Sometimes with a program as complicated as @value{GDBN} it is very hard to
+construct an example that will make the program follow a certain path
+through the code.  If you do not send us the example, we will not be able
+to construct one, so we will not be able to verify that the bug is fixed.
+
+And if we cannot understand what bug you are trying to fix, or why your
+patch should be an improvement, we will not install it.  A test case will
+help us to understand.
 
 @item
-what speed to use over the serial device.
-@end enumerate
+A guess about what the bug is or what it depends on.
 
-@menu
-* Hitachi Boards::      Connecting to Hitachi boards.
-* Hitachi ICE::         Using the E7000 In-Circuit Emulator.
-* Hitachi Special::     Special @value{GDBN} commands for Hitachi micros.
-@end menu
+Such guesses are usually wrong.  Even we cannot guess right about such
+things without first using the debugger to find the facts.
+@end itemize
 
-@node Hitachi Boards
-@subsubsection Connecting to Hitachi boards
+@c The readline documentation is distributed with the readline code
+@c and consists of the two following files:
+@c     rluser.texinfo
+@c     inc-hist.texinfo
+@c Use -I with makeinfo to point to the appropriate directory,
+@c environment var TEXINPUTS with TeX.
+@include rluser.texinfo
+@include inc-hist.texinfo
 
-@c only for Unix hosts
-@kindex device
-@cindex serial device, Hitachi micros
-Use the special @code{@value{GDBN}} command @samp{device @var{port}} if you
-need to explicitly set the serial device.  The default @var{port} is the
-first available port on your host.  This is only necessary on Unix
-hosts, where it is typically something like @file{/dev/ttya}.
 
-@kindex speed
-@cindex serial line speed, Hitachi micros
-@code{@value{GDBN}} has another special command to set the communications
-speed: @samp{speed @var{bps}}.  This command also is only used from Unix
-hosts; on DOS hosts, set the line speed as usual from outside @value{GDBN} with
-the DOS @code{mode} command (for instance,
-@w{@kbd{mode com2:9600,n,8,1,p}} for a 9600@dmn{bps} connection).
+@node Formatting Documentation
+@appendix Formatting Documentation
 
-The @samp{device} and @samp{speed} commands are available only when you
-use a Unix host to debug your Hitachi microprocessor programs.  If you
-use a DOS host,
-@value{GDBN} depends on an auxiliary terminate-and-stay-resident program
-called @code{asynctsr} to communicate with the development board
-through a PC serial port.  You must also use the DOS @code{mode} command
-to set up the serial port on the DOS side.
+@cindex @value{GDBN} reference card
+@cindex reference card
+The @value{GDBN} 4 release includes an already-formatted reference card, ready
+for printing with PostScript or Ghostscript, in the @file{gdb}
+subdirectory of the main source directory@footnote{In
+@file{gdb-@value{GDBVN}/gdb/refcard.ps} of the version @value{GDBVN}
+release.}.  If you can use PostScript or Ghostscript with your printer,
+you can print the reference card immediately with @file{refcard.ps}.
 
-The following sample session illustrates the steps needed to start a
-program under @value{GDBN} control on an H8/300.  The example uses a
-sample H8/300 program called @file{t.x}.  The procedure is the same for
-the Hitachi SH and the H8/500.
+The release also includes the source for the reference card.  You
+can format it, using @TeX{}, by typing:
 
-First hook up your development board.  In this example, we use a
-board attached to serial port @code{COM2}; if you use a different serial
-port, substitute its name in the argument of the @code{mode} command.
-When you call @code{asynctsr}, the auxiliary comms program used by the
-debugger, you give it just the numeric part of the serial port's name;
-for example, @samp{asyncstr 2} below runs @code{asyncstr} on
-@code{COM2}.
+@smallexample
+make refcard.dvi
+@end smallexample
 
-@example
-C:\H8300\TEST> asynctsr 2
-C:\H8300\TEST> mode com2:9600,n,8,1,p
+The @value{GDBN} reference card is designed to print in @dfn{landscape}
+mode on US ``letter'' size paper;
+that is, on a sheet 11 inches wide by 8.5 inches
+high.  You will need to specify this form of printing as an option to
+your @sc{dvi} output program.
 
-Resident portion of MODE loaded
+@cindex documentation
 
-COM2: 9600, n, 8, 1, p
+All the documentation for @value{GDBN} comes as part of the machine-readable
+distribution.  The documentation is written in Texinfo format, which is
+a documentation system that uses a single source file to produce both
+on-line information and a printed manual.  You can use one of the Info
+formatting commands to create the on-line version of the documentation
+and @TeX{} (or @code{texi2roff}) to typeset the printed version.
 
-@end example
+@value{GDBN} includes an already formatted copy of the on-line Info
+version of this manual in the @file{gdb} subdirectory.  The main Info
+file is @file{gdb-@value{GDBVN}/gdb/gdb.info}, and it refers to
+subordinate files matching @samp{gdb.info*} in the same directory.  If
+necessary, you can print out these files, or read them with any editor;
+but they are easier to read using the @code{info} subsystem in @sc{gnu}
+Emacs or the standalone @code{info} program, available as part of the
+@sc{gnu} Texinfo distribution.
 
-@quotation
-@emph{Warning:} We have noticed a bug in PC-NFS that conflicts with
-@code{asynctsr}.  If you also run PC-NFS on your DOS host, you may need to
-disable it, or even boot without it, to use @code{asynctsr} to control
-your development board.
-@end quotation
+If you want to format these Info files yourself, you need one of the
+Info formatting programs, such as @code{texinfo-format-buffer} or
+@code{makeinfo}.
 
-@kindex target hms@r{, and serial protocol}
-Now that serial communications are set up, and the development board is
-connected, you can start up @value{GDBN}.  Call @code{@value{GDBP}} with
-the name of your program as the argument.  @code{@value{GDBN}} prompts
-you, as usual, with the prompt @samp{(@value{GDBP})}.  Use two special
-commands to begin your debugging session: @samp{target hms} to specify
-cross-debugging to the Hitachi board, and the @code{load} command to
-download your program to the board.  @code{load} displays the names of
-the program's sections, and a @samp{*} for each 2K of data downloaded.
-(If you want to refresh @value{GDBN} data on symbols or on the
-executable file without downloading, use the @value{GDBN} commands
-@code{file} or @code{symbol-file}.  These commands, and @code{load}
-itself, are described in @ref{Files,,Commands to specify files}.)
+If you have @code{makeinfo} installed, and are in the top level
+@value{GDBN} source directory (@file{gdb-@value{GDBVN}}, in the case of
+version @value{GDBVN}), you can make the Info file by typing:
 
 @smallexample
-(eg-C:\H8300\TEST) @value{GDBP} t.x
-@value{GDBN} is free software and you are welcome to distribute copies
- of it under certain conditions; type "show copying" to see
- the conditions.
-There is absolutely no warranty for @value{GDBN}; type "show warranty"
-for details.
-@value{GDBN} @value{GDBVN}, Copyright 1992 Free Software Foundation, Inc...
-(@value{GDBP}) target hms
-Connected to remote H8/300 HMS system.
-(@value{GDBP}) load t.x
-.text   : 0x8000 .. 0xabde ***********
-.data   : 0xabde .. 0xad30 *
-.stack  : 0xf000 .. 0xf014 *
+cd gdb
+make gdb.info
 @end smallexample
 
-At this point, you're ready to run or debug your program.  From here on,
-you can use all the usual @value{GDBN} commands.  The @code{break} command
-sets breakpoints; the @code{run} command starts your program;
-@code{print} or @code{x} display data; the @code{continue} command
-resumes execution after stopping at a breakpoint.  You can use the
-@code{help} command at any time to find out more about @value{GDBN} commands.
-
-Remember, however, that @emph{operating system} facilities aren't
-available on your development board; for example, if your program hangs,
-you can't send an interrupt---but you can press the @sc{reset} switch!
+If you want to typeset and print copies of this manual, you need @TeX{},
+a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
+Texinfo definitions file.
 
-Use the @sc{reset} button on the development board
-@itemize @bullet
-@item
-to interrupt your program (don't use @kbd{ctl-C} on the DOS host---it has
-no way to pass an interrupt signal to the development board); and
+@TeX{} is a typesetting program; it does not print files directly, but
+produces output files called @sc{dvi} files.  To print a typeset
+document, you need a program to print @sc{dvi} files.  If your system
+has @TeX{} installed, chances are it has such a program.  The precise
+command to use depends on your system; @kbd{lpr -d} is common; another
+(for PostScript devices) is @kbd{dvips}.  The @sc{dvi} print command may
+require a file name without any extension or a @samp{.dvi} extension.
 
-@item
-to return to the @value{GDBN} command prompt after your program finishes
-normally.  The communications protocol provides no other way for @value{GDBN}
-to detect program completion.
-@end itemize
+@TeX{} also requires a macro definitions file called
+@file{texinfo.tex}.  This file tells @TeX{} how to typeset a document
+written in Texinfo format.  On its own, @TeX{} cannot either read or
+typeset a Texinfo file.  @file{texinfo.tex} is distributed with GDB
+and is located in the @file{gdb-@var{version-number}/texinfo}
+directory.
 
-In either case, @value{GDBN} sees the effect of a @sc{reset} on the
-development board as a ``normal exit'' of your program.
+If you have @TeX{} and a @sc{dvi} printer program installed, you can
+typeset and print this manual.  First switch to the the @file{gdb}
+subdirectory of the main source directory (for example, to
+@file{gdb-@value{GDBVN}/gdb}) and type:
 
-@node Hitachi ICE
-@subsubsection Using the E7000 in-circuit emulator
+@smallexample
+make gdb.dvi
+@end smallexample
 
-@kindex target e7000@r{, with Hitachi ICE}
-You can use the E7000 in-circuit emulator to develop code for either the
-Hitachi SH or the H8/300H.  Use one of these forms of the @samp{target
-e7000} command to connect @value{GDBN} to your E7000:
+Then give @file{gdb.dvi} to your @sc{dvi} printing program.
 
-@table @code
-@item target e7000 @var{port} @var{speed}
-Use this form if your E7000 is connected to a serial port.  The
-@var{port} argument identifies what serial port to use (for example,
-@samp{com2}).  The third argument is the line speed in bits per second
-(for example, @samp{9600}).
+@node Installing GDB
+@appendix Installing @value{GDBN}
+@cindex configuring @value{GDBN}
+@cindex installation
+@cindex configuring @value{GDBN}, and source tree subdirectories
 
-@item target e7000 @var{hostname}
-If your E7000 is installed as a host on a TCP/IP network, you can just
-specify its hostname; @value{GDBN} uses @code{telnet} to connect.
-@end table
+@value{GDBN} comes with a @code{configure} script that automates the process
+of preparing @value{GDBN} for installation; you can then use @code{make} to
+build the @code{gdb} program.
+@iftex
+@c irrelevant in info file; it's as current as the code it lives with.
+@footnote{If you have a more recent version of @value{GDBN} than @value{GDBVN},
+look at the @file{README} file in the sources; we may have improved the
+installation procedures since publishing this manual.}
+@end iftex
 
-@node Hitachi Special
-@subsubsection Special @value{GDBN} commands for Hitachi micros
+The @value{GDBN} distribution includes all the source code you need for
+@value{GDBN} in a single directory, whose name is usually composed by
+appending the version number to @samp{gdb}.
 
-Some @value{GDBN} commands are available only for the H8/300:
+For example, the @value{GDBN} version @value{GDBVN} distribution is in the
+@file{gdb-@value{GDBVN}} directory.  That directory contains:
 
 @table @code
+@item gdb-@value{GDBVN}/configure @r{(and supporting files)}
+script for configuring @value{GDBN} and all its supporting libraries
+
+@item gdb-@value{GDBVN}/gdb
+the source specific to @value{GDBN} itself
+
+@item gdb-@value{GDBVN}/bfd
+source for the Binary File Descriptor library
 
-@kindex set machine
-@kindex show machine
-@item set machine h8300
-@itemx set machine h8300h
-Condition @value{GDBN} for one of the two variants of the H8/300
-architecture with @samp{set machine}.  You can use @samp{show machine}
-to check which variant is currently in effect.
+@item gdb-@value{GDBVN}/include
+@sc{gnu} include files
 
-@end table
+@item gdb-@value{GDBVN}/libiberty
+source for the @samp{-liberty} free software library
 
-@node H8/500
-@subsection H8/500
+@item gdb-@value{GDBVN}/opcodes
+source for the library of opcode tables and disassemblers
 
-@table @code
+@item gdb-@value{GDBVN}/readline
+source for the @sc{gnu} command-line interface
 
-@kindex set memory @var{mod}
-@cindex memory models, H8/500
-@item set memory @var{mod}
-@itemx show memory
-Specify which H8/500 memory model (@var{mod}) you are using with
-@samp{set memory}; check which memory model is in effect with @samp{show
-memory}.  The accepted values for @var{mod} are @code{small},
-@code{big}, @code{medium}, and @code{compact}.
+@item gdb-@value{GDBVN}/glob
+source for the @sc{gnu} filename pattern-matching subroutine
 
+@item gdb-@value{GDBVN}/mmalloc
+source for the @sc{gnu} memory-mapped malloc package
 @end table
 
-@node i960
-@subsection Intel i960
+The simplest way to configure and build @value{GDBN} is to run @code{configure}
+from the @file{gdb-@var{version-number}} source directory, which in
+this example is the @file{gdb-@value{GDBVN}} directory.
 
-@table @code
+First switch to the @file{gdb-@var{version-number}} source directory
+if you are not already in it; then run @code{configure}.  Pass the
+identifier for the platform on which @value{GDBN} will run as an
+argument.
 
-@kindex target mon960
-@item target mon960 @var{dev}
-MON960 monitor for Intel i960.
+For example:
 
-@kindex target nindy
-@item target nindy @var{devicename}
-An Intel 960 board controlled by a Nindy Monitor.  @var{devicename} is
-the name of the serial device to use for the connection, e.g.
-@file{/dev/ttya}.
+@smallexample
+cd gdb-@value{GDBVN}
+./configure @var{host}
+make
+@end smallexample
 
-@end table
+@noindent
+where @var{host} is an identifier such as @samp{sun4} or
+@samp{decstation}, that identifies the platform where @value{GDBN} will run.
+(You can often leave off @var{host}; @code{configure} tries to guess the
+correct value by examining your system.)
 
-@cindex Nindy
-@cindex i960
-@dfn{Nindy} is a ROM Monitor program for Intel 960 target systems.  When
-@value{GDBN} is configured to control a remote Intel 960 using Nindy, you can
-tell @value{GDBN} how to connect to the 960 in several ways:
+Running @samp{configure @var{host}} and then running @code{make} builds the
+@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
+libraries, then @code{gdb} itself.  The configured source files, and the
+binaries, are left in the corresponding source directories.
 
-@itemize @bullet
-@item
-Through command line options specifying serial port, version of the
-Nindy protocol, and communications speed;
+@need 750
+@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
+system does not recognize this automatically when you run a different
+shell, you may need to run @code{sh} on it explicitly:
 
-@item
-By responding to a prompt on startup;
+@smallexample
+sh configure @var{host}
+@end smallexample
 
-@item
-By using the @code{target} command at any point during your @value{GDBN}
-session.  @xref{Target Commands, ,Commands for managing targets}.
+If you run @code{configure} from a directory that contains source
+directories for multiple libraries or programs, such as the
+@file{gdb-@value{GDBVN}} source directory for version @value{GDBVN}, @code{configure}
+creates configuration files for every directory level underneath (unless
+you tell it not to, with the @samp{--norecursion} option).
 
-@end itemize
+You should run the @code{configure} script from the top directory in the
+source tree, the @file{gdb-@var{version-number}} directory.  If you run
+@code{configure} from one of the subdirectories, you will configure only
+that subdirectory.  That is usually not what you want.  In particular,
+if you run the first @code{configure} from the @file{gdb} subdirectory
+of the @file{gdb-@var{version-number}} directory, you will omit the
+configuration of @file{bfd}, @file{readline}, and other sibling
+directories of the @file{gdb} subdirectory.  This leads to build errors
+about missing include files such as @file{bfd/bfd.h}.
 
-@cindex download to Nindy-960
-With the Nindy interface to an Intel 960 board, @code{load}
-downloads @var{filename} to the 960 as well as adding its symbols in
-@value{GDBN}.
+You can install @code{@value{GDBP}} anywhere; it has no hardwired paths.
+However, you should make sure that the shell on your path (named by
+the @samp{SHELL} environment variable) is publicly readable.  Remember
+that @value{GDBN} uses the shell to start your program---some systems refuse to
+let @value{GDBN} debug child processes whose programs are not readable.
 
 @menu
-* Nindy Startup::               Startup with Nindy
-* Nindy Options::               Options for Nindy
-* Nindy Reset::                 Nindy reset command
+* Separate Objdir::             Compiling @value{GDBN} in another directory
+* Config Names::                Specifying names for hosts and targets
+* Configure Options::           Summary of options for configure
 @end menu
 
-@node Nindy Startup
-@subsubsection Startup with Nindy
+@node Separate Objdir
+@section Compiling @value{GDBN} in another directory
 
-If you simply start @code{@value{GDBP}} without using any command-line
-options, you are prompted for what serial port to use, @emph{before} you
-reach the ordinary @value{GDBN} prompt:
+If you want to run @value{GDBN} versions for several host or target machines,
+you need a different @code{gdb} compiled for each combination of
+host and target.  @code{configure} is designed to make this easy by
+allowing you to generate each configuration in a separate subdirectory,
+rather than in the source directory.  If your @code{make} program
+handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
+@code{make} in each of these directories builds the @code{gdb}
+program specified there.
 
-@example
-Attach /dev/ttyNN -- specify NN, or "quit" to quit:
-@end example
+To build @code{gdb} in a separate directory, run @code{configure}
+with the @samp{--srcdir} option to specify where to find the source.
+(You also need to specify a path to find @code{configure}
+itself from your working directory.  If the path to @code{configure}
+would be the same as the argument to @samp{--srcdir}, you can leave out
+the @samp{--srcdir} option; it is assumed.)
 
-@noindent
-Respond to the prompt with whatever suffix (after @samp{/dev/tty})
-identifies the serial port you want to use.  You can, if you choose,
-simply start up with no Nindy connection by responding to the prompt
-with an empty line.  If you do this and later wish to attach to Nindy,
-use @code{target} (@pxref{Target Commands, ,Commands for managing targets}).
+For example, with version @value{GDBVN}, you can build @value{GDBN} in a
+separate directory for a Sun 4 like this:
 
-@node Nindy Options
-@subsubsection Options for Nindy
+@smallexample
+@group
+cd gdb-@value{GDBVN}
+mkdir ../gdb-sun4
+cd ../gdb-sun4
+../gdb-@value{GDBVN}/configure sun4
+make
+@end group
+@end smallexample
 
-These are the startup options for beginning your @value{GDBN} session with a
-Nindy-960 board attached:
+When @code{configure} builds a configuration using a remote source
+directory, it creates a tree for the binaries with the same structure
+(and using the same names) as the tree under the source directory.  In
+the example, you'd find the Sun 4 library @file{libiberty.a} in the
+directory @file{gdb-sun4/libiberty}, and @value{GDBN} itself in
+@file{gdb-sun4/gdb}.
 
-@table @code
-@item -r @var{port}
-Specify the serial port name of a serial interface to be used to connect
-to the target system.  This option is only available when @value{GDBN} is
-configured for the Intel 960 target architecture.  You may specify
-@var{port} as any of: a full pathname (e.g. @samp{-r /dev/ttya}), a
-device name in @file{/dev} (e.g. @samp{-r ttya}), or simply the unique
-suffix for a specific @code{tty} (e.g. @samp{-r a}).
+Make sure that your path to the @file{configure} script has just one
+instance of @file{gdb} in it.  If your path to @file{configure} looks
+like @file{../gdb-@value{GDBVN}/gdb/configure}, you are configuring only
+one subdirectory of @value{GDBN}, not the whole package.  This leads to
+build errors about missing include files such as @file{bfd/bfd.h}.
 
-@item -O
-(An uppercase letter ``O'', not a zero.)  Specify that @value{GDBN} should use
-the ``old'' Nindy monitor protocol to connect to the target system.
-This option is only available when @value{GDBN} is configured for the Intel 960
-target architecture.
+One popular reason to build several @value{GDBN} configurations in separate
+directories is to configure @value{GDBN} for cross-compiling (where
+@value{GDBN} runs on one machine---the @dfn{host}---while debugging
+programs that run on another machine---the @dfn{target}).
+You specify a cross-debugging target by
+giving the @samp{--target=@var{target}} option to @code{configure}.
 
-@quotation
-@emph{Warning:} if you specify @samp{-O}, but are actually trying to
-connect to a target system that expects the newer protocol, the connection
-fails, appearing to be a speed mismatch.  @value{GDBN} repeatedly
-attempts to reconnect at several different line speeds.  You can abort
-this process with an interrupt.
-@end quotation
+When you run @code{make} to build a program or library, you must run
+it in a configured directory---whatever directory you were in when you
+called @code{configure} (or one of its subdirectories).
 
-@item -brk
-Specify that @value{GDBN} should first send a @code{BREAK} signal to the target
-system, in an attempt to reset it, before connecting to a Nindy target.
+The @code{Makefile} that @code{configure} generates in each source
+directory also runs recursively.  If you type @code{make} in a source
+directory such as @file{gdb-@value{GDBVN}} (or in a separate configured
+directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{GDBVN}}), you
+will build all the required libraries, and then build GDB.
 
-@quotation
-@emph{Warning:} Many target systems do not have the hardware that this
-requires; it only works with a few boards.
-@end quotation
-@end table
+When you have multiple hosts or targets configured in separate
+directories, you can run @code{make} on them in parallel (for example,
+if they are NFS-mounted on each of the hosts); they will not interfere
+with each other.
 
-The standard @samp{-b} option controls the line speed used on the serial
-port.
+@node Config Names
+@section Specifying names for hosts and targets
 
-@c @group
-@node Nindy Reset
-@subsubsection Nindy reset command
+The specifications used for hosts and targets in the @code{configure}
+script are based on a three-part naming scheme, but some short predefined
+aliases are also supported.  The full naming scheme encodes three pieces
+of information in the following pattern:
 
-@table @code
-@item reset
-@kindex reset
-For a Nindy target, this command sends a ``break'' to the remote target
-system; this is only useful if the target has been equipped with a
-circuit to perform a hard reset (or some other interesting action) when
-a break is detected.
-@end table
-@c @end group
+@smallexample
+@var{architecture}-@var{vendor}-@var{os}
+@end smallexample
 
-@node M32R/D
-@subsection Mitsubishi M32R/D
+For example, you can use the alias @code{sun4} as a @var{host} argument,
+or as the value for @var{target} in a @code{--target=@var{target}}
+option.  The equivalent full name is @samp{sparc-sun-sunos4}.
 
-@table @code
+The @code{configure} script accompanying @value{GDBN} does not provide
+any query facility to list all supported host and target names or
+aliases.  @code{configure} calls the Bourne shell script
+@code{config.sub} to map abbreviations to full names; you can read the
+script, if you wish, or you can use it to test your guesses on
+abbreviations---for example:
 
-@kindex target m32r
-@item target m32r @var{dev}
-Mitsubishi M32R/D ROM monitor.
+@smallexample
+% sh config.sub i386-linux
+i386-pc-linux-gnu
+% sh config.sub alpha-linux
+alpha-unknown-linux-gnu
+% sh config.sub hp9k700
+hppa1.1-hp-hpux
+% sh config.sub sun4
+sparc-sun-sunos4.1.1
+% sh config.sub sun3
+m68k-sun-sunos4.1.1
+% sh config.sub i986v
+Invalid configuration `i986v': machine `i986v' not recognized
+@end smallexample
 
-@end table
+@noindent
+@code{config.sub} is also distributed in the @value{GDBN} source
+directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}).
 
-@node M68K
-@subsection M68k
+@node Configure Options
+@section @code{configure} options
 
-The Motorola m68k configuration includes ColdFire support, and
-target command for the following ROM monitors.
+Here is a summary of the @code{configure} options and arguments that
+are most often useful for building @value{GDBN}.  @code{configure} also has
+several other options not listed here.  @inforef{What Configure
+Does,,configure.info}, for a full explanation of @code{configure}.
 
-@table @code
+@smallexample
+configure @r{[}--help@r{]}
+          @r{[}--prefix=@var{dir}@r{]}
+          @r{[}--exec-prefix=@var{dir}@r{]}
+          @r{[}--srcdir=@var{dirname}@r{]}
+          @r{[}--norecursion@r{]} @r{[}--rm@r{]}
+          @r{[}--target=@var{target}@r{]}
+          @var{host}
+@end smallexample
 
-@kindex target abug
-@item target abug @var{dev}
-ABug ROM monitor for M68K.
+@noindent
+You may introduce options with a single @samp{-} rather than
+@samp{--} if you prefer; but you may abbreviate option names if you use
+@samp{--}.
 
-@kindex target cpu32bug
-@item target cpu32bug @var{dev}
-CPU32BUG monitor, running on a CPU32 (M68K) board.
+@table @code
+@item --help
+Display a quick summary of how to invoke @code{configure}.
 
-@kindex target dbug
-@item target dbug @var{dev}
-dBUG ROM monitor for Motorola ColdFire.
+@item --prefix=@var{dir}
+Configure the source to install programs and files under directory
+@file{@var{dir}}.
 
-@kindex target est
-@item target est @var{dev}
-EST-300 ICE monitor, running on a CPU32 (M68K) board.
+@item --exec-prefix=@var{dir}
+Configure the source to install programs under directory
+@file{@var{dir}}.
 
-@kindex target rom68k
-@item target rom68k @var{dev}
-ROM 68K monitor, running on an M68K IDP board.
+@c avoid splitting the warning from the explanation:
+@need 2000
+@item --srcdir=@var{dirname}
+@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
+@code{make} that implements the @code{VPATH} feature.}@*
+Use this option to make configurations in directories separate from the
+@value{GDBN} source directories.  Among other things, you can use this to
+build (or maintain) several configurations simultaneously, in separate
+directories.  @code{configure} writes configuration specific files in
+the current directory, but arranges for them to use the source in the
+directory @var{dirname}.  @code{configure} creates directories under
+the working directory in parallel to the source directories below
+@var{dirname}.
 
-@end table
+@item --norecursion
+Configure only the directory level where @code{configure} is executed; do not
+propagate configuration to subdirectories.
 
-If @value{GDBN} is configured with @code{m68*-ericsson-*}, it will
-instead have only a single special target command:
+@item --target=@var{target}
+Configure @value{GDBN} for cross-debugging programs running on the specified
+@var{target}.  Without this option, @value{GDBN} is configured to debug
+programs that run on the same machine (@var{host}) as @value{GDBN} itself.
 
-@table @code
+There is no convenient way to generate a list of all available targets.
 
-@kindex target es1800
-@item target es1800 @var{dev}
-ES-1800 emulator for M68K.
+@item @var{host} @dots{}
+Configure @value{GDBN} to run on the specified @var{host}.
 
+There is no convenient way to generate a list of all available hosts.
 @end table
 
-[context?]
-
-@table @code
+There are many other options available as well, but they are generally
+needed for special purposes only.
 
-@kindex target rombug
-@item target rombug @var{dev}
-ROMBUG ROM monitor for OS/9000.
+@node Maintenance Commands
+@appendix Maintenance Commands
+@cindex maintenance commands
+@cindex internal commands
 
-@end table
+In addition to commands intended for @value{GDBN} users, @value{GDBN}
+includes a number of commands intended for @value{GDBN} developers.
+These commands are provided here for reference.
 
-@node M88K
-@subsection M88K
+@table @code
+@kindex maint info breakpoints
+@item @anchor{maint info breakpoints}maint info breakpoints
+Using the same format as @samp{info breakpoints}, display both the
+breakpoints you've set explicitly, and those @value{GDBN} is using for
+internal purposes.  Internal breakpoints are shown with negative
+breakpoint numbers.  The type column identifies what kind of breakpoint
+is shown:
 
 @table @code
+@item breakpoint
+Normal, explicitly set breakpoint.
 
-@kindex target bug
-@item target bug @var{dev}
-BUG monitor, running on a MVME187 (m88k) board.
+@item watchpoint
+Normal, explicitly set watchpoint.
 
-@end table
+@item longjmp
+Internal breakpoint, used to handle correctly stepping through
+@code{longjmp} calls.
 
-@node MIPS Embedded
-@subsection MIPS Embedded
+@item longjmp resume
+Internal breakpoint at the target of a @code{longjmp}.
 
-@cindex MIPS boards
-@value{GDBN} can use the MIPS remote debugging protocol to talk to a
-MIPS board attached to a serial line.  This is available when
-you configure @value{GDBN} with @samp{--target=mips-idt-ecoff}.
+@item until
+Temporary internal breakpoint used by the @value{GDBN} @code{until} command.
 
-@need 1000
-Use these @value{GDBN} commands to specify the connection to your target board:
+@item finish
+Temporary internal breakpoint used by the @value{GDBN} @code{finish} command.
 
-@table @code
-@item target mips @var{port}
-@kindex target mips @var{port}
-To run a program on the board, start up @code{@value{GDBP}} with the
-name of your program as the argument.  To connect to the board, use the
-command @samp{target mips @var{port}}, where @var{port} is the name of
-the serial port connected to the board.  If the program has not already
-been downloaded to the board, you may use the @code{load} command to
-download it.  You can then use all the usual @value{GDBN} commands.
+@item shlib events
+Shared library events.
 
-For example, this sequence connects to the target board through a serial
-port, and loads and runs a program called @var{prog} through the
-debugger:
+@end table
 
-@example
-host$ @value{GDBP} @var{prog}
-@value{GDBN} is free software and @dots{}
-(@value{GDBP}) target mips /dev/ttyb
-(@value{GDBP}) load @var{prog}
-(@value{GDBP}) run
-@end example
+@kindex maint internal-error
+@kindex maint internal-warning
+@item maint internal-error
+@itemx maint internal-warning
+Cause @value{GDBN} to call the internal function @code{internal_error}
+or @code{internal_warning} and hence behave as though an internal error
+or internal warning has been detected.  In addition to reporting the
+internal problem, these functions give the user the opportunity to
+either quit @value{GDBN} or create a core file of the current
+@value{GDBN} session.
 
-@item target mips @var{hostname}:@var{portnumber}
-On some @value{GDBN} host configurations, you can specify a TCP
-connection (for instance, to a serial line managed by a terminal
-concentrator) instead of a serial port, using the syntax
-@samp{@var{hostname}:@var{portnumber}}.
+@smallexample
+(gdb) @kbd{maint internal-error testing, 1, 2}
+@dots{}/maint.c:121: internal-error: testing, 1, 2
+A problem internal to GDB has been detected.  Further
+debugging may prove unreliable.
+Quit this debugging session? (y or n) @kbd{n}
+Create a core file? (y or n) @kbd{n}
+(gdb) 
+@end smallexample
 
-@item target pmon @var{port}
-@kindex target pmon @var{port}
-PMON ROM monitor.
+Takes an optional parameter that is used as the text of the error or
+warning message.
 
-@item target ddb @var{port}
-@kindex target ddb @var{port}
-NEC's DDB variant of PMON for Vr4300.
+@kindex maint print dummy-frames
+@item maint print dummy-frames
 
-@item target lsi @var{port}
-@kindex target lsi @var{port}
-LSI variant of PMON.
+Prints the contents of @value{GDBN}'s internal dummy-frame stack.
 
-@kindex target r3900
-@item target r3900 @var{dev}
-Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
+@smallexample
+(gdb) @kbd{b add}
+@dots{}
+(gdb) @kbd{print add(2,3)}
+Breakpoint 2, add (a=2, b=3) at @dots{}
+58       return (a + b);
+The program being debugged stopped while in a function called from GDB.
+@dots{}
+(gdb) @kbd{maint print dummy-frames}
+0x1a57c80: pc=0x01014068 fp=0x0200bddc sp=0x0200bdd6
+ top=0x0200bdd4 id=@{stack=0x200bddc,code=0x101405c@}
+ call_lo=0x01014000 call_hi=0x01014001
+(gdb) 
+@end smallexample
 
-@kindex target array
-@item target array @var{dev}
-Array Tech LSI33K RAID controller board.
+Takes an optional file parameter.
 
-@end table
+@kindex maint print registers
+@kindex maint print raw-registers
+@kindex maint print cooked-registers
+@kindex maint print register-groups
+@item maint print registers
+@itemx maint print raw-registers
+@itemx maint print cooked-registers
+@itemx maint print register-groups
+Print @value{GDBN}'s internal register data structures.
 
+The command @code{maint print raw-registers} includes the contents of
+the raw register cache; the command @code{maint print cooked-registers}
+includes the (cooked) value of all registers; and the command
+@code{maint print register-groups} includes the groups that each
+register is a member of.  @xref{Registers,, Registers, gdbint,
+@value{GDBN} Internals}.
 
-@noindent
-@value{GDBN} also supports these special commands for MIPS targets:
+Takes an optional file parameter.
 
-@table @code
-@item set processor @var{args}
-@itemx show processor
-@kindex set processor @var{args}
-@kindex show processor
-Use the @code{set processor} command to set the type of MIPS
-processor when you want to access processor-type-specific registers.
-For example, @code{set processor @var{r3041}} tells @value{GDBN}
-to use the CPU registers appropriate for the 3041 chip.
-Use the @code{show processor} command to see what MIPS processor @value{GDBN}
-is using.  Use the @code{info reg} command to see what registers
-@value{GDBN} is using.
+@kindex maint print reggroups
+@item maint print reggroups
+Print @value{GDBN}'s internal register group data structures.
 
-@item set mipsfpu double
-@itemx set mipsfpu single
-@itemx set mipsfpu none
-@itemx show mipsfpu
-@kindex set mipsfpu
-@kindex show mipsfpu
-@cindex MIPS remote floating point
-@cindex floating point, MIPS remote
-If your target board does not support the MIPS floating point
-coprocessor, you should use the command @samp{set mipsfpu none} (if you
-need this, you may wish to put the command in your @value{GDBN} init
-file).  This tells @value{GDBN} how to find the return value of
-functions which return floating point values.  It also allows
-@value{GDBN} to avoid saving the floating point registers when calling
-functions on the board.  If you are using a floating point coprocessor
-with only single precision floating point support, as on the @sc{r4650}
-processor, use the command @samp{set mipsfpu single}.  The default
-double precision floating point coprocessor may be selected using
-@samp{set mipsfpu double}.
+Takes an optional file parameter.
 
-In previous versions the only choices were double precision or no
-floating point, so @samp{set mipsfpu on} will select double precision
-and @samp{set mipsfpu off} will select no floating point.
+@smallexample
+(gdb) @kbd{maint print reggroups}
+ Group      Type      
+ general    user      
+ float      user      
+ all        user      
+ vector     user      
+ system     user      
+ save       internal  
+ restore    internal  
+@end smallexample
 
-As usual, you can inquire about the @code{mipsfpu} variable with
-@samp{show mipsfpu}.
+@kindex maint set profile
+@kindex maint show profile
+@cindex profiling GDB
+@item maint set profile
+@itemx maint show profile
+Control profiling of @value{GDBN}.
 
-@item set remotedebug @var{n}
-@itemx show remotedebug
-@kindex set remotedebug@r{, MIPS protocol}
-@kindex show remotedebug@r{, MIPS protocol}
-@cindex @code{remotedebug}, MIPS protocol
-@cindex MIPS @code{remotedebug} protocol
-@c FIXME! For this to be useful, you must know something about the MIPS
-@c FIXME...protocol.  Where is it described?
-You can see some debugging information about communications with the board
-by setting the @code{remotedebug} variable.  If you set it to @code{1} using
-@samp{set remotedebug 1}, every packet is displayed.  If you set it
-to @code{2}, every character is displayed.  You can check the current value
-at any time with the command @samp{show remotedebug}.
+Profiling will be disabled until you use the @samp{maint set profile}
+command to enable it.  When you enable profiling, the system will begin
+collecting timing and execution count data; when you disable profiling or
+exit @value{GDBN}, the results will be written to a log file.  Remember that
+if you use profiling, @value{GDBN} will overwrite the profiling log file
+(often called @file{gmon.out}).  If you have a record of important profiling
+data in a @file{gmon.out} file, be sure to move it to a safe location.
 
-@item set timeout @var{seconds}
-@itemx set retransmit-timeout @var{seconds}
-@itemx show timeout
-@itemx show retransmit-timeout
-@cindex @code{timeout}, MIPS protocol
-@cindex @code{retransmit-timeout}, MIPS protocol
-@kindex set timeout
-@kindex show timeout
-@kindex set retransmit-timeout
-@kindex show retransmit-timeout
-You can control the timeout used while waiting for a packet, in the MIPS
-remote protocol, with the @code{set timeout @var{seconds}} command.  The
-default is 5 seconds.  Similarly, you can control the timeout used while
-waiting for an acknowledgement of a packet with the @code{set
-retransmit-timeout @var{seconds}} command.  The default is 3 seconds.
-You can inspect both values with @code{show timeout} and @code{show
-retransmit-timeout}.  (These commands are @emph{only} available when
-@value{GDBN} is configured for @samp{--target=mips-idt-ecoff}.)
+Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
+compiled with the @samp{-pg} compiler option. 
 
-The timeout set by @code{set timeout} does not apply when @value{GDBN}
-is waiting for your program to stop.  In that case, @value{GDBN} waits
-forever because it has no way of knowing how long the program is going
-to run before stopping.
 @end table
 
-@node PowerPC
-@subsection PowerPC
 
-@table @code
+@node Remote Protocol
+@appendix @value{GDBN} Remote Serial Protocol
 
-@kindex target dink32
-@item target dink32 @var{dev}
-DINK32 ROM monitor.
+@menu
+* Overview::
+* Packets::
+* Stop Reply Packets::
+* General Query Packets::
+* Register Packet Format::
+* Examples::
+* File-I/O remote protocol extension::
+@end menu
 
-@kindex target ppcbug
-@item target ppcbug @var{dev}
-@kindex target ppcbug1
-@item target ppcbug1 @var{dev}
-PPCBUG ROM monitor for PowerPC.
+@node Overview
+@section Overview
 
-@kindex target sds
-@item target sds @var{dev}
-SDS monitor, running on a PowerPC board (such as Motorola's ADS).
+There may be occasions when you need to know something about the
+protocol---for example, if there is only one serial port to your target
+machine, you might want your program to do something special if it
+recognizes a packet meant for @value{GDBN}.
 
-@end table
+In the examples below, @samp{->} and @samp{<-} are used to indicate
+transmitted and received data respectfully.
 
-@node PA
-@subsection HP PA Embedded
+@cindex protocol, @value{GDBN} remote serial
+@cindex serial protocol, @value{GDBN} remote
+@cindex remote serial protocol
+All @value{GDBN} commands and responses (other than acknowledgments) are
+sent as a @var{packet}.  A @var{packet} is introduced with the character
+@samp{$}, the actual @var{packet-data}, and the terminating character
+@samp{#} followed by a two-digit @var{checksum}:
 
-@table @code
+@smallexample
+@code{$}@var{packet-data}@code{#}@var{checksum}
+@end smallexample
+@noindent
 
-@kindex target op50n
-@item target op50n @var{dev}
-OP50N monitor, running on an OKI HPPA board.
+@cindex checksum, for @value{GDBN} remote
+@noindent
+The two-digit @var{checksum} is computed as the modulo 256 sum of all
+characters between the leading @samp{$} and the trailing @samp{#} (an
+eight bit unsigned checksum).
 
-@kindex target w89k
-@item target w89k @var{dev}
-W89K monitor, running on a Winbond HPPA board.
+Implementors should note that prior to @value{GDBN} 5.0 the protocol
+specification also included an optional two-digit @var{sequence-id}:
 
-@end table
+@smallexample
+@code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum}
+@end smallexample
 
-@node SH
-@subsection Hitachi SH
+@cindex sequence-id, for @value{GDBN} remote
+@noindent
+That @var{sequence-id} was appended to the acknowledgment.  @value{GDBN}
+has never output @var{sequence-id}s.  Stubs that handle packets added
+since @value{GDBN} 5.0 must not accept @var{sequence-id}.
 
-@table @code
+@cindex acknowledgment, for @value{GDBN} remote
+When either the host or the target machine receives a packet, the first
+response expected is an acknowledgment: either @samp{+} (to indicate
+the package was received correctly) or @samp{-} (to request
+retransmission):
 
-@kindex target hms@r{, with Hitachi SH}
-@item target hms @var{dev}
-A Hitachi SH board attached via serial line to your host.  Use special
-commands @code{device} and @code{speed} to control the serial line and
-the communications speed used.
+@smallexample
+-> @code{$}@var{packet-data}@code{#}@var{checksum}
+<- @code{+}
+@end smallexample
+@noindent
 
-@kindex target e7000@r{, with Hitachi SH}
-@item target e7000 @var{dev}
-E7000 emulator for Hitachi SH.
+The host (@value{GDBN}) sends @var{command}s, and the target (the
+debugging stub incorporated in your program) sends a @var{response}.  In
+the case of step and continue @var{command}s, the response is only sent
+when the operation has completed (the target has again stopped).
+
+@var{packet-data} consists of a sequence of characters with the
+exception of @samp{#} and @samp{$} (see @samp{X} packet for additional
+exceptions).
+
+Fields within the packet should be separated using @samp{,} @samp{;} or
+@cindex remote protocol, field separator
+@samp{:}.  Except where otherwise noted all numbers are represented in
+@sc{hex} with leading zeros suppressed.
 
-@kindex target sh3@r{, with SH}
-@kindex target sh3e@r{, with SH}
-@item target sh3 @var{dev}
-@item target sh3e @var{dev}
-Hitachi SH-3 and SH-3E target systems.
+Implementors should note that prior to @value{GDBN} 5.0, the character
+@samp{:} could not appear as the third character in a packet (as it
+would potentially conflict with the @var{sequence-id}).
 
-@end table
+Response @var{data} can be run-length encoded to save space.  A @samp{*}
+means that the next character is an @sc{ascii} encoding giving a repeat count
+which stands for that many repetitions of the character preceding the
+@samp{*}.  The encoding is @code{n+29}, yielding a printable character
+where @code{n >=3} (which is where rle starts to win).  The printable
+characters @samp{$}, @samp{#}, @samp{+} and @samp{-} or with a numeric
+value greater than 126 should not be used.
 
-@node Sparclet
-@subsection Tsqware Sparclet
+Some remote systems have used a different run-length encoding mechanism
+loosely refered to as the cisco encoding.  Following the @samp{*}
+character are two hex digits that indicate the size of the packet.
 
-@cindex Sparclet
+So:
+@smallexample
+"@code{0* }"
+@end smallexample
+@noindent
+means the same as "0000".
 
-@value{GDBN} enables developers to debug tasks running on
-Sparclet targets from a Unix host.
-@value{GDBN} uses code that runs on
-both the Unix host and on the Sparclet target.  The program
-@code{@value{GDBP}} is installed and executed on the Unix host.
+The error response returned for some packets includes a two character
+error number.  That number is not well defined.
 
-@table @code
-@item remotetimeout @var{args}
-@kindex remotetimeout
-@value{GDBN} supports the option @code{remotetimeout}.
-This option is set by the user, and  @var{args} represents the number of
-seconds @value{GDBN} waits for responses.
-@end table
+For any @var{command} not supported by the stub, an empty response
+(@samp{$#00}) should be returned.  That way it is possible to extend the
+protocol.  A newer @value{GDBN} can tell if a packet is supported based
+on that response.
 
-@cindex compiling, on Sparclet
-When compiling for debugging, include the options @samp{-g} to get debug
-information and @samp{-Ttext} to relocate the program to where you wish to
-load it on the target.  You may also want to add the options @samp{-n} or
-@samp{-N} in order to reduce the size of the sections.  Example:
+A stub is required to support the @samp{g}, @samp{G}, @samp{m}, @samp{M}, 
+@samp{c}, and @samp{s} @var{command}s.  All other @var{command}s are 
+optional.
 
-@example
-sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
-@end example
+@node Packets
+@section Packets
 
-You can use @code{objdump} to verify that the addresses are what you intended:
+The following table provides a complete list of all currently defined
+@var{command}s and their corresponding response @var{data}.
 
-@example
-sparclet-aout-objdump --headers --syms prog
-@end example
+@table @r
 
-@cindex running, on Sparclet
-Once you have set
-your Unix execution search path to find @value{GDBN}, you are ready to
-run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}}
-(or @code{sparclet-aout-gdb}, depending on your installation).
+@item @code{!} --- extended mode
+@cindex @code{!} packet
 
-@value{GDBN} comes up showing the prompt:
+Enable extended mode.  In extended mode, the remote server is made
+persistent.  The @samp{R} packet is used to restart the program being
+debugged.
 
-@example
-(gdbslet)
-@end example
+Reply:
+@table @samp
+@item OK
+The remote target both supports and has enabled extended mode.
+@end table
 
-@menu
-* Sparclet File::                Setting the file to debug
-* Sparclet Connection::          Connecting to Sparclet
-* Sparclet Download::            Sparclet download
-* Sparclet Execution::           Running and debugging
-@end menu
+@item @code{?} --- last signal
+@cindex @code{?} packet
 
-@node Sparclet File
-@subsubsection Setting file to debug
+Indicate the reason the target halted.  The reply is the same as for
+step and continue.
 
-The @value{GDBN} command @code{file} lets you choose with program to debug.
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@example
-(gdbslet) file prog
-@end example
+@item @code{a} --- reserved
 
-@need 1000
-@value{GDBN} then attempts to read the symbol table of @file{prog}.
-@value{GDBN} locates
-the file by searching the directories listed in the command search
-path.
-If the file was compiled with debug information (option "-g"), source
-files will be searched as well.
-@value{GDBN} locates
-the source files by searching the directories listed in the directory search
-path (@pxref{Environment, ,Your program's environment}).
-If it fails
-to find a file, it displays a message such as:
+Reserved for future use.
 
-@example
-prog: No such file or directory.
-@end example
+@item @code{A}@var{arglen}@code{,}@var{argnum}@code{,}@var{arg}@code{,@dots{}} ---  set program arguments @strong{(reserved)}
+@cindex @code{A} packet
 
-When this happens, add the appropriate directories to the search paths with
-the @value{GDBN} commands @code{path} and @code{dir}, and execute the
-@code{target} command again.
+Initialized @samp{argv[]} array passed into program. @var{arglen}
+specifies the number of bytes in the hex encoded byte stream @var{arg}.
+See @code{gdbserver} for more details.
 
-@node Sparclet Connection
-@subsubsection Connecting to Sparclet
+Reply:
+@table @samp
+@item OK
+@item E@var{NN}
+@end table
 
-The @value{GDBN} command @code{target} lets you connect to a Sparclet target.
-To connect to a target on serial port ``@code{ttya}'', type:
+@item @code{b}@var{baud} --- set baud @strong{(deprecated)}
+@cindex @code{b} packet
 
-@example
-(gdbslet) target sparclet /dev/ttya
-Remote target sparclet connected to /dev/ttya
-main () at ../prog.c:3
-@end example
+Change the serial line speed to @var{baud}.
 
-@need 750
-@value{GDBN} displays messages like these:
+JTC: @emph{When does the transport layer state change?  When it's
+received, or after the ACK is transmitted.  In either case, there are
+problems if the command or the acknowledgment packet is dropped.}
 
-@example
-Connected to ttya.
-@end example
+Stan: @emph{If people really wanted to add something like this, and get
+it working for the first time, they ought to modify ser-unix.c to send
+some kind of out-of-band message to a specially-setup stub and have the
+switch happen "in between" packets, so that from remote protocol's point
+of view, nothing actually happened.}
 
-@node Sparclet Download
-@subsubsection Sparclet download
+@item @code{B}@var{addr},@var{mode} --- set breakpoint @strong{(deprecated)}
+@cindex @code{B} packet
 
-@cindex download to Sparclet
-Once connected to the Sparclet target,
-you can use the @value{GDBN}
-@code{load} command to download the file from the host to the target.
-The file name and load offset should be given as arguments to the @code{load}
-command.
-Since the file format is aout, the program must be loaded to the starting
-address.  You can use @code{objdump} to find out what this value is.  The load
-offset is an offset which is added to the VMA (virtual memory address)
-of each of the file's sections.
-For instance, if the program
-@file{prog} was linked to text address 0x1201000, with data at 0x12010160
-and bss at 0x12010170, in @value{GDBN}, type:
+Set (@var{mode} is @samp{S}) or clear (@var{mode} is @samp{C}) a
+breakpoint at @var{addr}.
 
-@example
-(gdbslet) load prog 0x12010000
-Loading section .text, size 0xdb0 vma 0x12010000
-@end example
+This packet has been replaced by the @samp{Z} and @samp{z} packets
+(@pxref{insert breakpoint or watchpoint packet}).
 
-If the code is loaded at a different address then what the program was linked
-to, you may need to use the @code{section} and @code{add-symbol-file} commands
-to tell @value{GDBN} where to map the symbol table.
+@item @code{c}@var{addr} --- continue
+@cindex @code{c} packet
 
-@node Sparclet Execution
-@subsubsection Running and debugging
+@var{addr} is address to resume.  If @var{addr} is omitted, resume at
+current address.
 
-@cindex running and debugging Sparclet programs
-You can now begin debugging the task using @value{GDBN}'s execution control
-commands, @code{b}, @code{step}, @code{run}, etc.  See the @value{GDBN}
-manual for the list of commands.
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@example
-(gdbslet) b main
-Breakpoint 1 at 0x12010000: file prog.c, line 3.
-(gdbslet) run
-Starting program: prog
-Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
-3        char *symarg = 0;
-(gdbslet) step
-4        char *execarg = "hello!";
-(gdbslet)
-@end example
+@item @code{C}@var{sig}@code{;}@var{addr} --- continue with signal
+@cindex @code{C} packet
 
-@node Sparclite
-@subsection Fujitsu Sparclite
+Continue with signal @var{sig} (hex signal number).  If
+@code{;}@var{addr} is omitted, resume at same address.
 
-@table @code
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@kindex target sparclite
-@item target sparclite @var{dev}
-Fujitsu sparclite boards, used only for the purpose of loading.
-You must use an additional command to debug the program.
-For example: target remote @var{dev} using @value{GDBN} standard
-remote protocol.
+@item @code{d} --- toggle debug @strong{(deprecated)}
+@cindex @code{d} packet
 
-@end table
+Toggle debug flag.
 
-@node ST2000
-@subsection Tandem ST2000
+@item @code{D} --- detach
+@cindex @code{D} packet
 
-@value{GDBN} may be used with a Tandem ST2000 phone switch, running Tandem's
-STDBUG protocol.
+Detach @value{GDBN} from the remote system.  Sent to the remote target
+before @value{GDBN} disconnects.
 
-To connect your ST2000 to the host system, see the manufacturer's
-manual.  Once the ST2000 is physically attached, you can run:
+Reply:
+@table @samp
+@item @emph{no response}
+@value{GDBN} does not check for any response after sending this packet.
+@end table
 
-@example
-target st2000 @var{dev} @var{speed}
-@end example
+@item @code{e} --- reserved
 
-@noindent
-to establish it as your debugging environment.  @var{dev} is normally
-the name of a serial device, such as @file{/dev/ttya}, connected to the
-ST2000 via a serial line.  You can instead specify @var{dev} as a TCP
-connection (for example, to a serial line attached via a terminal
-concentrator) using the syntax @code{@var{hostname}:@var{portnumber}}.
+Reserved for future use.
 
-The @code{load} and @code{attach} commands are @emph{not} defined for
-this target; you must load your program into the ST2000 as you normally
-would for standalone operation.  @value{GDBN} reads debugging information
-(such as symbols) from a separate, debugging version of the program
-available on your host computer.
-@c FIXME!! This is terribly vague; what little content is here is
-@c basically hearsay.
+@item @code{E} --- reserved
 
-@cindex ST2000 auxiliary commands
-These auxiliary @value{GDBN} commands are available to help you with the ST2000
-environment:
+Reserved for future use.
 
-@table @code
-@item st2000 @var{command}
-@kindex st2000 @var{cmd}
-@cindex STDBUG commands (ST2000)
-@cindex commands to STDBUG (ST2000)
-Send a @var{command} to the STDBUG monitor.  See the manufacturer's
-manual for available commands.
+@item @code{f} --- reserved
 
-@item connect
-@cindex connect (to STDBUG)
-Connect the controlling terminal to the STDBUG command monitor.  When
-you are done interacting with STDBUG, typing either of two character
-sequences gets you back to the @value{GDBN} command prompt:
-@kbd{@key{RET}~.} (Return, followed by tilde and period) or
-@kbd{@key{RET}~@key{C-d}} (Return, followed by tilde and control-D).
-@end table
+Reserved for future use.
 
-@node Z8000
-@subsection Zilog Z8000
+@item @code{F}@var{RC}@code{,}@var{EE}@code{,}@var{CF}@code{;}@var{XX} --- Reply to target's F packet.
+@cindex @code{F} packet
 
-@cindex Z8000
-@cindex simulator, Z8000
-@cindex Zilog Z8000 simulator
+This packet is send by @value{GDBN} as reply to a @code{F} request packet
+sent by the target.  This is part of the File-I/O protocol extension.
+@xref{File-I/O remote protocol extension}, for the specification.
 
-When configured for debugging Zilog Z8000 targets, @value{GDBN} includes
-a Z8000 simulator.
+@item @code{g} --- read registers
+@anchor{read registers packet}
+@cindex @code{g} packet
 
-For the Z8000 family, @samp{target sim} simulates either the Z8002 (the
-unsegmented variant of the Z8000 architecture) or the Z8001 (the
-segmented variant).  The simulator recognizes which architecture is
-appropriate by inspecting the object code.
+Read general registers.
 
-@table @code
-@item target sim @var{args}
-@kindex sim
-@kindex target sim@r{, with Z8000}
-Debug programs on a simulated CPU.  If the simulator supports setup
-options, specify them via @var{args}.
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+Each byte of register data is described by two hex digits.  The bytes
+with the register are transmitted in target byte order.  The size of
+each register and their position within the @samp{g} @var{packet} are
+determined by the @value{GDBN} internal macros @var{REGISTER_RAW_SIZE}
+and @var{REGISTER_NAME} macros.  The specification of several standard
+@code{g} packets is specified below.
+@item E@var{NN}
+for an error.
 @end table
 
-@noindent
-After specifying this target, you can debug programs for the simulated
-CPU in the same style as programs for your host computer; use the
-@code{file} command to load a new program image, the @code{run} command
-to run your program, and so on.
+@item @code{G}@var{XX@dots{}} --- write regs
+@cindex @code{G} packet
 
-As well as making available all the usual machine registers
-(@pxref{Registers, ,Registers}), the Z8000 simulator provides three
-additional items of information as specially named registers:
+@xref{read registers packet}, for a description of the @var{XX@dots{}}
+data.
 
-@table @code
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
 
-@item cycles
-Counts clock-ticks in the simulator.
+@item @code{h} --- reserved
 
-@item insts
-Counts instructions run in the simulator.
+Reserved for future use.
 
-@item time
-Execution time in 60ths of a second.
+@item @code{H}@var{c}@var{t@dots{}} --- set thread 
+@cindex @code{H} packet
 
+Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
+@samp{G}, et.al.).  @var{c} depends on the operation to be performed: it
+should be @samp{c} for step and continue operations, @samp{g} for other
+operations.  The thread designator @var{t@dots{}} may be -1, meaning all
+the threads, a thread number, or zero which means pick any thread.
+
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
 @end table
 
-You can refer to these values in @value{GDBN} expressions with the usual
-conventions; for example, @w{@samp{b fputc if $cycles>5000}} sets a
-conditional breakpoint that suspends only after at least 5000
-simulated clock ticks.
-
-@node Architectures
-@section Architectures
+@c FIXME: JTC:
+@c   'H': How restrictive (or permissive) is the thread model.  If a
+@c        thread is selected and stopped, are other threads allowed
+@c        to continue to execute?  As I mentioned above, I think the
+@c        semantics of each command when a thread is selected must be
+@c        described.  For example:
+@c
+@c        'g':    If the stub supports threads and a specific thread is
+@c                selected, returns the register block from that thread;
+@c                otherwise returns current registers.
+@c
+@c        'G'     If the stub supports threads and a specific thread is
+@c                selected, sets the registers of the register block of
+@c                that thread; otherwise sets current registers.
 
-This section describes characteristics of architectures that affect
-all uses of @value{GDBN} with the architecture, both native and cross.
+@item @code{i}@var{addr}@code{,}@var{nnn} --- cycle step @strong{(draft)}
+@anchor{cycle step packet}
+@cindex @code{i} packet
 
-@menu
-* A29K::
-* Alpha::
-* MIPS::
-@end menu
+Step the remote target by a single clock cycle.  If @code{,}@var{nnn} is
+present, cycle step @var{nnn} cycles.  If @var{addr} is present, cycle
+step starting at that address.
 
-@node A29K
-@subsection A29K
+@item @code{I} --- signal then cycle step @strong{(reserved)}
+@cindex @code{I} packet
 
-@table @code
+@xref{step with signal packet}.  @xref{cycle step packet}.
 
-@kindex set rstack_high_address
-@cindex AMD 29K register stack
-@cindex register stack, AMD29K
-@item set rstack_high_address @var{address}
-On AMD 29000 family processors, registers are saved in a separate
-@dfn{register stack}.  There is no way for @value{GDBN} to determine the
-extent of this stack.  Normally, @value{GDBN} just assumes that the
-stack is ``large enough''.  This may result in @value{GDBN} referencing
-memory locations that do not exist.  If necessary, you can get around
-this problem by specifying the ending address of the register stack with
-the @code{set rstack_high_address} command.  The argument should be an
-address, which you probably want to precede with @samp{0x} to specify in
-hexadecimal.
+@item @code{j} --- reserved
 
-@kindex show rstack_high_address
-@item show rstack_high_address
-Display the current limit of the register stack, on AMD 29000 family
-processors.
+Reserved for future use.
 
-@end table
+@item @code{J} --- reserved
 
-@node Alpha
-@subsection Alpha
+Reserved for future use.
 
-See the following section.
+@item @code{k} --- kill request
+@cindex @code{k} packet
 
-@node MIPS
-@subsection MIPS
+FIXME: @emph{There is no description of how to operate when a specific
+thread context has been selected (i.e.@: does 'k' kill only that
+thread?)}.
 
-@cindex stack on Alpha
-@cindex stack on MIPS
-@cindex Alpha stack
-@cindex MIPS stack
-Alpha- and MIPS-based computers use an unusual stack frame, which
-sometimes requires @value{GDBN} to search backward in the object code to
-find the beginning of a function.
+@item @code{K} --- reserved
 
-@cindex response time, MIPS debugging
-To improve response time (especially for embedded applications, where
-@value{GDBN} may be restricted to a slow serial line for this search)
-you may want to limit the size of this search, using one of these
-commands:
+Reserved for future use.
 
-@table @code
-@cindex @code{heuristic-fence-post} (Alpha, MIPS)
-@item set heuristic-fence-post @var{limit}
-Restrict @value{GDBN} to examining at most @var{limit} bytes in its
-search for the beginning of a function.  A value of @var{0} (the
-default) means there is no limit.  However, except for @var{0}, the
-larger the limit the more bytes @code{heuristic-fence-post} must search
-and therefore the longer it takes to run.
+@item @code{l} --- reserved
 
-@item show heuristic-fence-post
-Display the current limit.
-@end table
+Reserved for future use.
 
-@noindent
-These commands are available @emph{only} when @value{GDBN} is configured
-for debugging programs on Alpha or MIPS processors.
+@item @code{L} --- reserved
 
+Reserved for future use.
 
-@node Controlling GDB
-@chapter Controlling @value{GDBN}
+@item @code{m}@var{addr}@code{,}@var{length} --- read memory
+@cindex @code{m} packet
 
-You can alter the way @value{GDBN} interacts with you by using the
-@code{set} command.  For commands controlling how @value{GDBN} displays
-data, see @ref{Print Settings, ,Print settings}.  Other settings are
-described here.
+Read @var{length} bytes of memory starting at address @var{addr}.
+Neither @value{GDBN} nor the stub assume that sized memory transfers are
+assumed using word aligned accesses. FIXME: @emph{A word aligned memory
+transfer mechanism is needed.}
 
-@menu
-* Prompt::                      Prompt
-* Editing::                     Command editing
-* History::                     Command history
-* Screen Size::                 Screen size
-* Numbers::                     Numbers
-* Messages/Warnings::           Optional warnings and messages
-* Debugging Output::            Optional messages about internal happenings
-@end menu
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+@var{XX@dots{}} is mem contents. Can be fewer bytes than requested if able
+to read only part of the data.  Neither @value{GDBN} nor the stub assume
+that sized memory transfers are assumed using word aligned
+accesses. FIXME: @emph{A word aligned memory transfer mechanism is
+needed.}
+@item E@var{NN}
+@var{NN} is errno
+@end table
 
-@node Prompt
-@section Prompt
+@item @code{M}@var{addr},@var{length}@code{:}@var{XX@dots{}} --- write mem
+@cindex @code{M} packet
 
-@cindex prompt
+Write @var{length} bytes of memory starting at address @var{addr}.
+@var{XX@dots{}} is the data.
 
-@value{GDBN} indicates its readiness to read a command by printing a string
-called the @dfn{prompt}.  This string is normally @samp{(@value{GDBP})}.  You
-can change the prompt string with the @code{set prompt} command.  For
-instance, when debugging @value{GDBN} with @value{GDBN}, it is useful to change
-the prompt in one of the @value{GDBN} sessions so that you can always tell
-which one you are talking to.
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error (this includes the case where only part of the data was
+written).
+@end table
 
-@emph{Note:}  @code{set prompt} does not add a space for you after the
-prompt you set.  This allows you to set a prompt which ends in a space
-or a prompt that does not.
+@item @code{n} --- reserved
 
-@table @code
-@kindex set prompt
-@item set prompt @var{newprompt}
-Directs @value{GDBN} to use @var{newprompt} as its prompt string henceforth.
+Reserved for future use.
 
-@kindex show prompt
-@item show prompt
-Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
-@end table
+@item @code{N} --- reserved
 
-@node Editing
-@section Command editing
-@cindex readline
-@cindex command line editing
+Reserved for future use.
 
-@value{GDBN} reads its input commands via the @dfn{readline} interface.  This
-@sc{gnu} library provides consistent behavior for programs which provide a
-command line interface to the user.  Advantages are @sc{gnu} Emacs-style
-or @dfn{vi}-style inline editing of commands, @code{csh}-like history
-substitution, and a storage and recall of command history across
-debugging sessions.
+@item @code{o} --- reserved
 
-You may control the behavior of command line editing in @value{GDBN} with the
-command @code{set}.
+Reserved for future use.
 
-@table @code
-@kindex set editing
-@cindex editing
-@item set editing
-@itemx set editing on
-Enable command line editing (enabled by default).
+@item @code{O} --- reserved
 
-@item set editing off
-Disable command line editing.
+Reserved for future use.
 
-@kindex show editing
-@item show editing
-Show whether command line editing is enabled.
-@end table
+@item @code{p}@var{n@dots{}} --- read reg @strong{(reserved)}
+@cindex @code{p} packet
 
-@node History
-@section Command history
+@xref{write register packet}.
 
-@value{GDBN} can keep track of the commands you type during your
-debugging sessions, so that you can be certain of precisely what
-happened.  Use these commands to manage the @value{GDBN} command
-history facility.
+Reply:
+@table @samp
+@item @var{r@dots{}.}
+The hex encoded value of the register in target byte order.
+@end table
 
-@table @code
-@cindex history substitution
-@cindex history file
-@kindex set history filename
-@kindex GDBHISTFILE
-@item set history filename @var{fname}
-Set the name of the @value{GDBN} command history file to @var{fname}.
-This is the file where @value{GDBN} reads an initial command history
-list, and where it writes the command history from this session when it
-exits.  You can access this list through history expansion or through
-the history command editing characters listed below.  This file defaults
-to the value of the environment variable @code{GDBHISTFILE}, or to
-@file{./.gdb_history} (@file{./_gdb_history} on MS-DOS) if this variable
-is not set.
+@item @code{P}@var{n@dots{}}@code{=}@var{r@dots{}} --- write register
+@anchor{write register packet}
+@cindex @code{P} packet
 
-@cindex history save
-@kindex set history save
-@item set history save
-@itemx set history save on
-Record command history in a file, whose name may be specified with the
-@code{set history filename} command.  By default, this option is disabled.
+Write register @var{n@dots{}} with value @var{r@dots{}}, which contains two hex
+digits for each byte in the register (target byte order).
 
-@item set history save off
-Stop recording command history in a file.
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
+@end table
 
-@cindex history size
-@kindex set history size
-@item set history size @var{size}
-Set the number of commands which @value{GDBN} keeps in its history list.
-This defaults to the value of the environment variable
-@code{HISTSIZE}, or to 256 if this variable is not set.
+@item @code{q}@var{query} --- general query
+@anchor{general query packet}
+@cindex @code{q} packet
+
+Request info about @var{query}.  In general @value{GDBN} queries have a
+leading upper case letter.  Custom vendor queries should use a company
+prefix (in lower case) ex: @samp{qfsf.var}.  @var{query} may optionally
+be followed by a @samp{,} or @samp{;} separated list.  Stubs must ensure
+that they match the full @var{query} name.
+
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+Hex encoded data from query.  The reply can not be empty.
+@item E@var{NN}
+error reply
+@item
+Indicating an unrecognized @var{query}.
 @end table
 
-@cindex history expansion
-History expansion assigns special meaning to the character @kbd{!}.
-@ifset have-readline-appendices
-@xref{Event Designators}.
-@end ifset
+@item @code{Q}@var{var}@code{=}@var{val} --- general set
+@cindex @code{Q} packet
 
-Since @kbd{!} is also the logical not operator in C, history expansion
-is off by default. If you decide to enable history expansion with the
-@code{set history expansion on} command, you may sometimes need to
-follow @kbd{!} (when it is used as logical not, in an expression) with
-a space or a tab to prevent it from being expanded.  The readline
-history facilities do not attempt substitution on the strings
-@kbd{!=} and @kbd{!(}, even when history expansion is enabled.
+Set value of @var{var} to @var{val}.
 
-The commands to control history expansion are:
+@xref{general query packet}, for a discussion of naming conventions.
 
-@table @code
-@kindex set history expansion
-@item set history expansion on
-@itemx set history expansion
-Enable history expansion.  History expansion is off by default.
+@item @code{r} --- reset @strong{(deprecated)}
+@cindex @code{r} packet
 
-@item set history expansion off
-Disable history expansion.
+Reset the entire system.
 
-The readline code comes with more complete documentation of
-editing and history expansion features.  Users unfamiliar with @sc{gnu} Emacs
-or @code{vi} may wish to read it.
-@ifset have-readline-appendices
-@xref{Command Line Editing}.
-@end ifset
+@item @code{R}@var{XX} --- remote restart
+@cindex @code{R} packet
 
-@c @group
-@kindex show history
-@item show history
-@itemx show history filename
-@itemx show history save
-@itemx show history size
-@itemx show history expansion
-These commands display the state of the @value{GDBN} history parameters.
-@code{show history} by itself displays all four states.
-@c @end group
+Restart the program being debugged.  @var{XX}, while needed, is ignored.
+This packet is only available in extended mode.
+
+Reply:
+@table @samp
+@item @emph{no reply}
+The @samp{R} packet has no reply.
 @end table
 
-@table @code
-@kindex shows
-@item show commands
-Display the last ten commands in the command history.
+@item @code{s}@var{addr} --- step
+@cindex @code{s} packet
 
-@item show commands @var{n}
-Print ten commands centered on command number @var{n}.
+@var{addr} is address to resume.  If @var{addr} is omitted, resume at
+same address.
 
-@item show commands +
-Print ten commands just after the commands last printed.
-@end table
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@node Screen Size
-@section Screen size
-@cindex size of screen
-@cindex pauses in output
+@item @code{S}@var{sig}@code{;}@var{addr} --- step with signal
+@anchor{step with signal packet}
+@cindex @code{S} packet
 
-Certain commands to @value{GDBN} may produce large amounts of
-information output to the screen.  To help you read all of it,
-@value{GDBN} pauses and asks you for input at the end of each page of
-output.  Type @key{RET} when you want to continue the output, or @kbd{q}
-to discard the remaining output.  Also, the screen width setting
-determines when to wrap lines of output.  Depending on what is being
-printed, @value{GDBN} tries to break the line at a readable place,
-rather than simply letting it overflow onto the following line.
+Like @samp{C} but step not continue.
 
-Normally @value{GDBN} knows the size of the screen from the terminal
-driver software.  For example, on Unix @value{GDBN} uses the termcap data base
-together with the value of the @code{TERM} environment variable and the
-@code{stty rows} and @code{stty cols} settings.  If this is not correct,
-you can override it with the @code{set height} and @code{set
-width} commands:
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
 
-@table @code
-@kindex set height
-@kindex set width
-@kindex show width
-@kindex show height
-@item set height @var{lpp}
-@itemx show height
-@itemx set width @var{cpl}
-@itemx show width
-These @code{set} commands specify a screen height of @var{lpp} lines and
-a screen width of @var{cpl} characters.  The associated @code{show}
-commands display the current settings.
+@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search 
+@cindex @code{t} packet
 
-If you specify a height of zero lines, @value{GDBN} does not pause during
-output no matter how long the output is.  This is useful if output is to a
-file or to an editor buffer.
+Search backwards starting at address @var{addr} for a match with pattern
+@var{PP} and mask @var{MM}.  @var{PP} and @var{MM} are 4 bytes.
+@var{addr} must be at least 3 digits.
 
-Likewise, you can specify @samp{set width 0} to prevent @value{GDBN}
-from wrapping its output.
+@item @code{T}@var{XX} --- thread alive
+@cindex @code{T} packet
+
+Find out if the thread XX is alive.
+
+Reply:
+@table @samp
+@item OK
+thread is still alive
+@item E@var{NN}
+thread is dead
 @end table
 
-@node Numbers
-@section Numbers
-@cindex number representation
-@cindex entering numbers
+@item @code{u} --- reserved
 
-You can always enter numbers in octal, decimal, or hexadecimal in
-@value{GDBN} by the usual conventions: octal numbers begin with
-@samp{0}, decimal numbers end with @samp{.}, and hexadecimal numbers
-begin with @samp{0x}.  Numbers that begin with none of these are, by
-default, entered in base 10; likewise, the default display for
-numbers---when no particular format is specified---is base 10.  You can
-change the default base for both input and output with the @code{set
-radix} command.
+Reserved for future use.
 
-@table @code
-@kindex set input-radix
-@item set input-radix @var{base}
-Set the default base for numeric input.  Supported choices
-for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
-specified either unambiguously or using the current default radix; for
-example, any of
+@item @code{U} --- reserved
 
-@smallexample
-set radix 012
-set radix 10.
-set radix 0xa
-@end smallexample
+Reserved for future use.
 
-@noindent
-sets the base to decimal.  On the other hand, @samp{set radix 10}
-leaves the radix unchanged no matter what it was.
+@item @code{v} --- reserved
 
-@kindex set output-radix
-@item set output-radix @var{base}
-Set the default base for numeric display.  Supported choices
-for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
-specified either unambiguously or using the current default radix.
+Reserved for future use.
 
-@kindex show input-radix
-@item show input-radix
-Display the current default base for numeric input.
+@item @code{V} --- reserved
 
-@kindex show output-radix
-@item show output-radix
-Display the current default base for numeric display.
-@end table
+Reserved for future use.
 
-@node Messages/Warnings
-@section Optional warnings and messages
+@item @code{w} --- reserved
 
-By default, @value{GDBN} is silent about its inner workings.  If you are
-running on a slow machine, you may want to use the @code{set verbose}
-command.  This makes @value{GDBN} tell you when it does a lengthy
-internal operation, so you will not think it has crashed.
+Reserved for future use.
 
-Currently, the messages controlled by @code{set verbose} are those
-which announce that the symbol table for a source file is being read;
-see @code{symbol-file} in @ref{Files, ,Commands to specify files}.
+@item @code{W} --- reserved
 
-@table @code
-@kindex set verbose
-@item set verbose on
-Enables @value{GDBN} output of certain informational messages.
+Reserved for future use.
 
-@item set verbose off
-Disables @value{GDBN} output of certain informational messages.
+@item @code{x} --- reserved
 
-@kindex show verbose
-@item show verbose
-Displays whether @code{set verbose} is on or off.
+Reserved for future use.
+
+@item @code{X}@var{addr}@code{,}@var{length}@var{:}@var{XX@dots{}} --- write mem (binary)
+@cindex @code{X} packet
+
+@var{addr} is address, @var{length} is number of bytes, @var{XX@dots{}}
+is binary data.  The characters @code{$}, @code{#}, and @code{0x7d} are
+escaped using @code{0x7d}.
+
+Reply:
+@table @samp
+@item OK
+for success
+@item E@var{NN}
+for an error
 @end table
 
-By default, if @value{GDBN} encounters bugs in the symbol table of an
-object file, it is silent; but if you are debugging a compiler, you may
-find this information useful (@pxref{Symbol Errors, ,Errors reading
-symbol files}).
+@item @code{y} --- reserved
 
-@table @code
+Reserved for future use.
 
-@kindex set complaints
-@item set complaints @var{limit}
-Permits @value{GDBN} to output @var{limit} complaints about each type of
-unusual symbols before becoming silent about the problem.  Set
-@var{limit} to zero to suppress all complaints; set it to a large number
-to prevent complaints from being suppressed.
+@item @code{Y} reserved
 
-@kindex show complaints
-@item show complaints
-Displays how many symbol complaints @value{GDBN} is permitted to produce.
+Reserved for future use.
 
-@end table
+@item @code{z}@var{type}@code{,}@var{addr}@code{,}@var{length} --- remove breakpoint or watchpoint @strong{(draft)}
+@itemx @code{Z}@var{type}@code{,}@var{addr}@code{,}@var{length} --- insert breakpoint or watchpoint @strong{(draft)}
+@anchor{insert breakpoint or watchpoint packet}
+@cindex @code{z} packet
+@cindex @code{Z} packets
 
-By default, @value{GDBN} is cautious, and asks what sometimes seems to be a
-lot of stupid questions to confirm certain commands.  For example, if
-you try to run a program which is already running:
+Insert (@code{Z}) or remove (@code{z}) a @var{type} breakpoint or
+watchpoint starting at address @var{address} and covering the next
+@var{length} bytes.
 
-@example
-(@value{GDBP}) run
-The program being debugged has been started already.
-Start it from the beginning? (y or n)
-@end example
+Each breakpoint and watchpoint packet @var{type} is documented
+separately.
 
-If you are willing to unflinchingly face the consequences of your own
-commands, you can disable this ``feature'':
+@emph{Implementation notes: A remote target shall return an empty string
+for an unrecognized breakpoint or watchpoint packet @var{type}.  A
+remote target shall support either both or neither of a given
+@code{Z}@var{type}@dots{} and @code{z}@var{type}@dots{} packet pair.  To
+avoid potential problems with duplicate packets, the operations should
+be implemented in an idempotent way.}
 
-@table @code
+@item @code{z}@code{0}@code{,}@var{addr}@code{,}@var{length} --- remove memory breakpoint @strong{(draft)}
+@item @code{Z}@code{0}@code{,}@var{addr}@code{,}@var{length} --- insert memory breakpoint @strong{(draft)}
+@cindex @code{z0} packet
+@cindex @code{Z0} packet
 
-@kindex set confirm
-@cindex flinching
-@cindex confirmation
-@cindex stupid questions
-@item set confirm off
-Disables confirmation requests.
+Insert (@code{Z0}) or remove (@code{z0}) a memory breakpoint at address
+@code{addr} of size @code{length}.
 
-@item set confirm on
-Enables confirmation requests (the default).
+A memory breakpoint is implemented by replacing the instruction at
+@var{addr} with a software breakpoint or trap instruction.  The
+@code{length} is used by targets that indicates the size of the
+breakpoint (in bytes) that should be inserted (e.g., the @sc{arm} and
+@sc{mips} can insert either a 2 or 4 byte breakpoint).
 
-@kindex show confirm
-@item show confirm
-Displays state of confirmation requests.
+@emph{Implementation note: It is possible for a target to copy or move
+code that contains memory breakpoints (e.g., when implementing
+overlays).  The behavior of this packet, in the presence of such a
+target, is not defined.}
 
+Reply:
+@table @samp
+@item OK
+success
+@item
+not supported
+@item E@var{NN}
+for an error
 @end table
 
-@node Debugging Output
-@section Optional messages about internal happenings
-@table @code
-@kindex set debug arch
-@item set debug arch
-Turns on or off display of gdbarch debugging info. The default is off
-@kindex show debug arch
-@item show debug arch
-Displays the current state of displaying gdbarch debugging info.
-@kindex set debug event
-@item set debug event
-Turns on or off display of @value{GDBN} event debugging info. The
-default is off.
-@kindex show debug event
-@item show debug event
-Displays the current state of displaying @value{GDBN} event debugging
-info.
-@kindex set debug expression
-@item set debug expression
-Turns on or off display of @value{GDBN} expression debugging info. The
-default is off.
-@kindex show debug expression
-@item show debug expression
-Displays the current state of displaying @value{GDBN} expression
-debugging info.
-@kindex set debug overload
-@item set debug overload
-Turns on or off display of @value{GDBN} C@t{++} overload debugging
-info. This includes info such as ranking of functions, etc. The default
-is off.
-@kindex show debug overload
-@item show debug overload
-Displays the current state of displaying @value{GDBN} C@t{++} overload
-debugging info.
-@kindex set debug remote
-@cindex packets, reporting on stdout
-@cindex serial connections, debugging
-@item set debug remote
-Turns on or off display of reports on all packets sent back and forth across
-the serial line to the remote machine.  The info is printed on the
-@value{GDBN} standard output stream. The default is off.
-@kindex show debug remote
-@item show debug remote
-Displays the state of display of remote packets.
-@kindex set debug serial
-@item set debug serial
-Turns on or off display of @value{GDBN} serial debugging info. The
-default is off.
-@kindex show debug serial
-@item show debug serial
-Displays the current state of displaying @value{GDBN} serial debugging
-info.
-@kindex set debug target
-@item set debug target
-Turns on or off display of @value{GDBN} target debugging info. This info
-includes what is going on at the target level of GDB, as it happens. The
-default is off.
-@kindex show debug target
-@item show debug target
-Displays the current state of displaying @value{GDBN} target debugging
-info.
-@kindex set debug varobj
-@item set debug varobj
-Turns on or off display of @value{GDBN} variable object debugging
-info. The default is off.
-@kindex show debug varobj
-@item show debug varobj
-Displays the current state of displaying @value{GDBN} variable object
-debugging info.
+@item @code{z}@code{1}@code{,}@var{addr}@code{,}@var{length} --- remove hardware breakpoint @strong{(draft)}
+@item @code{Z}@code{1}@code{,}@var{addr}@code{,}@var{length} --- insert hardware breakpoint @strong{(draft)}
+@cindex @code{z1} packet
+@cindex @code{Z1} packet
+
+Insert (@code{Z1}) or remove (@code{z1}) a hardware breakpoint at
+address @code{addr} of size @code{length}.
+
+A hardware breakpoint is implemented using a mechanism that is not
+dependant on being able to modify the target's memory.
+
+@emph{Implementation note: A hardware breakpoint is not affected by code
+movement.}
+
+Reply:
+@table @samp
+@item OK
+success
+@item
+not supported
+@item E@var{NN}
+for an error
 @end table
 
-@node Sequences
-@chapter Canned Sequences of Commands
+@item @code{z}@code{2}@code{,}@var{addr}@code{,}@var{length} --- remove write watchpoint @strong{(draft)}
+@item @code{Z}@code{2}@code{,}@var{addr}@code{,}@var{length} --- insert write watchpoint @strong{(draft)}
+@cindex @code{z2} packet
+@cindex @code{Z2} packet
 
-Aside from breakpoint commands (@pxref{Break Commands, ,Breakpoint
-command lists}), @value{GDBN} provides two ways to store sequences of
-commands for execution as a unit: user-defined commands and command
-files.
+Insert (@code{Z2}) or remove (@code{z2}) a write watchpoint.
 
-@menu
-* Define::                      User-defined commands
-* Hooks::                       User-defined command hooks
-* Command Files::               Command files
-* Output::                      Commands for controlled output
-@end menu
+Reply:
+@table @samp
+@item OK
+success
+@item
+not supported
+@item E@var{NN}
+for an error
+@end table
 
-@node Define
-@section User-defined commands
+@item @code{z}@code{3}@code{,}@var{addr}@code{,}@var{length} --- remove read watchpoint @strong{(draft)}
+@item @code{Z}@code{3}@code{,}@var{addr}@code{,}@var{length} --- insert read watchpoint @strong{(draft)}
+@cindex @code{z3} packet
+@cindex @code{Z3} packet
 
-@cindex user-defined command
-A @dfn{user-defined command} is a sequence of @value{GDBN} commands to
-which you assign a new name as a command.  This is done with the
-@code{define} command.  User commands may accept up to 10 arguments
-separated by whitespace.  Arguments are accessed within the user command
-via @var{$arg0@dots{}$arg9}.  A trivial example:
+Insert (@code{Z3}) or remove (@code{z3}) a read watchpoint.
 
-@smallexample
-define adder
-  print $arg0 + $arg1 + $arg2
-@end smallexample
+Reply:
+@table @samp
+@item OK
+success
+@item
+not supported
+@item E@var{NN}
+for an error
+@end table
 
-@noindent
-To execute the command use:
+@item @code{z}@code{4}@code{,}@var{addr}@code{,}@var{length} --- remove access watchpoint @strong{(draft)}
+@item @code{Z}@code{4}@code{,}@var{addr}@code{,}@var{length} --- insert access watchpoint @strong{(draft)}
+@cindex @code{z4} packet
+@cindex @code{Z4} packet
 
-@smallexample
-adder 1 2 3
-@end smallexample
+Insert (@code{Z4}) or remove (@code{z4}) an access watchpoint.
 
-@noindent
-This defines the command @code{adder}, which prints the sum of
-its three arguments.  Note the arguments are text substitutions, so they may
-reference variables, use complex expressions, or even perform inferior
-functions calls.
+Reply:
+@table @samp
+@item OK
+success
+@item
+not supported
+@item E@var{NN}
+for an error
+@end table
 
-@table @code
+@end table
 
-@kindex define
-@item define @var{commandname}
-Define a command named @var{commandname}.  If there is already a command
-by that name, you are asked to confirm that you want to redefine it.
+@node Stop Reply Packets
+@section Stop Reply Packets
+@cindex stop reply packets
 
-The definition of the command is made up of other @value{GDBN} command lines,
-which are given following the @code{define} command.  The end of these
-commands is marked by a line containing @code{end}.
+The @samp{C}, @samp{c}, @samp{S}, @samp{s} and @samp{?} packets can
+receive any of the below as a reply.  In the case of the @samp{C},
+@samp{c}, @samp{S} and @samp{s} packets, that reply is only returned
+when the target halts.  In the below the exact meaning of @samp{signal
+number} is poorly defined.  In general one of the UNIX signal numbering
+conventions is used.
 
-@kindex if
-@kindex else
-@item if
-Takes a single argument, which is an expression to evaluate.
-It is followed by a series of commands that are executed
-only if the expression is true (nonzero).
-There can then optionally be a line @code{else}, followed
-by a series of commands that are only executed if the expression
-was false.  The end of the list is marked by a line containing @code{end}.
+@table @samp
 
-@kindex while
-@item while
-The syntax is similar to @code{if}: the command takes a single argument,
-which is an expression to evaluate, and must be followed by the commands to
-execute, one per line, terminated by an @code{end}.
-The commands are executed repeatedly as long as the expression
-evaluates to true.
+@item S@var{AA}
+@var{AA} is the signal number
+
+@item @code{T}@var{AA}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}@var{n...}@code{:}@var{r...}@code{;}
+@cindex @code{T} packet reply
+
+@var{AA} = two hex digit signal number; @var{n...} = register number
+(hex), @var{r...}  = target byte ordered register contents, size defined
+by @code{REGISTER_RAW_SIZE}; @var{n...} = @samp{thread}, @var{r...} =
+thread process ID, this is a hex integer; @var{n...} = (@samp{watch} | 
+@samp{rwatch} | @samp{awatch}, @var{r...} = data address, this is a hex
+integer; @var{n...} = other string not starting with valid hex digit.
+@value{GDBN} should ignore this @var{n...}, @var{r...} pair and go on
+to the next.  This way we can extend the protocol.
+
+@item W@var{AA}
+
+The process exited, and @var{AA} is the exit status.  This is only
+applicable to certain targets.
+
+@item X@var{AA}
 
-@kindex document
-@item document @var{commandname}
-Document the user-defined command @var{commandname}, so that it can be
-accessed by @code{help}.  The command @var{commandname} must already be
-defined.  This command reads lines of documentation just as @code{define}
-reads the lines of the command definition, ending with @code{end}.
-After the @code{document} command is finished, @code{help} on command
-@var{commandname} displays the documentation you have written.
+The process terminated with signal @var{AA}.
 
-You may use the @code{document} command again to change the
-documentation of a command.  Redefining the command with @code{define}
-does not change the documentation.
+@item N@var{AA};@var{t@dots{}};@var{d@dots{}};@var{b@dots{}} @strong{(obsolete)}
 
-@kindex help user-defined
-@item help user-defined
-List all user-defined commands, with the first line of the documentation
-(if any) for each.
+@var{AA} = signal number; @var{t@dots{}} = address of symbol
+@code{_start}; @var{d@dots{}} = base of data section; @var{b@dots{}} =
+base of bss section.  @emph{Note: only used by Cisco Systems targets.
+The difference between this reply and the @samp{qOffsets} query is that
+the @samp{N} packet may arrive spontaneously whereas the @samp{qOffsets}
+is a query initiated by the host debugger.}
 
-@kindex show user
-@item show user
-@itemx show user @var{commandname}
-Display the @value{GDBN} commands used to define @var{commandname} (but
-not its documentation).  If no @var{commandname} is given, display the
-definitions for all user-defined commands.
+@item O@var{XX@dots{}}
 
-@end table
+@var{XX@dots{}} is hex encoding of @sc{ascii} data.  This can happen at
+any time while the program is running and the debugger should continue
+to wait for @samp{W}, @samp{T}, etc.
 
-When user-defined commands are executed, the
-commands of the definition are not printed.  An error in any command
-stops execution of the user-defined command.
+@item F@var{call-id}@code{,}@var{parameter@dots{}}
 
-If used interactively, commands that would ask for confirmation proceed
-without asking when used inside a user-defined command.  Many @value{GDBN}
-commands that normally print messages to say what they are doing omit the
-messages when used in a user-defined command.
+@var{call-id} is the identifier which says which host system call should
+be called.  This is just the name of the function.  Translation into the
+correct system call is only applicable as it's defined in @value{GDBN}.
+@xref{File-I/O remote protocol extension}, for a list of implemented
+system calls.
 
-@node Hooks
-@section User-defined command hooks
-@cindex command hooks
-@cindex hooks, for commands
-@cindex hooks, pre-command
+@var{parameter@dots{}} is a list of parameters as defined for this very
+system call.
 
-@kindex hook
-@kindex hook-
-You may define @dfn{hooks}, which are a special kind of user-defined
-command.  Whenever you run the command @samp{foo}, if the user-defined
-command @samp{hook-foo} exists, it is executed (with no arguments)
-before that command.
+The target replies with this packet when it expects @value{GDBN} to call
+a host system call on behalf of the target.  @value{GDBN} replies with
+an appropriate @code{F} packet and keeps up waiting for the next reply
+packet from the target.  The latest @samp{C}, @samp{c}, @samp{S} or
+@samp{s} action is expected to be continued.
+@xref{File-I/O remote protocol extension}, for more details.
 
-@cindex hooks, post-command
-@kindex hookpost
-@kindex hookpost-
-A hook may also be defined which is run after the command you executed.
-Whenever you run the command @samp{foo}, if the user-defined command
-@samp{hookpost-foo} exists, it is executed (with no arguments) after
-that command.  Post-execution hooks may exist simultaneously with
-pre-execution hooks, for the same command.
+@end table
 
-It is valid for a hook to call the command which it hooks.  If this
-occurs, the hook is not re-executed, thereby avoiding infinte recursion.
+@node General Query Packets
+@section General Query Packets
 
-@c It would be nice if hookpost could be passed a parameter indicating
-@c if the command it hooks executed properly or not.  FIXME!
+The following set and query packets have already been defined.
 
-@kindex stop@r{, a pseudo-command}
-In addition, a pseudo-command, @samp{stop} exists.  Defining
-(@samp{hook-stop}) makes the associated commands execute every time
-execution stops in your program: before breakpoint commands are run,
-displays are printed, or the stack frame is printed.
+@table @r
 
-For example, to ignore @code{SIGALRM} signals while
-single-stepping, but treat them normally during normal execution,
-you could define:
+@item @code{q}@code{C} --- current thread
 
-@example
-define hook-stop
-handle SIGALRM nopass
-end
+Return the current thread id.
 
-define hook-run
-handle SIGALRM pass
-end
+Reply:
+@table @samp
+@item @code{QC}@var{pid}
+Where @var{pid} is a HEX encoded 16 bit process id.
+@item *
+Any other reply implies the old pid.
+@end table
 
-define hook-continue
-handle SIGLARM pass
-end
-@end example
+@item @code{q}@code{fThreadInfo} -- all thread ids
 
-As a further example, to hook at the begining and end of the @code{echo}
-command, and to add extra text to the beginning and end of the message, 
-you could define:
+@code{q}@code{sThreadInfo}
 
-@example
-define hook-echo
-echo <<<---
-end
+Obtain a list of active thread ids from the target (OS).  Since there
+may be too many active threads to fit into one reply packet, this query
+works iteratively: it may require more than one query/reply sequence to
+obtain the entire list of threads.  The first query of the sequence will
+be the @code{qf}@code{ThreadInfo} query; subsequent queries in the
+sequence will be the @code{qs}@code{ThreadInfo} query.
 
-define hookpost-echo
-echo --->>>\n
-end
+NOTE: replaces the @code{qL} query (see below).
 
-(@value{GDBP}) echo Hello World
-<<<---Hello World--->>>
-(@value{GDBP})
+Reply:
+@table @samp
+@item @code{m}@var{id}
+A single thread id
+@item @code{m}@var{id},@var{id}@dots{}
+a comma-separated list of thread ids
+@item @code{l}
+(lower case 'el') denotes end of list.
+@end table
 
-@end example
+In response to each query, the target will reply with a list of one or
+more thread ids, in big-endian hex, separated by commas.  @value{GDBN}
+will respond to each reply with a request for more thread ids (using the
+@code{qs} form of the query), until the target responds with @code{l}
+(lower-case el, for @code{'last'}).
 
-You can define a hook for any single-word command in @value{GDBN}, but
-not for command aliases; you should define a hook for the basic command
-name, e.g.  @code{backtrace} rather than @code{bt}.
-@c FIXME!  So how does Joe User discover whether a command is an alias
-@c or not?
-If an error occurs during the execution of your hook, execution of
-@value{GDBN} commands stops and @value{GDBN} issues a prompt
-(before the command that you actually typed had a chance to run).
+@item @code{q}@code{ThreadExtraInfo}@code{,}@var{id} --- extra thread info
+
+Where @var{id} is a thread-id in big-endian hex.  Obtain a printable
+string description of a thread's attributes from the target OS.  This
+string may contain anything that the target OS thinks is interesting for
+@value{GDBN} to tell the user about the thread.  The string is displayed
+in @value{GDBN}'s @samp{info threads} display.  Some examples of
+possible thread extra info strings are ``Runnable'', or ``Blocked on
+Mutex''.
+
+Reply:
+@table @samp
+@item @var{XX@dots{}}
+Where @var{XX@dots{}} is a hex encoding of @sc{ascii} data, comprising
+the printable string containing the extra information about the thread's
+attributes.
+@end table
 
-If you try to define a hook which does not match any known command, you
-get a warning from the @code{define} command.
+@item @code{q}@code{L}@var{startflag}@var{threadcount}@var{nextthread} --- query @var{LIST} or @var{threadLIST} @strong{(deprecated)}
 
-@node Command Files
-@section Command files
+Obtain thread information from RTOS.  Where: @var{startflag} (one hex
+digit) is one to indicate the first query and zero to indicate a
+subsequent query; @var{threadcount} (two hex digits) is the maximum
+number of threads the response packet can contain; and @var{nextthread}
+(eight hex digits), for subsequent queries (@var{startflag} is zero), is
+returned in the response as @var{argthread}.
 
-@cindex command files
-A command file for @value{GDBN} is a file of lines that are @value{GDBN}
-commands.  Comments (lines starting with @kbd{#}) may also be included.
-An empty line in a command file does nothing; it does not mean to repeat
-the last command, as it would from the terminal.
+NOTE: this query is replaced by the @code{q}@code{fThreadInfo} query
+(see above).
 
-@cindex init file
-@cindex @file{.gdbinit}
-@cindex @file{gdb.ini}
-When you start @value{GDBN}, it automatically executes commands from its
-@dfn{init files}, normally called @file{.gdbinit}@footnote{The DJGPP
-port of @value{GDBN} uses the name @file{gdb.ini} instead, due to the
-limitations of file names imposed by DOS filesystems.}.
-During startup, @value{GDBN} does the following:
+Reply:
+@table @samp
+@item @code{q}@code{M}@var{count}@var{done}@var{argthread}@var{thread@dots{}}
+Where: @var{count} (two hex digits) is the number of threads being
+returned; @var{done} (one hex digit) is zero to indicate more threads
+and one indicates no further threads; @var{argthreadid} (eight hex
+digits) is @var{nextthread} from the request packet; @var{thread@dots{}}
+is a sequence of thread IDs from the target.  @var{threadid} (eight hex
+digits).  See @code{remote.c:parse_threadlist_response()}.
+@end table
 
-@enumerate
-@item
-Reads the init file (if any) in your home directory@footnote{On
-DOS/Windows systems, the home directory is the one pointed to by the
-@code{HOME} environment variable.}.
+@item @code{q}@code{CRC:}@var{addr}@code{,}@var{length} --- compute CRC of memory block
 
-@item
-Processes command line options and operands.
+Reply:
+@table @samp
+@item @code{E}@var{NN}
+An error (such as memory fault)
+@item @code{C}@var{CRC32}
+A 32 bit cyclic redundancy check of the specified memory region.
+@end table
 
-@item
-Reads the init file (if any) in the current working directory.
+@item @code{q}@code{Offsets} --- query sect offs
 
-@item
-Reads command files specified by the @samp{-x} option.
-@end enumerate
+Get section offsets that the target used when re-locating the downloaded
+image.  @emph{Note: while a @code{Bss} offset is included in the
+response, @value{GDBN} ignores this and instead applies the @code{Data}
+offset to the @code{Bss} section.}
 
-The init file in your home directory can set options (such as @samp{set
-complaints}) that affect subsequent processing of command line options
-and operands.  Init files are not executed if you use the @samp{-nx}
-option (@pxref{Mode Options, ,Choosing modes}).
+Reply:
+@table @samp
+@item @code{Text=}@var{xxx}@code{;Data=}@var{yyy}@code{;Bss=}@var{zzz}
+@end table
 
-@cindex init file name
-On some configurations of @value{GDBN}, the init file is known by a
-different name (these are typically environments where a specialized
-form of @value{GDBN} may need to coexist with other forms, hence a
-different name for the specialized version's init file).  These are the
-environments with special init file names:
+@item @code{q}@code{P}@var{mode}@var{threadid} --- thread info request
 
-@cindex @file{.vxgdbinit}
-@itemize @bullet
-@item
-VxWorks (Wind River Systems real-time OS): @file{.vxgdbinit}
+Returns information on @var{threadid}.  Where: @var{mode} is a hex
+encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
 
-@cindex @file{.os68gdbinit}
-@item
-OS68K (Enea Data Systems real-time OS): @file{.os68gdbinit}
+Reply:
+@table @samp
+@item *
+@end table
 
-@cindex @file{.esgdbinit}
-@item
-ES-1800 (Ericsson Telecom AB M68000 emulator): @file{.esgdbinit}
-@end itemize
+See @code{remote.c:remote_unpack_thread_info_response()}.
 
-You can also request the execution of a command file with the
-@code{source} command:
+@item @code{q}@code{Rcmd,}@var{command} --- remote command
 
-@table @code
-@kindex source
-@item source @var{filename}
-Execute the command file @var{filename}.
+@var{command} (hex encoded) is passed to the local interpreter for
+execution.  Invalid commands should be reported using the output string.
+Before the final result packet, the target may also respond with a
+number of intermediate @code{O}@var{output} console output packets.
+@emph{Implementors should note that providing access to a stubs's
+interpreter may have security implications}.
+
+Reply:
+@table @samp
+@item OK
+A command response with no output.
+@item @var{OUTPUT}
+A command response with the hex encoded output string @var{OUTPUT}.
+@item @code{E}@var{NN}
+Indicate a badly formed request.
+@item @samp{}
+When @samp{q}@samp{Rcmd} is not recognized.
 @end table
 
-The lines in a command file are executed sequentially.  They are not
-printed as they are executed.  An error in any command terminates execution
-of the command file.
+@item @code{qSymbol::} --- symbol lookup
 
-Commands that would ask for confirmation if used interactively proceed
-without asking when used in a command file.  Many @value{GDBN} commands that
-normally print messages to say what they are doing omit the messages
-when called from command files.
+Notify the target that @value{GDBN} is prepared to serve symbol lookup
+requests.  Accept requests from the target for the values of symbols.
 
-@value{GDBN} also accepts command input from standard input.  In this
-mode, normal output goes to standard output and error output goes to
-standard error.  Errors in a command file supplied on standard input do
-not terminate execution of the command file --- execution continues with
-the next command.
+Reply:
+@table @samp
+@item @code{OK}
+The target does not need to look up any (more) symbols.
+@item @code{qSymbol:}@var{sym_name}
+The target requests the value of symbol @var{sym_name} (hex encoded).
+@value{GDBN} may provide the value by using the
+@code{qSymbol:}@var{sym_value}:@var{sym_name} message, described below.
+@end table
 
-@example
-gdb < cmds > log 2>&1
-@end example
+@item @code{qSymbol:}@var{sym_value}:@var{sym_name} --- symbol value
 
-(The syntax above will vary depending on the shell used.) This example
-will execute commands from the file @file{cmds}. All output and errors
-would be directed to @file{log}.
+Set the value of @var{sym_name} to @var{sym_value}.
 
-@node Output
-@section Commands for controlled output
+@var{sym_name} (hex encoded) is the name of a symbol whose value the
+target has previously requested.
 
-During the execution of a command file or a user-defined command, normal
-@value{GDBN} output is suppressed; the only output that appears is what is
-explicitly printed by the commands in the definition.  This section
-describes three commands useful for generating exactly the output you
-want.
+@var{sym_value} (hex) is the value for symbol @var{sym_name}.  If
+@value{GDBN} cannot supply a value for @var{sym_name}, then this field
+will be empty.
 
-@table @code
-@kindex echo
-@item echo @var{text}
-@c I do not consider backslash-space a standard C escape sequence
-@c because it is not in ANSI.
-Print @var{text}.  Nonprinting characters can be included in
-@var{text} using C escape sequences, such as @samp{\n} to print a
-newline.  @strong{No newline is printed unless you specify one.}
-In addition to the standard C escape sequences, a backslash followed
-by a space stands for a space.  This is useful for displaying a
-string with spaces at the beginning or the end, since leading and
-trailing spaces are otherwise trimmed from all arguments.
-To print @samp{@w{ }and foo =@w{ }}, use the command
-@samp{echo \@w{ }and foo = \@w{ }}.
+Reply:
+@table @samp
+@item @code{OK}
+The target does not need to look up any (more) symbols.
+@item @code{qSymbol:}@var{sym_name}
+The target requests the value of a new symbol @var{sym_name} (hex
+encoded).  @value{GDBN} will continue to supply the values of symbols
+(if available), until the target ceases to request them.
+@end table
 
-A backslash at the end of @var{text} can be used, as in C, to continue
-the command onto subsequent lines.  For example,
+@end table
 
-@example
-echo This is some text\n\
-which is continued\n\
-onto several lines.\n
-@end example
+@node Register Packet Format
+@section Register Packet Format
 
-produces the same output as
+The following @samp{g}/@samp{G} packets have previously been defined.
+In the below, some thirty-two bit registers are transferred as
+sixty-four bits.  Those registers should be zero/sign extended (which?)
+to fill the space allocated.  Register bytes are transfered in target
+byte order.  The two nibbles within a register byte are transfered
+most-significant - least-significant.
 
-@example
-echo This is some text\n
-echo which is continued\n
-echo onto several lines.\n
-@end example
+@table @r
 
-@kindex output
-@item output @var{expression}
-Print the value of @var{expression} and nothing but that value: no
-newlines, no @samp{$@var{nn} = }.  The value is not entered in the
-value history either.  @xref{Expressions, ,Expressions}, for more information
-on expressions.
+@item MIPS32
+
+All registers are transfered as thirty-two bit quantities in the order:
+32 general-purpose; sr; lo; hi; bad; cause; pc; 32 floating-point
+registers; fsr; fir; fp.
 
-@item output/@var{fmt} @var{expression}
-Print the value of @var{expression} in format @var{fmt}.  You can use
-the same formats as for @code{print}.  @xref{Output Formats,,Output
-formats}, for more information.
+@item MIPS64
 
-@kindex printf
-@item printf @var{string}, @var{expressions}@dots{}
-Print the values of the @var{expressions} under the control of
-@var{string}.  The @var{expressions} are separated by commas and may be
-either numbers or pointers.  Their values are printed as specified by
-@var{string}, exactly as if your program were to execute the C
-subroutine
-@c FIXME: the above implies that at least all ANSI C formats are
-@c supported, but it isn't true: %E and %G don't work (or so it seems).
-@c Either this is a bug, or the manual should document what formats are
-@c supported.
+All registers are transfered as sixty-four bit quantities (including
+thirty-two bit registers such as @code{sr}).  The ordering is the same
+as @code{MIPS32}.
 
-@example
-printf (@var{string}, @var{expressions}@dots{});
-@end example
+@end table
 
-For example, you can print two values in hex like this:
+@node Examples
+@section Examples
+
+Example sequence of a target being re-started.  Notice how the restart
+does not get any direct output:
 
 @smallexample
-printf "foo, bar-foo = 0x%x, 0x%x\n", foo, bar-foo
+-> @code{R00}
+<- @code{+}
+@emph{target restarts}
+-> @code{?}
+<- @code{+}
+<- @code{T001:1234123412341234}
+-> @code{+}
 @end smallexample
 
-The only backslash-escape sequences that you can use in the format
-string are the simple ones that consist of backslash followed by a
-letter.
-@end table
+Example sequence of a target being stepped by a single instruction:
 
-@node TUI
-@chapter @value{GDBN} Text User Interface
-@cindex TUI
+@smallexample
+-> @code{G1445@dots{}}
+<- @code{+}
+-> @code{s}
+<- @code{+}
+@emph{time passes}
+<- @code{T001:1234123412341234}
+-> @code{+}
+-> @code{g}
+<- @code{+}
+<- @code{1455@dots{}}
+-> @code{+}
+@end smallexample
+
+@node File-I/O remote protocol extension
+@section File-I/O remote protocol extension
+@cindex File-I/O remote protocol extension
 
 @menu
-* TUI Overview::                TUI overview
-* TUI Keys::                    TUI key bindings
-* TUI Commands::                TUI specific commands
-* TUI Configuration::           TUI configuration variables
+* File-I/O Overview::
+* Protocol basics::
+* The `F' request packet::
+* The `F' reply packet::
+* Memory transfer::
+* The Ctrl-C message::
+* Console I/O::
+* The isatty call::
+* The system call::
+* List of supported calls::
+* Protocol specific representation of datatypes::
+* Constants::
+* File-I/O Examples::
 @end menu
 
-The @value{GDBN} Text User Interface, TUI in short,
-is a terminal interface which uses the @code{curses} library
-to show the source file, the assembly output, the program registers
-and @value{GDBN} commands in separate text windows.
-The TUI is available only when @value{GDBN} is configured
-with the @code{--enable-tui} configure option (@pxref{Configure Options}).
+@node File-I/O Overview
+@subsection File-I/O Overview
+@cindex file-i/o overview
+
+The File I/O remote protocol extension (short: File-I/O) allows the
+target to use the hosts file system and console I/O when calling various
+system calls.  System calls on the target system are translated into a
+remote protocol packet to the host system which then performs the needed
+actions and returns with an adequate response packet to the target system.
+This simulates file system operations even on targets that lack file systems.
+
+The protocol is defined host- and target-system independent.  It uses
+it's own independent representation of datatypes and values.  Both,
+@value{GDBN} and the target's @value{GDBN} stub are responsible for
+translating the system dependent values into the unified protocol values
+when data is transmitted.
+
+The communication is synchronous.  A system call is possible only
+when GDB is waiting for the @samp{C}, @samp{c}, @samp{S} or @samp{s}
+packets.  While @value{GDBN} handles the request for a system call,
+the target is stopped to allow deterministic access to the target's
+memory.  Therefore File-I/O is not interuptible by target signals.  It
+is possible to interrupt File-I/O by a user interrupt (Ctrl-C), though.
+
+The target's request to perform a host system call does not finish
+the latest @samp{C}, @samp{c}, @samp{S} or @samp{s} action.  That means,
+after finishing the system call, the target returns to continuing the
+previous activity (continue, step).  No additional continue or step
+request from @value{GDBN} is required.
 
-@node TUI Overview
-@section TUI overview
+@smallexample
+(gdb) continue
+  <- target requests 'system call X'
+  target is stopped, @value{GDBN} executes system call
+  -> GDB returns result
+  ... target continues, GDB returns to wait for the target
+  <- target hits breakpoint and sends a Txx packet
+@end smallexample
 
-The TUI has two display modes that can be switched while
-@value{GDBN} runs:
+The protocol is only used for files on the host file system and
+for I/O on the console.  Character or block special devices, pipes,
+named pipes or sockets or any other communication method on the host
+system are not supported by this protocol.
 
-@itemize @bullet
-@item
-A curses (or TUI) mode in which it displays several text
-windows on the terminal.
+@node Protocol basics
+@subsection Protocol basics
+@cindex protocol basics, file-i/o
 
-@item
-A standard mode which corresponds to the @value{GDBN} configured without
-the TUI.
-@end itemize
+The File-I/O protocol uses the @code{F} packet, as request as well
+as as reply packet.  Since a File-I/O system call can only occur when
+@value{GDBN} is waiting for the continuing or stepping target, the 
+File-I/O request is a reply that @value{GDBN} has to expect as a result
+of a former @samp{C}, @samp{c}, @samp{S} or @samp{s} packet.
+This @code{F} packet contains all information needed to allow @value{GDBN}
+to call the appropriate host system call:
 
-In the TUI mode, @value{GDBN} can display several text window
-on the terminal:
+@itemize @bullet
+@item 
+A unique identifier for the requested system call.
 
-@table @emph
-@item command
-This window is the @value{GDBN} command window with the @value{GDBN}
-prompt and the @value{GDBN} outputs.  The @value{GDBN} input is still
-managed using readline but through the TUI.  The @emph{command}
-window is always visible.
+@item
+All parameters to the system call.  Pointers are given as addresses
+in the target memory address space.  Pointers to strings are given as
+pointer/length pair.  Numerical values are given as they are. 
+Numerical control values are given in a protocol specific representation.
 
-@item source
-The source window shows the source file of the program.  The current
-line as well as active breakpoints are displayed in this window.
-The current program position is shown with the @samp{>} marker and
-active breakpoints are shown with @samp{*} markers.
+@end itemize
 
-@item assembly
-The assembly window shows the disassembly output of the program.
+At that point @value{GDBN} has to perform the following actions.
 
-@item register
-This window shows the processor registers.  It detects when
-a register is changed and when this is the case, registers that have
-changed are highlighted.
+@itemize @bullet
+@item 
+If parameter pointer values are given, which point to data needed as input
+to a system call, @value{GDBN} requests this data from the target with a
+standard @code{m} packet request.  This additional communication has to be
+expected by the target implementation and is handled as any other @code{m}
+packet.
 
-@end table
+@item
+@value{GDBN} translates all value from protocol representation to host
+representation as needed.  Datatypes are coerced into the host types.
 
-The source, assembly and register windows are attached to the thread
-and the frame position.  They are updated when the current thread
-changes, when the frame changes or when the program counter changes.
-These three windows are arranged by the TUI according to several
-layouts.  The layout defines which of these three windows are visible.
-The following layouts are available:
+@item
+@value{GDBN} calls the system call
 
-@itemize @bullet
 @item
-source
+It then coerces datatypes back to protocol representation.
 
 @item
-assembly
+If pointer parameters in the request packet point to buffer space in which
+a system call is expected to copy data to, the data is transmitted to the
+target using a @code{M} or @code{X} packet.  This packet has to be expected
+by the target implementation and is handled as any other @code{M} or @code{X}
+packet.
 
+@end itemize
+
+Eventually @value{GDBN} replies with another @code{F} packet which contains all
+necessary information for the target to continue.  This at least contains
+
+@itemize @bullet
 @item
-source and assembly
+Return value.
 
 @item
-source and registers
+@code{errno}, if has been changed by the system call.
 
 @item
-assembly and registers
+``Ctrl-C'' flag.
 
 @end itemize
 
-@node TUI Keys
-@section TUI Key Bindings
-@cindex TUI key bindings
+After having done the needed type and value coercion, the target continues
+the latest continue or step action.
 
-The TUI installs several key bindings in the readline keymaps
-(@pxref{Command Line Editing}).
-They allow to leave or enter in the TUI mode or they operate
-directly on the TUI layout and windows.  The following key bindings
-are installed for both TUI mode and the @value{GDBN} standard mode.
+@node The `F' request packet
+@subsection The @code{F} request packet
+@cindex file-i/o request packet
+@cindex @code{F} request packet
 
-@table @kbd
-@kindex C-x C-a
-@item C-x C-a
-@kindex C-x a
-@itemx C-x a
-@kindex C-x A
-@itemx C-x A
-Enter or leave the TUI mode.  When the TUI mode is left,
-the curses window management is left and @value{GDBN} operates using
-its standard mode writing on the terminal directly.  When the TUI
-mode is entered, the control is given back to the curses windows.
-The screen is then refreshed.
+The @code{F} request packet has the following format:
 
-@kindex C-x 1
-@item C-x 1
-Use a TUI layout with only one window.  The layout will
-either be @samp{source} or @samp{assembly}.  When the TUI mode
-is not active, it will switch to the TUI mode.
+@table @samp
 
-Think of this key binding as the Emacs @kbd{C-x 1} binding.
+@smallexample
+@code{F}@var{call-id}@code{,}@var{parameter@dots{}}
+@end smallexample
 
-@kindex C-x 2
-@item C-x 2
-Use a TUI layout with at least two windows.  When the current
-layout shows already two windows, a next layout with two windows is used.
-When a new layout is chosen, one window will always be common to the
-previous layout and the new one.
+@var{call-id} is the identifier to indicate the host system call to be called.
+This is just the name of the function.
 
-Think of it as the Emacs @kbd{C-x 2} binding.
+@var{parameter@dots{}} are the parameters to the system call.
 
-@end table
+@end table 
 
-The following key bindings are handled only by the TUI mode:
+Parameters are hexadecimal integer values, either the real values in case
+of scalar datatypes, as pointers to target buffer space in case of compound
+datatypes and unspecified memory areas or as pointer/length pairs in case
+of string parameters.  These are appended to the call-id, each separated
+from its predecessor by a comma.  All values are transmitted in ASCII
+string representation, pointer/length pairs separated by a slash.
 
-@table @key
-@kindex PgUp
-@item PgUp
-Scroll the active window one page up.
+@node The `F' reply packet
+@subsection The @code{F} reply packet
+@cindex file-i/o reply packet
+@cindex @code{F} reply packet
 
-@kindex PgDn
-@item PgDn
-Scroll the active window one page down.
+The @code{F} reply packet has the following format:
 
-@kindex Up
-@item Up
-Scroll the active window one line up.
+@table @samp
 
-@kindex Down
-@item Down
-Scroll the active window one line down.
+@smallexample
+@code{F}@var{retcode}@code{,}@var{errno}@code{,}@var{Ctrl-C flag}@code{;}@var{call specific attachment}
+@end smallexample
 
-@kindex Left
-@item Left
-Scroll the active window one column left.
+@var{retcode} is the return code of the system call as hexadecimal value.
 
-@kindex Right
-@item Right
-Scroll the active window one column right.
+@var{errno} is the errno set by the call, in protocol specific representation.
+This parameter can be omitted if the call was successful.
 
-@kindex C-L
-@item C-L
-Refresh the screen.
+@var{Ctrl-C flag} is only send if the user requested a break.  In this
+case, @var{errno} must be send as well, even if the call was successful.
+The @var{Ctrl-C flag} itself consists of the character 'C':
 
-@end table
+@smallexample
+F0,0,C
+@end smallexample
 
-In the TUI mode, the arrow keys are used by the active window
-for scrolling.  This means they are not available for readline.  It is
-necessary to use other readline key bindings such as @key{C-p}, @key{C-n},
-@key{C-b} and @key{C-f}.
+@noindent
+or, if the call was interupted before the host call has been performed:
 
-@node TUI Commands
-@section TUI specific commands
-@cindex TUI commands
+@smallexample
+F-1,4,C
+@end smallexample
 
-The TUI has specific commands to control the text windows.
-These commands are always available, that is they do not depend on
-the current terminal mode in which @value{GDBN} runs.  When @value{GDBN}
-is in the standard mode, using these commands will automatically switch
-in the TUI mode.
+@noindent
+assuming 4 is the protocol specific representation of @code{EINTR}.
 
-@table @code
-@item layout next
-@kindex layout next
-Display the next layout.
+@end table
 
-@item layout prev
-@kindex layout prev
-Display the previous layout.
+@node Memory transfer
+@subsection Memory transfer
+@cindex memory transfer, in file-i/o protocol
+
+Structured data which is transferred using a memory read or write as e.g.@:
+a @code{struct stat} is expected to be in a protocol specific format with
+all scalar multibyte datatypes being big endian.  This should be done by
+the target before the @code{F} packet is sent resp.@: by @value{GDBN} before
+it transfers memory to the target.  Transferred pointers to structured
+data should point to the already coerced data at any time.
+
+@node The Ctrl-C message
+@subsection The Ctrl-C message
+@cindex ctrl-c message, in file-i/o protocol
+
+A special case is, if the @var{Ctrl-C flag} is set in the @value{GDBN}
+reply packet.  In this case the target should behave, as if it had
+gotten a break message.  The meaning for the target is ``system call
+interupted by @code{SIGINT}''.  Consequentially, the target should actually stop
+(as with a break message) and return to @value{GDBN} with a @code{T02}
+packet.  In this case, it's important for the target to know, in which 
+state the system call was interrupted.  Since this action is by design
+not an atomic operation, we have to differ between two cases:
 
-@item layout src
-@kindex layout src
-Display the source window only.
+@itemize @bullet
+@item
+The system call hasn't been performed on the host yet.
 
-@item layout asm
-@kindex layout asm
-Display the assembly window only.
+@item
+The system call on the host has been finished.
 
-@item layout split
-@kindex layout split
-Display the source and assembly window.
+@end itemize
 
-@item layout regs
-@kindex layout regs
-Display the register window together with the source or assembly window.
+These two states can be distinguished by the target by the value of the
+returned @code{errno}.  If it's the protocol representation of @code{EINTR}, the system
+call hasn't been performed.  This is equivalent to the @code{EINTR} handling
+on POSIX systems.  In any other case, the target may presume that the
+system call has been finished --- successful or not --- and should behave
+as if the break message arrived right after the system call.
+
+@value{GDBN} must behave reliable.  If the system call has not been called
+yet, @value{GDBN} may send the @code{F} reply immediately, setting @code{EINTR} as
+@code{errno} in the packet.  If the system call on the host has been finished
+before the user requests a break, the full action must be finshed by
+@value{GDBN}.  This requires sending @code{M} or @code{X} packets as they fit.
+The @code{F} packet may only be send when either nothing has happened
+or the full action has been completed.
+
+@node Console I/O
+@subsection Console I/O
+@cindex console i/o as part of file-i/o
+
+By default and if not explicitely closed by the target system, the file
+descriptors 0, 1 and 2 are connected to the @value{GDBN} console.  Output
+on the @value{GDBN} console is handled as any other file output operation
+(@code{write(1, @dots{})} or @code{write(2, @dots{})}).  Console input is handled
+by @value{GDBN} so that after the target read request from file descriptor
+0 all following typing is buffered until either one of the following
+conditions is met:
 
-@item focus next | prev | src | asm | regs | split
-@kindex focus
-Set the focus to the named window.
-This command allows to change the active window so that scrolling keys
-can be affected to another window.
+@itemize @bullet
+@item
+The user presses @kbd{Ctrl-C}.  The behaviour is as explained above, the
+@code{read}
+system call is treated as finished.
 
-@item refresh
-@kindex refresh
-Refresh the screen.  This is similar to using @key{C-L} key.
+@item
+The user presses @kbd{Enter}.  This is treated as end of input with a trailing
+line feed.
 
-@item update
-@kindex update
-Update the source window and the current execution point.
+@item
+The user presses @kbd{Ctrl-D}.  This is treated as end of input.  No trailing
+character, especially no Ctrl-D is appended to the input.
 
-@item winheight @var{name} +@var{count}
-@itemx winheight @var{name} -@var{count}
-@kindex winheight
-Change the height of the window @var{name} by @var{count}
-lines.  Positive counts increase the height, while negative counts
-decrease it.
+@end itemize
 
-@end table
+If the user has typed more characters as fit in the buffer given to
+the read call, the trailing characters are buffered in @value{GDBN} until
+either another @code{read(0, @dots{})} is requested by the target or debugging
+is stopped on users request.
 
-@node TUI Configuration
-@section TUI configuration variables
-@cindex TUI configuration variables
+@node The isatty call
+@subsection The isatty(3) call
+@cindex isatty call, file-i/o protocol
 
-The TUI has several configuration variables that control the
-appearance of windows on the terminal.
+A special case in this protocol is the library call @code{isatty} which
+is implemented as it's own call inside of this protocol.  It returns
+1 to the target if the file descriptor given as parameter is attached
+to the @value{GDBN} console, 0 otherwise.  Implementing through system calls
+would require implementing @code{ioctl} and would be more complex than
+needed.
 
-@table @code
-@item set tui border-kind @var{kind}
-@kindex set tui border-kind
-Select the border appearance for the source, assembly and register windows.
-The possible values are the following:
-@table @code
-@item space
-Use a space character to draw the border.
+@node The system call
+@subsection The system(3) call
+@cindex system call, file-i/o protocol
+
+The other special case in this protocol is the @code{system} call which
+is implemented as it's own call, too.  @value{GDBN} is taking over the full
+task of calling the necessary host calls to perform the @code{system}
+call.  The return value of @code{system} is simplified before it's returned
+to the target.  Basically, the only signal transmitted back is @code{EINTR}
+in case the user pressed @kbd{Ctrl-C}.  Otherwise the return value consists
+entirely of the exit status of the called command.
+
+Due to security concerns, the @code{system} call is refused to be called
+by @value{GDBN} by default.  The user has to allow this call explicitly by 
+entering
+
+@table @samp
+@kindex set remote system-call-allowed 1
+@item @code{set remote system-call-allowed 1}
+@end table
 
-@item ascii
-Use ascii characters + - and | to draw the border.
+Disabling the @code{system} call is done by
+
+@table @samp
+@kindex set remote system-call-allowed 0
+@item @code{set remote system-call-allowed 0}
+@end table
 
-@item acs
-Use the Alternate Character Set to draw the border.  The border is
-drawn using character line graphics if the terminal supports them.
+The current setting is shown by typing
 
+@table @samp
+@kindex show remote system-call-allowed
+@item @code{show remote system-call-allowed}
 @end table
 
-@item set tui active-border-mode @var{mode}
-@kindex set tui active-border-mode
-Select the attributes to display the border of the active window.
-The possible values are @code{normal}, @code{standout}, @code{reverse},
-@code{half}, @code{half-standout}, @code{bold} and @code{bold-standout}.
+@node List of supported calls
+@subsection List of supported calls
+@cindex list of supported file-i/o calls
+
+@menu
+* open::
+* close::
+* read::
+* write::
+* lseek::
+* rename::
+* unlink::
+* stat/fstat::
+* gettimeofday::
+* isatty::
+* system::
+@end menu
+
+@node open
+@unnumberedsubsubsec open
+@cindex open, file-i/o system call
+
+@smallexample
+@exdent Synopsis:
+int open(const char *pathname, int flags);
+int open(const char *pathname, int flags, mode_t mode);
+
+@exdent Request:     
+Fopen,pathptr/len,flags,mode
+@end smallexample
+
+@noindent
+@code{flags} is the bitwise or of the following values:
 
-@item set tui border-mode @var{mode}
-@kindex set tui border-mode
-Select the attributes to display the border of other windows.
-The @var{mode} can be one of the following:
 @table @code
-@item normal
-Use normal attributes to display the border.
+@item O_CREAT    
+If the file does not exist it will be created.  The host
+rules apply as far as file ownership and time stamps
+are concerned.
 
-@item standout
-Use standout mode.
+@item O_EXCL     
+When used with O_CREAT, if the file already exists it is
+an error and open() fails.
 
-@item reverse
-Use reverse video mode.
+@item O_TRUNC    
+If the file already exists and the open mode allows
+writing (O_RDWR or O_WRONLY is given) it will be
+truncated to length 0.
 
-@item half
-Use half bright mode.
+@item O_APPEND   
+The file is opened in append mode.
 
-@item half-standout
-Use half bright and standout mode.
+@item O_RDONLY   
+The file is opened for reading only.
 
-@item bold
-Use extra bright or bold mode.
+@item O_WRONLY   
+The file is opened for writing only.
 
-@item bold-standout
-Use extra bright or bold and standout mode.
+@item O_RDWR     
+The file is opened for reading and writing.
 
-@end table
+@noindent
+Each other bit is silently ignored.
 
 @end table
 
-@node Emacs
-@chapter Using @value{GDBN} under @sc{gnu} Emacs
-
-@cindex Emacs
-@cindex @sc{gnu} Emacs
-A special interface allows you to use @sc{gnu} Emacs to view (and
-edit) the source files for the program you are debugging with
-@value{GDBN}.
+@noindent
+@code{mode} is the bitwise or of the following values:
 
-To use this interface, use the command @kbd{M-x gdb} in Emacs.  Give the
-executable file you want to debug as an argument.  This command starts
-@value{GDBN} as a subprocess of Emacs, with input and output through a newly
-created Emacs buffer.
-@c (Do not use the @code{-tui} option to run @value{GDBN} from Emacs.)
+@table @code
+@item S_IRUSR    
+User has read permission.
 
-Using @value{GDBN} under Emacs is just like using @value{GDBN} normally except for two
-things:
+@item S_IWUSR    
+User has write permission.
 
-@itemize @bullet
-@item
-All ``terminal'' input and output goes through the Emacs buffer.
-@end itemize
+@item S_IRGRP    
+Group has read permission.
 
-This applies both to @value{GDBN} commands and their output, and to the input
-and output done by the program you are debugging.
+@item S_IWGRP    
+Group has write permission.
 
-This is useful because it means that you can copy the text of previous
-commands and input them again; you can even use parts of the output
-in this way.
+@item S_IROTH    
+Others have read permission.
 
-All the facilities of Emacs' Shell mode are available for interacting
-with your program.  In particular, you can send signals the usual
-way---for example, @kbd{C-c C-c} for an interrupt, @kbd{C-c C-z} for a
-stop.
+@item S_IWOTH    
+Others have write permission.
 
-@itemize @bullet
-@item
-@value{GDBN} displays source code through Emacs.
-@end itemize
+@noindent
+Each other bit is silently ignored.
 
-Each time @value{GDBN} displays a stack frame, Emacs automatically finds the
-source file for that frame and puts an arrow (@samp{=>}) at the
-left margin of the current line.  Emacs uses a separate buffer for
-source display, and splits the screen to show both your @value{GDBN} session
-and the source.
+@end table
 
-Explicit @value{GDBN} @code{list} or search commands still produce output as
-usual, but you probably have no reason to use them from Emacs.
+@smallexample
+@exdent Return value:
+open returns the new file descriptor or -1 if an error
+occured.
 
-@quotation
-@emph{Warning:} If the directory where your program resides is not your
-current directory, it can be easy to confuse Emacs about the location of
-the source files, in which case the auxiliary display buffer does not
-appear to show your source.  @value{GDBN} can find programs by searching your
-environment's @code{PATH} variable, so the @value{GDBN} input and output
-session proceeds normally; but Emacs does not get enough information
-back from @value{GDBN} to locate the source files in this situation.  To
-avoid this problem, either start @value{GDBN} mode from the directory where
-your program resides, or specify an absolute file name when prompted for the
-@kbd{M-x gdb} argument.
+@exdent Errors:
+@end smallexample
 
-A similar confusion can result if you use the @value{GDBN} @code{file} command to
-switch to debugging a program in some other location, from an existing
-@value{GDBN} buffer in Emacs.
-@end quotation
+@table @code
+@item EEXIST     
+pathname already exists and O_CREAT and O_EXCL were used.
 
-By default, @kbd{M-x gdb} calls the program called @file{gdb}.  If
-you need to call @value{GDBN} by a different name (for example, if you keep
-several configurations around, with different names) you can set the
-Emacs variable @code{gdb-command-name}; for example,
+@item EISDIR     
+pathname refers to a directory.
 
-@example
-(setq gdb-command-name "mygdb")
-@end example
+@item EACCES     
+The requested access is not allowed.
 
-@noindent
-(preceded by @kbd{M-:} or @kbd{ESC :}, or typed in the @code{*scratch*} buffer, or
-in your @file{.emacs} file) makes Emacs call the program named
-``@code{mygdb}'' instead.
+@item ENAMETOOLONG
+pathname was too long.
 
-In the @value{GDBN} I/O buffer, you can use these special Emacs commands in
-addition to the standard Shell mode commands:
+@item ENOENT     
+A directory component in pathname does not exist.
 
-@table @kbd
-@item C-h m
-Describe the features of Emacs' @value{GDBN} Mode.
+@item ENODEV     
+pathname refers to a device, pipe, named pipe or socket.
 
-@item M-s
-Execute to another source line, like the @value{GDBN} @code{step} command; also
-update the display window to show the current file and location.
+@item EROFS      
+pathname refers to a file on a read-only filesystem and
+write access was requested.
 
-@item M-n
-Execute to next source line in this function, skipping all function
-calls, like the @value{GDBN} @code{next} command.  Then update the display window
-to show the current file and location.
+@item EFAULT     
+pathname is an invalid pointer value.
 
-@item M-i
-Execute one instruction, like the @value{GDBN} @code{stepi} command; update
-display window accordingly.
+@item ENOSPC     
+No space on device to create the file.
 
-@item M-x gdb-nexti
-Execute to next instruction, using the @value{GDBN} @code{nexti} command; update
-display window accordingly.
+@item EMFILE     
+The process already has the maximum number of files open.
 
-@item C-c C-f
-Execute until exit from the selected stack frame, like the @value{GDBN}
-@code{finish} command.
+@item ENFILE     
+The limit on the total number of files open on the system
+has been reached.
 
-@item M-c
-Continue execution of your program, like the @value{GDBN} @code{continue}
-command.
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-p}.
+@node close
+@unnumberedsubsubsec close
+@cindex close, file-i/o system call
 
-@item M-u
-Go up the number of frames indicated by the numeric argument
-(@pxref{Arguments, , Numeric Arguments, Emacs, The @sc{gnu} Emacs Manual}),
-like the @value{GDBN} @code{up} command.
+@smallexample
+@exdent Synopsis:    
+int close(int fd);
 
-@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-u}.
+@exdent Request:     
+Fclose,fd
 
-@item M-d
-Go down the number of frames indicated by the numeric argument, like the
-@value{GDBN} @code{down} command.
+@exdent Return value:
+close returns zero on success, or -1 if an error occurred.
 
-@emph{Warning:} In Emacs v19, this command is @kbd{C-c C-d}.
+@exdent Errors:
+@end smallexample
 
-@item C-x &
-Read the number where the cursor is positioned, and insert it at the end
-of the @value{GDBN} I/O buffer.  For example, if you wish to disassemble code
-around an address that was displayed earlier, type @kbd{disassemble};
-then move the cursor to the address display, and pick up the
-argument for @code{disassemble} by typing @kbd{C-x &}.
+@table @code
+@item EBADF      
+fd isn't a valid open file descriptor.
 
-You can customize this further by defining elements of the list
-@code{gdb-print-command}; once it is defined, you can format or
-otherwise process numbers picked up by @kbd{C-x &} before they are
-inserted.  A numeric argument to @kbd{C-x &} indicates that you
-wish special formatting, and also acts as an index to pick an element of the
-list.  If the list element is a string, the number to be inserted is
-formatted using the Emacs function @code{format}; otherwise the number
-is passed as an argument to the corresponding list element.
+@item EINTR      
+The call was interrupted by the user.
 @end table
 
-In any source file, the Emacs command @kbd{C-x SPC} (@code{gdb-break})
-tells @value{GDBN} to set a breakpoint on the source line point is on.
+@node read
+@unnumberedsubsubsec read
+@cindex read, file-i/o system call
 
-If you accidentally delete the source-display buffer, an easy way to get
-it back is to type the command @code{f} in the @value{GDBN} buffer, to
-request a frame display; when you run under Emacs, this recreates
-the source buffer if necessary to show you the context of the current
-frame.
+@smallexample
+@exdent Synopsis:    
+int read(int fd, void *buf, unsigned int count);
 
-The source files displayed in Emacs are in ordinary Emacs buffers
-which are visiting the source files in the usual way.  You can edit
-the files with these buffers if you wish; but keep in mind that @value{GDBN}
-communicates with Emacs in terms of line numbers.  If you add or
-delete lines from the text, the line numbers that @value{GDBN} knows cease
-to correspond properly with the code.
+@exdent Request:     
+Fread,fd,bufptr,count
 
-@c The following dropped because Epoch is nonstandard.  Reactivate
-@c if/when v19 does something similar. ---doc@cygnus.com 19dec1990
-@ignore
-@kindex Emacs Epoch environment
-@kindex Epoch
-@kindex inspect
+@exdent Return value:
+On success, the number of bytes read is returned.
+Zero indicates end of file.  If count is zero, read
+returns zero as well.  On error, -1 is returned. 
 
-Version 18 of @sc{gnu} Emacs has a built-in window system
-called the @code{epoch}
-environment.  Users of this environment can use a new command,
-@code{inspect} which performs identically to @code{print} except that
-each value is printed in its own window.
-@end ignore
+@exdent Errors:
+@end smallexample
 
-@include annotate.texi
-@include gdbmi.texinfo
+@table @code
+@item EBADF      
+fd is not a valid file descriptor or is not open for
+reading.
 
-@node GDB Bugs
-@chapter Reporting Bugs in @value{GDBN}
-@cindex bugs in @value{GDBN}
-@cindex reporting bugs in @value{GDBN}
+@item EFAULT     
+buf is an invalid pointer value.
 
-Your bug reports play an essential role in making @value{GDBN} reliable.
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-Reporting a bug may help you by bringing a solution to your problem, or it
-may not.  But in any case the principal function of a bug report is to help
-the entire community by making the next version of @value{GDBN} work better.  Bug
-reports are your contribution to the maintenance of @value{GDBN}.
+@node write
+@unnumberedsubsubsec write
+@cindex write, file-i/o system call
 
-In order for a bug report to serve its purpose, you must include the
-information that enables us to fix the bug.
+@smallexample
+@exdent Synopsis:    
+int write(int fd, const void *buf, unsigned int count);
 
-@menu
-* Bug Criteria::                Have you found a bug?
-* Bug Reporting::               How to report bugs
-@end menu
+@exdent Request:     
+Fwrite,fd,bufptr,count
 
-@node Bug Criteria
-@section Have you found a bug?
-@cindex bug criteria
+@exdent Return value:
+On success, the number of bytes written are returned.
+Zero indicates nothing was written.  On error, -1
+is returned.
 
-If you are not sure whether you have found a bug, here are some guidelines:
+@exdent Errors:
+@end smallexample
 
-@itemize @bullet
-@cindex fatal signal
-@cindex debugger crash
-@cindex crash of debugger
-@item
-If the debugger gets a fatal signal, for any input whatever, that is a
-@value{GDBN} bug.  Reliable debuggers never crash.
+@table @code
+@item EBADF      
+fd is not a valid file descriptor or is not open for
+writing.
 
-@cindex error on valid input
-@item
-If @value{GDBN} produces an error message for valid input, that is a
-bug.  (Note that if you're cross debugging, the problem may also be
-somewhere in the connection to the target.)
+@item EFAULT     
+buf is an invalid pointer value.
 
-@cindex invalid input
-@item
-If @value{GDBN} does not produce an error message for invalid input,
-that is a bug.  However, you should note that your idea of
-``invalid input'' might be our idea of ``an extension'' or ``support
-for traditional practice''.
+@item EFBIG      
+An attempt was made to write a file that exceeds the
+host specific maximum file size allowed.
 
-@item
-If you are an experienced user of debugging tools, your suggestions
-for improvement of @value{GDBN} are welcome in any case.
-@end itemize
+@item ENOSPC     
+No space on device to write the data.
 
-@node Bug Reporting
-@section How to report bugs
-@cindex bug reports
-@cindex @value{GDBN} bugs, reporting
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-A number of companies and individuals offer support for @sc{gnu} products.
-If you obtained @value{GDBN} from a support organization, we recommend you
-contact that organization first.
+@node lseek
+@unnumberedsubsubsec lseek
+@cindex lseek, file-i/o system call
 
-You can find contact information for many support companies and
-individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
-distribution.
-@c should add a web page ref...
+@smallexample
+@exdent Synopsis:    
+long lseek (int fd, long offset, int flag);
+
+@exdent Request:     
+Flseek,fd,offset,flag
+@end smallexample
+
+@code{flag} is one of:
+
+@table @code
+@item SEEK_SET   
+The offset is set to offset bytes.
+
+@item SEEK_CUR   
+The offset is set to its current location plus offset
+bytes.
+
+@item SEEK_END   
+The offset is set to the size of the file plus offset
+bytes.
+@end table
+
+@smallexample
+@exdent Return value:
+On success, the resulting unsigned offset in bytes from
+the beginning of the file is returned.  Otherwise, a
+value of -1 is returned.
 
-In any event, we also recommend that you send bug reports for
-@value{GDBN} to this addresses:
+@exdent Errors:
+@end smallexample
 
-@example
-bug-gdb@@gnu.org
-@end example
+@table @code
+@item EBADF      
+fd is not a valid open file descriptor.
 
-@strong{Do not send bug reports to @samp{info-gdb}, or to
-@samp{help-gdb}, or to any newsgroups.}  Most users of @value{GDBN} do
-not want to receive bug reports.  Those that do have arranged to receive
-@samp{bug-gdb}.
+@item ESPIPE     
+fd is associated with the @value{GDBN} console.
 
-The mailing list @samp{bug-gdb} has a newsgroup @samp{gnu.gdb.bug} which
-serves as a repeater.  The mailing list and the newsgroup carry exactly
-the same messages.  Often people think of posting bug reports to the
-newsgroup instead of mailing them.  This appears to work, but it has one
-problem which can be crucial: a newsgroup posting often lacks a mail
-path back to the sender.  Thus, if we need to ask for more information,
-we may be unable to reach you.  For this reason, it is better to send
-bug reports to the mailing list.
+@item EINVAL     
+flag is not a proper value.
 
-As a last resort, send bug reports on paper to:
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-@example
-@sc{gnu} Debugger Bugs
-Free Software Foundation Inc.
-59 Temple Place - Suite 330
-Boston, MA 02111-1307
-USA
-@end example
+@node rename
+@unnumberedsubsubsec rename
+@cindex rename, file-i/o system call
 
-The fundamental principle of reporting bugs usefully is this:
-@strong{report all the facts}.  If you are not sure whether to state a
-fact or leave it out, state it!
+@smallexample
+@exdent Synopsis:    
+int rename(const char *oldpath, const char *newpath);
 
-Often people omit facts because they think they know what causes the
-problem and assume that some details do not matter.  Thus, you might
-assume that the name of the variable you use in an example does not matter.
-Well, probably it does not, but one cannot be sure.  Perhaps the bug is a
-stray memory reference which happens to fetch from the location where that
-name is stored in memory; perhaps, if the name were different, the contents
-of that location would fool the debugger into doing the right thing despite
-the bug.  Play it safe and give a specific, complete example.  That is the
-easiest thing for you to do, and the most helpful.
+@exdent Request:     
+Frename,oldpathptr/len,newpathptr/len
 
-Keep in mind that the purpose of a bug report is to enable us to fix the
-bug.  It may be that the bug has been reported previously, but neither
-you nor we can know that unless your bug report is complete and
-self-contained.
+@exdent Return value:
+On success, zero is returned.  On error, -1 is returned.
 
-Sometimes people give a few sketchy facts and ask, ``Does this ring a
-bell?''  Those bug reports are useless, and we urge everyone to
-@emph{refuse to respond to them} except to chide the sender to report
-bugs properly.
+@exdent Errors:
+@end smallexample
 
-To enable us to fix the bug, you should include all these things:
+@table @code
+@item EISDIR     
+newpath is an existing directory, but oldpath is not a
+directory.
 
-@itemize @bullet
-@item
-The version of @value{GDBN}.  @value{GDBN} announces it if you start
-with no arguments; you can also print it at any time using @code{show
-version}.
+@item EEXIST     
+newpath is a non-empty directory.
 
-Without this, we will not know whether there is any point in looking for
-the bug in the current version of @value{GDBN}.
+@item EBUSY      
+oldpath or newpath is a directory that is in use by some
+process.
 
-@item
-The type of machine you are using, and the operating system name and
-version number.
+@item EINVAL     
+An attempt was made to make a directory a subdirectory
+of itself.
 
-@item
-What compiler (and its version) was used to compile @value{GDBN}---e.g.
-``@value{GCC}--2.8.1''.
+@item ENOTDIR    
+A  component used as a directory in oldpath or new
+path is not a directory.  Or oldpath is a directory
+and newpath exists but is not a directory.
 
-@item
-What compiler (and its version) was used to compile the program you are
-debugging---e.g.  ``@value{GCC}--2.8.1'', or ``HP92453-01 A.10.32.03 HP
-C Compiler''.  For GCC, you can say @code{gcc --version} to get this
-information; for other compilers, see the documentation for those
-compilers.
+@item EFAULT     
+oldpathptr or newpathptr are invalid pointer values.
 
-@item
-The command arguments you gave the compiler to compile your example and
-observe the bug.  For example, did you use @samp{-O}?  To guarantee
-you will not omit something important, list them all.  A copy of the
-Makefile (or the output from make) is sufficient.
+@item EACCES     
+No access to the file or the path of the file.
 
-If we were to try to guess the arguments, we would probably guess wrong
-and then we might not encounter the bug.
+@item ENAMETOOLONG
+             
+oldpath or newpath was too long.
 
-@item
-A complete input script, and all necessary source files, that will
-reproduce the bug.
+@item ENOENT     
+A directory component in oldpath or newpath does not exist.
 
-@item
-A description of what behavior you observe that you believe is
-incorrect.  For example, ``It gets a fatal signal.''
+@item EROFS      
+The file is on a read-only filesystem.
 
-Of course, if the bug is that @value{GDBN} gets a fatal signal, then we
-will certainly notice it.  But if the bug is incorrect output, we might
-not notice unless it is glaringly wrong.  You might as well not give us
-a chance to make a mistake.
+@item ENOSPC     
+The device containing the file has no room for the new
+directory entry.
 
-Even if the problem you experience is a fatal signal, you should still
-say so explicitly.  Suppose something strange is going on, such as, your
-copy of @value{GDBN} is out of synch, or you have encountered a bug in
-the C library on your system.  (This has happened!)  Your copy might
-crash and ours would not.  If you told us to expect a crash, then when
-ours fails to crash, we would know that the bug was not happening for
-us.  If you had not told us to expect a crash, then we would not be able
-to draw any conclusion from our observations.
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-@item
-If you wish to suggest changes to the @value{GDBN} source, send us context
-diffs.  If you even discuss something in the @value{GDBN} source, refer to
-it by context, not by line number.
+@node unlink
+@unnumberedsubsubsec unlink
+@cindex unlink, file-i/o system call
 
-The line numbers in our development sources will not match those in your
-sources.  Your line numbers would convey no useful information to us.
+@smallexample
+@exdent Synopsis:    
+int unlink(const char *pathname);
 
-@end itemize
+@exdent Request:     
+Funlink,pathnameptr/len
 
-Here are some things that are not necessary:
+@exdent Return value:
+On success, zero is returned.  On error, -1 is returned.
 
-@itemize @bullet
-@item
-A description of the envelope of the bug.
+@exdent Errors:
+@end smallexample
 
-Often people who encounter a bug spend a lot of time investigating
-which changes to the input file will make the bug go away and which
-changes will not affect it.
+@table @code
+@item EACCES     
+No access to the file or the path of the file.
 
-This is often time consuming and not very useful, because the way we
-will find the bug is by running a single example under the debugger
-with breakpoints, not by pure deduction from a series of examples.
-We recommend that you save your time for something else.
+@item EPERM      
+The system does not allow unlinking of directories.
 
-Of course, if you can find a simpler example to report @emph{instead}
-of the original one, that is a convenience for us.  Errors in the
-output will be easier to spot, running under the debugger will take
-less time, and so on.
+@item EBUSY      
+The file pathname cannot be unlinked because it's
+being used by another process.
 
-However, simplification is not vital; if you do not want to do this,
-report the bug anyway and send us the entire test case you used.
+@item EFAULT     
+pathnameptr is an invalid pointer value.
 
-@item
-A patch for the bug.
+@item ENAMETOOLONG
+pathname was too long.
 
-A patch for the bug does help us if it is a good one.  But do not omit
-the necessary information, such as the test case, on the assumption that
-a patch is all we need.  We might see problems with your patch and decide
-to fix the problem another way, or we might not understand it at all.
+@item ENOENT     
+A directory component in pathname does not exist.
 
-Sometimes with a program as complicated as @value{GDBN} it is very hard to
-construct an example that will make the program follow a certain path
-through the code.  If you do not send us the example, we will not be able
-to construct one, so we will not be able to verify that the bug is fixed.
+@item ENOTDIR    
+A component of the path is not a directory.
 
-And if we cannot understand what bug you are trying to fix, or why your
-patch should be an improvement, we will not install it.  A test case will
-help us to understand.
+@item EROFS      
+The file is on a read-only filesystem.
 
-@item
-A guess about what the bug is or what it depends on.
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-Such guesses are usually wrong.  Even we cannot guess right about such
-things without first using the debugger to find the facts.
-@end itemize
+@node stat/fstat
+@unnumberedsubsubsec stat/fstat
+@cindex fstat, file-i/o system call
+@cindex stat, file-i/o system call
 
-@c The readline documentation is distributed with the readline code
-@c and consists of the two following files:
-@c     rluser.texinfo
-@c     inc-hist.texinfo
-@c Use -I with makeinfo to point to the appropriate directory,
-@c environment var TEXINPUTS with TeX.
-@include rluser.texinfo
-@include inc-hist.texinfo
+@smallexample
+@exdent Synopsis:    
+int stat(const char *pathname, struct stat *buf);
+int fstat(int fd, struct stat *buf);
 
+@exdent Request:     
+Fstat,pathnameptr/len,bufptr
+Ffstat,fd,bufptr
 
-@node Formatting Documentation
-@appendix Formatting Documentation
+@exdent Return value:
+On success, zero is returned.  On error, -1 is returned.
 
-@cindex @value{GDBN} reference card
-@cindex reference card
-The @value{GDBN} 4 release includes an already-formatted reference card, ready
-for printing with PostScript or Ghostscript, in the @file{gdb}
-subdirectory of the main source directory@footnote{In
-@file{gdb-@value{GDBVN}/gdb/refcard.ps} of the version @value{GDBVN}
-release.}.  If you can use PostScript or Ghostscript with your printer,
-you can print the reference card immediately with @file{refcard.ps}.
+@exdent Errors:
+@end smallexample
 
-The release also includes the source for the reference card.  You
-can format it, using @TeX{}, by typing:
+@table @code
+@item EBADF      
+fd is not a valid open file.
 
-@example
-make refcard.dvi
-@end example
+@item ENOENT     
+A directory component in pathname does not exist or the
+path is an empty string.
 
-The @value{GDBN} reference card is designed to print in @dfn{landscape}
-mode on US ``letter'' size paper;
-that is, on a sheet 11 inches wide by 8.5 inches
-high.  You will need to specify this form of printing as an option to
-your @sc{dvi} output program.
+@item ENOTDIR    
+A component of the path is not a directory.
 
-@cindex documentation
+@item EFAULT     
+pathnameptr is an invalid pointer value.
 
-All the documentation for @value{GDBN} comes as part of the machine-readable
-distribution.  The documentation is written in Texinfo format, which is
-a documentation system that uses a single source file to produce both
-on-line information and a printed manual.  You can use one of the Info
-formatting commands to create the on-line version of the documentation
-and @TeX{} (or @code{texi2roff}) to typeset the printed version.
+@item EACCES     
+No access to the file or the path of the file.
 
-@value{GDBN} includes an already formatted copy of the on-line Info
-version of this manual in the @file{gdb} subdirectory.  The main Info
-file is @file{gdb-@value{GDBVN}/gdb/gdb.info}, and it refers to
-subordinate files matching @samp{gdb.info*} in the same directory.  If
-necessary, you can print out these files, or read them with any editor;
-but they are easier to read using the @code{info} subsystem in @sc{gnu}
-Emacs or the standalone @code{info} program, available as part of the
-@sc{gnu} Texinfo distribution.
+@item ENAMETOOLONG
+pathname was too long.
 
-If you want to format these Info files yourself, you need one of the
-Info formatting programs, such as @code{texinfo-format-buffer} or
-@code{makeinfo}.
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-If you have @code{makeinfo} installed, and are in the top level
-@value{GDBN} source directory (@file{gdb-@value{GDBVN}}, in the case of
-version @value{GDBVN}), you can make the Info file by typing:
+@node gettimeofday
+@unnumberedsubsubsec gettimeofday
+@cindex gettimeofday, file-i/o system call
 
-@example
-cd gdb
-make gdb.info
-@end example
+@smallexample
+@exdent Synopsis:    
+int gettimeofday(struct timeval *tv, void *tz);
 
-If you want to typeset and print copies of this manual, you need @TeX{},
-a program to print its @sc{dvi} output files, and @file{texinfo.tex}, the
-Texinfo definitions file.
+@exdent Request:     
+Fgettimeofday,tvptr,tzptr
 
-@TeX{} is a typesetting program; it does not print files directly, but
-produces output files called @sc{dvi} files.  To print a typeset
-document, you need a program to print @sc{dvi} files.  If your system
-has @TeX{} installed, chances are it has such a program.  The precise
-command to use depends on your system; @kbd{lpr -d} is common; another
-(for PostScript devices) is @kbd{dvips}.  The @sc{dvi} print command may
-require a file name without any extension or a @samp{.dvi} extension.
+@exdent Return value:
+On success, 0 is returned, -1 otherwise.
 
-@TeX{} also requires a macro definitions file called
-@file{texinfo.tex}.  This file tells @TeX{} how to typeset a document
-written in Texinfo format.  On its own, @TeX{} cannot either read or
-typeset a Texinfo file.  @file{texinfo.tex} is distributed with GDB
-and is located in the @file{gdb-@var{version-number}/texinfo}
-directory.
+@exdent Errors:
+@end smallexample
 
-If you have @TeX{} and a @sc{dvi} printer program installed, you can
-typeset and print this manual.  First switch to the the @file{gdb}
-subdirectory of the main source directory (for example, to
-@file{gdb-@value{GDBVN}/gdb}) and type:
+@table @code
+@item EINVAL     
+tz is a non-NULL pointer.
 
-@example
-make gdb.dvi
-@end example
+@item EFAULT     
+tvptr and/or tzptr is an invalid pointer value.
+@end table
 
-Then give @file{gdb.dvi} to your @sc{dvi} printing program.
+@node isatty
+@unnumberedsubsubsec isatty
+@cindex isatty, file-i/o system call
 
-@node Installing GDB
-@appendix Installing @value{GDBN}
-@cindex configuring @value{GDBN}
-@cindex installation
+@smallexample
+@exdent Synopsis:    
+int isatty(int fd);
 
-@value{GDBN} comes with a @code{configure} script that automates the process
-of preparing @value{GDBN} for installation; you can then use @code{make} to
-build the @code{gdb} program.
-@iftex
-@c irrelevant in info file; it's as current as the code it lives with.
-@footnote{If you have a more recent version of @value{GDBN} than @value{GDBVN},
-look at the @file{README} file in the sources; we may have improved the
-installation procedures since publishing this manual.}
-@end iftex
+@exdent Request:     
+Fisatty,fd
 
-The @value{GDBN} distribution includes all the source code you need for
-@value{GDBN} in a single directory, whose name is usually composed by
-appending the version number to @samp{gdb}.
+@exdent Return value:
+Returns 1 if fd refers to the @value{GDBN} console, 0 otherwise.
 
-For example, the @value{GDBN} version @value{GDBVN} distribution is in the
-@file{gdb-@value{GDBVN}} directory.  That directory contains:
+@exdent Errors:
+@end smallexample
 
 @table @code
-@item gdb-@value{GDBVN}/configure @r{(and supporting files)}
-script for configuring @value{GDBN} and all its supporting libraries
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-@item gdb-@value{GDBVN}/gdb
-the source specific to @value{GDBN} itself
+@node system
+@unnumberedsubsubsec system
+@cindex system, file-i/o system call
 
-@item gdb-@value{GDBVN}/bfd
-source for the Binary File Descriptor library
+@smallexample
+@exdent Synopsis:    
+int system(const char *command);
 
-@item gdb-@value{GDBVN}/include
-@sc{gnu} include files
+@exdent Request:     
+Fsystem,commandptr/len
 
-@item gdb-@value{GDBVN}/libiberty
-source for the @samp{-liberty} free software library
+@exdent Return value:
+The value returned is -1 on error and the return status
+of the command otherwise.  Only the exit status of the
+command is returned, which is extracted from the hosts
+system return value by calling WEXITSTATUS(retval).
+In case /bin/sh could not be executed, 127 is returned.
 
-@item gdb-@value{GDBVN}/opcodes
-source for the library of opcode tables and disassemblers
+@exdent Errors:
+@end smallexample
 
-@item gdb-@value{GDBVN}/readline
-source for the @sc{gnu} command-line interface
+@table @code
+@item EINTR      
+The call was interrupted by the user.
+@end table
 
-@item gdb-@value{GDBVN}/glob
-source for the @sc{gnu} filename pattern-matching subroutine
+@node Protocol specific representation of datatypes
+@subsection Protocol specific representation of datatypes
+@cindex protocol specific representation of datatypes, in file-i/o protocol
 
-@item gdb-@value{GDBVN}/mmalloc
-source for the @sc{gnu} memory-mapped malloc package
-@end table
+@menu
+* Integral datatypes::
+* Pointer values::
+* struct stat::
+* struct timeval::
+@end menu
 
-The simplest way to configure and build @value{GDBN} is to run @code{configure}
-from the @file{gdb-@var{version-number}} source directory, which in
-this example is the @file{gdb-@value{GDBVN}} directory.
+@node Integral datatypes
+@unnumberedsubsubsec Integral datatypes
+@cindex integral datatypes, in file-i/o protocol
 
-First switch to the @file{gdb-@var{version-number}} source directory
-if you are not already in it; then run @code{configure}.  Pass the
-identifier for the platform on which @value{GDBN} will run as an
-argument.
+The integral datatypes used in the system calls are
 
-For example:
+@smallexample
+int@r{,} unsigned int@r{,} long@r{,} unsigned long@r{,} mode_t @r{and} time_t
+@end smallexample
 
-@example
-cd gdb-@value{GDBVN}
-./configure @var{host}
-make
-@end example
+@code{Int}, @code{unsigned int}, @code{mode_t} and @code{time_t} are
+implemented as 32 bit values in this protocol.
 
-@noindent
-where @var{host} is an identifier such as @samp{sun4} or
-@samp{decstation}, that identifies the platform where @value{GDBN} will run.
-(You can often leave off @var{host}; @code{configure} tries to guess the
-correct value by examining your system.)
+@code{Long} and @code{unsigned long} are implemented as 64 bit types. 
+    
+@xref{Limits}, for corresponding MIN and MAX values (similar to those
+in @file{limits.h}) to allow range checking on host and target.
 
-Running @samp{configure @var{host}} and then running @code{make} builds the
-@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
-libraries, then @code{gdb} itself.  The configured source files, and the
-binaries, are left in the corresponding source directories.
+@code{time_t} datatypes are defined as seconds since the Epoch.
 
-@need 750
-@code{configure} is a Bourne-shell (@code{/bin/sh}) script; if your
-system does not recognize this automatically when you run a different
-shell, you may need to run @code{sh} on it explicitly:
+All integral datatypes transferred as part of a memory read or write of a
+structured datatype e.g.@: a @code{struct stat} have to be given in big endian
+byte order.
 
-@example
-sh configure @var{host}
-@end example
+@node Pointer values
+@unnumberedsubsubsec Pointer values
+@cindex pointer values, in file-i/o protocol
 
-If you run @code{configure} from a directory that contains source
-directories for multiple libraries or programs, such as the
-@file{gdb-@value{GDBVN}} source directory for version @value{GDBVN}, @code{configure}
-creates configuration files for every directory level underneath (unless
-you tell it not to, with the @samp{--norecursion} option).
+Pointers to target data are transmitted as they are.  An exception
+is made for pointers to buffers for which the length isn't
+transmitted as part of the function call, namely strings.  Strings
+are transmitted as a pointer/length pair, both as hex values, e.g.@:
 
-You can run the @code{configure} script from any of the
-subordinate directories in the @value{GDBN} distribution if you only want to
-configure that subdirectory, but be sure to specify a path to it.
+@smallexample
+@code{1aaf/12}
+@end smallexample
 
-For example, with version @value{GDBVN}, type the following to configure only
-the @code{bfd} subdirectory:
+@noindent
+which is a pointer to data of length 18 bytes at position 0x1aaf.
+The length is defined as the full string length in bytes, including
+the trailing null byte.  Example:
 
-@example
-@group
-cd gdb-@value{GDBVN}/bfd
-../configure @var{host}
-@end group
-@end example
+@smallexample
+``hello, world'' at address 0x123456
+@end smallexample
 
-You can install @code{@value{GDBP}} anywhere; it has no hardwired paths.
-However, you should make sure that the shell on your path (named by
-the @samp{SHELL} environment variable) is publicly readable.  Remember
-that @value{GDBN} uses the shell to start your program---some systems refuse to
-let @value{GDBN} debug child processes whose programs are not readable.
+@noindent
+is transmitted as
 
-@menu
-* Separate Objdir::             Compiling @value{GDBN} in another directory
-* Config Names::                Specifying names for hosts and targets
-* Configure Options::           Summary of options for configure
-@end menu
+@smallexample
+@code{123456/d}
+@end smallexample
 
-@node Separate Objdir
-@section Compiling @value{GDBN} in another directory
+@node struct stat
+@unnumberedsubsubsec struct stat
+@cindex struct stat, in file-i/o protocol
 
-If you want to run @value{GDBN} versions for several host or target machines,
-you need a different @code{gdb} compiled for each combination of
-host and target.  @code{configure} is designed to make this easy by
-allowing you to generate each configuration in a separate subdirectory,
-rather than in the source directory.  If your @code{make} program
-handles the @samp{VPATH} feature (@sc{gnu} @code{make} does), running
-@code{make} in each of these directories builds the @code{gdb}
-program specified there.
+The buffer of type struct stat used by the target and @value{GDBN} is defined
+as follows:
 
-To build @code{gdb} in a separate directory, run @code{configure}
-with the @samp{--srcdir} option to specify where to find the source.
-(You also need to specify a path to find @code{configure}
-itself from your working directory.  If the path to @code{configure}
-would be the same as the argument to @samp{--srcdir}, you can leave out
-the @samp{--srcdir} option; it is assumed.)
+@smallexample
+struct stat @{
+    unsigned int  st_dev;      /* device */
+    unsigned int  st_ino;      /* inode */
+    mode_t        st_mode;     /* protection */
+    unsigned int  st_nlink;    /* number of hard links */
+    unsigned int  st_uid;      /* user ID of owner */
+    unsigned int  st_gid;      /* group ID of owner */
+    unsigned int  st_rdev;     /* device type (if inode device) */
+    unsigned long st_size;     /* total size, in bytes */
+    unsigned long st_blksize;  /* blocksize for filesystem I/O */
+    unsigned long st_blocks;   /* number of blocks allocated */
+    time_t        st_atime;    /* time of last access */
+    time_t        st_mtime;    /* time of last modification */
+    time_t        st_ctime;    /* time of last change */
+@};
+@end smallexample
 
-For example, with version @value{GDBVN}, you can build @value{GDBN} in a
-separate directory for a Sun 4 like this:
+The integral datatypes are conforming to the definitions given in the
+approriate section (see @ref{Integral datatypes}, for details) so this
+structure is of size 64 bytes.
 
-@example
-@group
-cd gdb-@value{GDBVN}
-mkdir ../gdb-sun4
-cd ../gdb-sun4
-../gdb-@value{GDBVN}/configure sun4
-make
-@end group
-@end example
+The values of several fields have a restricted meaning and/or
+range of values.
 
-When @code{configure} builds a configuration using a remote source
-directory, it creates a tree for the binaries with the same structure
-(and using the same names) as the tree under the source directory.  In
-the example, you'd find the Sun 4 library @file{libiberty.a} in the
-directory @file{gdb-sun4/libiberty}, and @value{GDBN} itself in
-@file{gdb-sun4/gdb}.
+@smallexample
+st_dev:     0       file
+            1       console
 
-One popular reason to build several @value{GDBN} configurations in separate
-directories is to configure @value{GDBN} for cross-compiling (where
-@value{GDBN} runs on one machine---the @dfn{host}---while debugging
-programs that run on another machine---the @dfn{target}).
-You specify a cross-debugging target by
-giving the @samp{--target=@var{target}} option to @code{configure}.
+st_ino:     No valid meaning for the target.  Transmitted unchanged.
 
-When you run @code{make} to build a program or library, you must run
-it in a configured directory---whatever directory you were in when you
-called @code{configure} (or one of its subdirectories).
+st_mode:    Valid mode bits are described in Appendix C.  Any other
+            bits have currently no meaning for the target.
 
-The @code{Makefile} that @code{configure} generates in each source
-directory also runs recursively.  If you type @code{make} in a source
-directory such as @file{gdb-@value{GDBVN}} (or in a separate configured
-directory configured with @samp{--srcdir=@var{dirname}/gdb-@value{GDBVN}}), you
-will build all the required libraries, and then build GDB.
+st_uid:     No valid meaning for the target.  Transmitted unchanged.
 
-When you have multiple hosts or targets configured in separate
-directories, you can run @code{make} on them in parallel (for example,
-if they are NFS-mounted on each of the hosts); they will not interfere
-with each other.
+st_gid:     No valid meaning for the target.  Transmitted unchanged.
 
-@node Config Names
-@section Specifying names for hosts and targets
+st_rdev:    No valid meaning for the target.  Transmitted unchanged.
 
-The specifications used for hosts and targets in the @code{configure}
-script are based on a three-part naming scheme, but some short predefined
-aliases are also supported.  The full naming scheme encodes three pieces
-of information in the following pattern:
+st_atime, st_mtime, st_ctime:
+            These values have a host and file system dependent
+            accuracy.  Especially on Windows hosts the file systems
+            don't support exact timing values.
+@end smallexample
 
-@example
-@var{architecture}-@var{vendor}-@var{os}
-@end example
+The target gets a struct stat of the above representation and is
+responsible to coerce it to the target representation before
+continuing.
 
-For example, you can use the alias @code{sun4} as a @var{host} argument,
-or as the value for @var{target} in a @code{--target=@var{target}}
-option.  The equivalent full name is @samp{sparc-sun-sunos4}.
+Note that due to size differences between the host and target
+representation of stat members, these members could eventually
+get truncated on the target.
 
-The @code{configure} script accompanying @value{GDBN} does not provide
-any query facility to list all supported host and target names or
-aliases.  @code{configure} calls the Bourne shell script
-@code{config.sub} to map abbreviations to full names; you can read the
-script, if you wish, or you can use it to test your guesses on
-abbreviations---for example:
+@node struct timeval
+@unnumberedsubsubsec struct timeval
+@cindex struct timeval, in file-i/o protocol
+
+The buffer of type struct timeval used by the target and @value{GDBN}
+is defined as follows:
 
 @smallexample
-% sh config.sub i386-linux
-i386-pc-linux-gnu
-% sh config.sub alpha-linux
-alpha-unknown-linux-gnu
-% sh config.sub hp9k700
-hppa1.1-hp-hpux
-% sh config.sub sun4
-sparc-sun-sunos4.1.1
-% sh config.sub sun3
-m68k-sun-sunos4.1.1
-% sh config.sub i986v
-Invalid configuration `i986v': machine `i986v' not recognized
+struct timeval @{ 
+    time_t tv_sec;  /* second */
+    long   tv_usec; /* microsecond */
+@};
 @end smallexample
 
-@noindent
-@code{config.sub} is also distributed in the @value{GDBN} source
-directory (@file{gdb-@value{GDBVN}}, for version @value{GDBVN}).
+The integral datatypes are conforming to the definitions given in the
+approriate section (see @ref{Integral datatypes}, for details) so this
+structure is of size 8 bytes.
 
-@node Configure Options
-@section @code{configure} options
+@node Constants
+@subsection Constants
+@cindex constants, in file-i/o protocol
 
-Here is a summary of the @code{configure} options and arguments that
-are most often useful for building @value{GDBN}.  @code{configure} also has
-several other options not listed here.  @inforef{What Configure
-Does,,configure.info}, for a full explanation of @code{configure}.
+The following values are used for the constants inside of the
+protocol.  @value{GDBN} and target are resposible to translate these
+values before and after the call as needed.
 
-@example
-configure @r{[}--help@r{]}
-          @r{[}--prefix=@var{dir}@r{]}
-          @r{[}--exec-prefix=@var{dir}@r{]}
-          @r{[}--srcdir=@var{dirname}@r{]}
-          @r{[}--norecursion@r{]} @r{[}--rm@r{]}
-          @r{[}--target=@var{target}@r{]}
-          @var{host}
-@end example
+@menu
+* Open flags::
+* mode_t values::
+* Errno values::
+* Lseek flags::
+* Limits::
+@end menu
 
-@noindent
-You may introduce options with a single @samp{-} rather than
-@samp{--} if you prefer; but you may abbreviate option names if you use
-@samp{--}.
+@node Open flags
+@unnumberedsubsubsec Open flags
+@cindex open flags, in file-i/o protocol
 
-@table @code
-@item --help
-Display a quick summary of how to invoke @code{configure}.
+All values are given in hexadecimal representation.
 
-@item --prefix=@var{dir}
-Configure the source to install programs and files under directory
-@file{@var{dir}}.
+@smallexample
+  O_RDONLY        0x0
+  O_WRONLY        0x1
+  O_RDWR          0x2
+  O_APPEND        0x8
+  O_CREAT       0x200
+  O_TRUNC       0x400
+  O_EXCL        0x800
+@end smallexample
 
-@item --exec-prefix=@var{dir}
-Configure the source to install programs under directory
-@file{@var{dir}}.
+@node mode_t values
+@unnumberedsubsubsec mode_t values
+@cindex mode_t values, in file-i/o protocol
 
-@c avoid splitting the warning from the explanation:
-@need 2000
-@item --srcdir=@var{dirname}
-@strong{Warning: using this option requires @sc{gnu} @code{make}, or another
-@code{make} that implements the @code{VPATH} feature.}@*
-Use this option to make configurations in directories separate from the
-@value{GDBN} source directories.  Among other things, you can use this to
-build (or maintain) several configurations simultaneously, in separate
-directories.  @code{configure} writes configuration specific files in
-the current directory, but arranges for them to use the source in the
-directory @var{dirname}.  @code{configure} creates directories under
-the working directory in parallel to the source directories below
-@var{dirname}.
+All values are given in octal representation.
 
-@item --norecursion
-Configure only the directory level where @code{configure} is executed; do not
-propagate configuration to subdirectories.
+@smallexample
+  S_IFREG       0100000
+  S_IFDIR        040000
+  S_IRUSR          0400
+  S_IWUSR          0200
+  S_IXUSR          0100
+  S_IRGRP           040
+  S_IWGRP           020
+  S_IXGRP           010
+  S_IROTH            04
+  S_IWOTH            02
+  S_IXOTH            01
+@end smallexample
 
-@item --target=@var{target}
-Configure @value{GDBN} for cross-debugging programs running on the specified
-@var{target}.  Without this option, @value{GDBN} is configured to debug
-programs that run on the same machine (@var{host}) as @value{GDBN} itself.
+@node Errno values
+@unnumberedsubsubsec Errno values
+@cindex errno values, in file-i/o protocol
 
-There is no convenient way to generate a list of all available targets.
+All values are given in decimal representation.
 
-@item @var{host} @dots{}
-Configure @value{GDBN} to run on the specified @var{host}.
+@smallexample
+  EPERM           1
+  ENOENT          2
+  EINTR           4
+  EBADF           9
+  EACCES         13
+  EFAULT         14
+  EBUSY          16
+  EEXIST         17
+  ENODEV         19
+  ENOTDIR        20
+  EISDIR         21
+  EINVAL         22
+  ENFILE         23
+  EMFILE         24
+  EFBIG          27
+  ENOSPC         28
+  ESPIPE         29
+  EROFS          30
+  ENAMETOOLONG   91
+  EUNKNOWN       9999
+@end smallexample
 
-There is no convenient way to generate a list of all available hosts.
-@end table
+  EUNKNOWN is used as a fallback error value if a host system returns
+  any error value not in the list of supported error numbers.
 
-There are many other options available as well, but they are generally
-needed for special purposes only.
+@node Lseek flags
+@unnumberedsubsubsec Lseek flags
+@cindex lseek flags, in file-i/o protocol
 
-@node Maintenance Commands
-@appendix Maintenance Commands
-@cindex maintenance commands
-@cindex internal commands
+@smallexample
+  SEEK_SET      0
+  SEEK_CUR      1
+  SEEK_END      2
+@end smallexample
 
-In addition to commands intended for @value{GDBN} users, @value{GDBN}
-includes a number of commands intended for @value{GDBN} developers.
-These commands are provided here for reference.
+@node Limits
+@unnumberedsubsubsec Limits
+@cindex limits, in file-i/o protocol
 
-@table @code
-@kindex maint info breakpoints
-@item @anchor{maint info breakpoints}maint info breakpoints
-Using the same format as @samp{info breakpoints}, display both the
-breakpoints you've set explicitly, and those @value{GDBN} is using for
-internal purposes.  Internal breakpoints are shown with negative
-breakpoint numbers.  The type column identifies what kind of breakpoint
-is shown:
+All values are given in decimal representation.
 
-@table @code
-@item breakpoint
-Normal, explicitly set breakpoint.
+@smallexample
+  INT_MIN       -2147483648
+  INT_MAX        2147483647
+  UINT_MAX       4294967295
+  LONG_MIN      -9223372036854775808
+  LONG_MAX       9223372036854775807
+  ULONG_MAX      18446744073709551615
+@end smallexample
 
-@item watchpoint
-Normal, explicitly set watchpoint.
+@node File-I/O Examples
+@subsection File-I/O Examples
+@cindex file-i/o examples
 
-@item longjmp
-Internal breakpoint, used to handle correctly stepping through
-@code{longjmp} calls.
+Example sequence of a write call, file descriptor 3, buffer is at target
+address 0x1234, 6 bytes should be written:
 
-@item longjmp resume
-Internal breakpoint at the target of a @code{longjmp}.
+@smallexample
+<- @code{Fwrite,3,1234,6}
+@emph{request memory read from target}
+-> @code{m1234,6}
+<- XXXXXX
+@emph{return "6 bytes written"}
+-> @code{F6}
+@end smallexample
 
-@item until
-Temporary internal breakpoint used by the @value{GDBN} @code{until} command.
+Example sequence of a read call, file descriptor 3, buffer is at target
+address 0x1234, 6 bytes should be read:
 
-@item finish
-Temporary internal breakpoint used by the @value{GDBN} @code{finish} command.
+@smallexample
+<- @code{Fread,3,1234,6}
+@emph{request memory write to target}
+-> @code{X1234,6:XXXXXX}
+@emph{return "6 bytes read"}
+-> @code{F6}
+@end smallexample
 
-@item shlib events
-Shared library events.
+Example sequence of a read call, call fails on the host due to invalid
+file descriptor (EBADF):
 
-@end table
+@smallexample
+<- @code{Fread,3,1234,6}
+-> @code{F-1,9}
+@end smallexample
 
-@end table
+Example sequence of a read call, user presses Ctrl-C before syscall on
+host is called:
+
+@smallexample
+<- @code{Fread,3,1234,6}
+-> @code{F-1,4,C}
+<- @code{T02}
+@end smallexample
+
+Example sequence of a read call, user presses Ctrl-C after syscall on
+host is called:
+
+@smallexample
+<- @code{Fread,3,1234,6}
+-> @code{X1234,6:XXXXXX}
+<- @code{T02}
+@end smallexample
+
+@include gpl.texi
 
 @include fdl.texi
 
@@ -14894,12 +21620,4 @@ Shared library events.
 % Blame: doc@cygnus.com, 1991.
 @end tex
 
-@c TeX can handle the contents at the start but makeinfo 3.12 can not
-@ifinfo
-@contents
-@end ifinfo
-@ifhtml
-@contents
-@end ifhtml
-
 @bye
This page took 0.203079 seconds and 4 git commands to generate.