* gdb.texinfo (General Query Packets): Fix texinfo compile warning and error.
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index ae10478b48cb192bd2de2871f49c128f0dbc5045..b69fccab23db1c857f33a90bf926b1957f57a716 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, 2003
+@c 1999, 2000, 2001, 2002, 2003, 2004
 @c Free Software Foundation, Inc.
 @c
 @c %**start of header
@@ -38,9 +38,9 @@
 
 @c This is a dir.info fragment to support semi-automated addition of
 @c manuals to an info tree.
-@dircategory Programming & development tools.
+@dircategory Software development
 @direntry
-* Gdb: (gdb).                     The @sc{gnu} debugger.
+* Gdb: (gdb).                     The GNU debugger.
 @end direntry
 
 @ifinfo
@@ -52,7 +52,7 @@ This is the @value{EDITION} Edition, of @cite{Debugging with
 Version @value{GDBVN}.
 
 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,@*
-              1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+              1999, 2000, 2001, 2002, 2003, 2004 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
@@ -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, 2003 Free Software Foundation, Inc.
+1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 @sp 2
 Published by the Free Software Foundation @*
 59 Temple Place - Suite 330, @*
@@ -115,7 +115,7 @@ This file describes @value{GDBN}, the @sc{gnu} symbolic debugger.
 This is the @value{EDITION} Edition, for @value{GDBN} Version
 @value{GDBVN}.
 
-Copyright (C) 1988-2003 Free Software Foundation, Inc.
+Copyright (C) 1988-2004 Free Software Foundation, Inc.
 
 @menu
 * Summary::                     Summary of @value{GDBN}
@@ -192,7 +192,7 @@ Change things in your program, so you can experiment with correcting the
 effects of one bug and go on to learn about another.
 @end itemize
 
-You can use @value{GDBN} to debug programs written in C and C++.
+You can use @value{GDBN} to debug programs written in C and C@t{++}.
 For more information, see @ref{Support,,Supported languages}.
 For more information, see @ref{C,,C and C++}.
 
@@ -347,7 +347,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 6.0, 5.3, 5.2, 5.1 and 5.0);
+Andrew Cagney (releases 6.1, 6.0, 5.3, 5.2, 5.1 and 5.0);
 Jim Blandy (release 4.18);
 Jason Molenda (release 4.17);
 Stan Shebs (release 4.14);
@@ -418,12 +418,13 @@ Fred Fish wrote most of the support for Unix System Vr4.
 He also enhanced the command-completion support to cover C@t{++} overloaded
 symbols.
 
-Hitachi America, Ltd. sponsored the support for H8/300, H8/500, and
-Super-H processors.
+Hitachi America (now Renesas America), Ltd. sponsored the support for
+H8/300, H8/500, and Super-H processors.
 
 NEC sponsored the support for the v850, Vr4xxx, and Vr5xxx processors.
 
-Mitsubishi sponsored the support for D10V, D30V, and M32R/D processors.
+Mitsubishi (now Renesas) sponsored the support for D10V, D30V, and M32R/D
+processors.
 
 Toshiba sponsored the support for the TX39 Mips processor.
 
@@ -444,10 +445,10 @@ nearly innumerable bug fixes and cleanups throughout @value{GDBN}.
 The following people at the Hewlett-Packard Company contributed
 support for the PA-RISC 2.0 architecture, HP-UX 10.20, 10.30, and 11.0
 (narrow mode), HP's implementation of kernel threads, HP's aC@t{++}
-compiler, and the terminal user interface: Ben Krepp, Richard Title,
-John Bishop, Susan Macchia, Kathy Mann, Satish Pai, India Paul, Steve
-Rehrauer, and Elena Zannoni.  Kim Haase provided HP-specific
-information in this manual.
+compiler, and the Text User Interface (nee Terminal User Interface):
+Ben Krepp, Richard Title, John Bishop, Susan Macchia, Kathy Mann,
+Satish Pai, India Paul, Steve Rehrauer, and Elena Zannoni.  Kim Haase
+provided HP-specific information in this manual.
 
 DJ Delorie ported @value{GDBN} to MS-DOS, for the DJGPP project.
 Robert Hoehne made significant contributions to the DJGPP port.
@@ -860,7 +861,7 @@ equivalent to the @samp{-c}/@samp{-p} option followed by that argument.)
 If the second argument begins with a decimal digit, @value{GDBN} will
 first attempt to attach to it as a process, and if that fails, attempt
 to open it as a corefile.  If you have a corefile whose name begins with
-a digit, you can prevent @value{GDBN} from treating it as a pid by 
+a digit, you can prevent @value{GDBN} from treating it as a pid by
 prefixing it with @file{./}, eg. @file{./12345}.
 
 If @value{GDBN} has not been configured to included core file support,
@@ -900,7 +901,7 @@ file.
 @itemx -c @var{file}
 @cindex @code{--core}
 @cindex @code{-c}
-Use file @var{file} as a core dump to examine.  
+Use file @var{file} as a core dump to examine.
 
 @item -c @var{number}
 @item -pid @var{number}
@@ -1064,30 +1065,6 @@ that control @value{GDBN}, and level 2 has been deprecated.
 The annotation mechanism has largely been superseeded by @sc{gdb/mi}
 (@pxref{GDB/MI}).
 
-@item -async
-@cindex @code{--async}
-Use the asynchronous event loop for the command-line interface.
-@value{GDBN} processes all events, such as user keyboard input, via a
-special event loop.  This allows @value{GDBN} to accept and process user
-commands in parallel with the debugged process being
-run@footnote{@value{GDBN} built with @sc{djgpp} tools for
-MS-DOS/MS-Windows supports this mode of operation, but the event loop is
-suspended when the debuggee runs.}, so you don't need to wait for
-control to return to @value{GDBN} before you type the next command.
-(@emph{Note:} as of version 5.1, the target side of the asynchronous
-operation is not yet in place, so @samp{-async} does not work fully
-yet.)
-@c FIXME: when the target side of the event loop is done, the above NOTE
-@c should be removed.
-
-When the standard input is connected to a terminal device, @value{GDBN}
-uses the asynchronous event loop by default, unless disabled by the
-@samp{-noasync} option.
-
-@item -noasync
-@cindex @code{--noasync}
-Disable the asynchronous event loop for the command-line interface.
-
 @item --args
 @cindex @code{--args}
 Change interpretation of command line so that arguments following the
@@ -1101,6 +1078,11 @@ This option stops option processing.
 Set the line speed (baud rate or bits per second) of any serial
 interface used by @value{GDBN} for remote debugging.
 
+@item -l @var{timeout}
+@cindex @code{-l}
+Set the timeout (in seconds) of any communication used by @value{GDBN}
+for remote debugging.
+
 @item -tty @var{device}
 @itemx -t @var{device}
 @cindex @code{--tty}
@@ -1111,12 +1093,13 @@ Run using @var{device} for your program's standard input and output.
 @c resolve the situation of these eventually
 @item -tui
 @cindex @code{--tui}
-Activate the Terminal User Interface when starting. 
-The Terminal User Interface manages several text windows on the terminal,
-showing source, assembly, registers and @value{GDBN} command outputs
-(@pxref{TUI, ,@value{GDBN} Text User Interface}).
-Do not use this option if you run @value{GDBN} from Emacs
-(@pxref{Emacs, ,Using @value{GDBN} under @sc{gnu} Emacs}).
+Activate the @dfn{Text User Interface} when starting.  The Text User
+Interface manages several text windows on the terminal, showing
+source, assembly, registers and @value{GDBN} command outputs
+(@pxref{TUI, ,@value{GDBN} Text User Interface}).  Alternatively, the
+Text User Interface can be enabled by invoking the program
+@samp{gdbtui}.  Do not use this option if you run @value{GDBN} from
+Emacs (@pxref{Emacs, ,Using @value{GDBN} under @sc{gnu} Emacs}).
 
 @c @item -xdb
 @c @cindex @code{--xdb}
@@ -1134,10 +1117,10 @@ communicate with @value{GDBN} using it as a back end.
 
 @samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes
 @value{GDBN} to use the @dfn{@sc{gdb/mi} interface} (@pxref{GDB/MI, ,
-The @sc{gdb/mi} Interface}) included in @var{GDBN} version 6.0.  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.
+The @sc{gdb/mi} Interface}) included since @var{GDBN} version 6.0.  The
+previous @sc{gdb/mi} interface, included in @value{GDBN} version 5.3 and
+selected with @samp{--interpreter=mi1}, is deprecated.  Earlier
+@sc{gdb/mi} interfaces are no longer supported.
 
 @item -write
 @cindex @code{--write}
@@ -1683,6 +1666,7 @@ Some things do not work as well with @samp{-g -O} as with just
 @samp{-g}, particularly on machines with instruction scheduling.  If in
 doubt, recompile with @samp{-g} alone, and if this fixes the problem,
 please report it to us as a bug (including a test case!).
+@xref{Variables}, for more information about debugging optimized code.
 
 Older versions of the @sc{gnu} C compiler permitted a variant option
 @w{@samp{-gg}} for debugging information.  @value{GDBN} no longer supports this
@@ -1766,6 +1750,43 @@ time @value{GDBN} read its symbols, @value{GDBN} discards its symbol
 table, and reads it again.  When it does this, @value{GDBN} tries to retain
 your current breakpoints.
 
+@table @code
+@kindex start
+@item start
+@cindex run to main procedure
+The name of the main procedure can vary from language to language.
+With C or C@t{++}, the main procedure name is always @code{main}, but
+other languages such as Ada do not require a specific name for their
+main procedure.  The debugger provides a convenient way to start the
+execution of the program and to stop at the beginning of the main
+procedure, depending on the language used.
+
+The @samp{start} command does the equivalent of setting a temporary
+breakpoint at the beginning of the main procedure and then invoking
+the @samp{run} command.
+
+@cindex elaboration phase
+Some programs contain an @dfn{elaboration} phase where some startup code is
+executed before the main procedure is called.  This depends on the
+languages used to write your program.  In C@t{++}, for instance,
+constructors for static and global objects are executed before
+@code{main} is called.  It is therefore possible that the debugger stops
+before reaching the main procedure.  However, the temporary breakpoint
+will remain to halt execution.
+
+Specify the arguments to give to your program as arguments to the
+@samp{start} command.  These arguments will be given verbatim to the
+underlying @samp{run} command.  Note that the same arguments will be
+reused if no argument is provided during subsequent calls to
+@samp{start} or @samp{run}.
+
+It is sometimes necessary to debug the program during elaboration.  In
+these cases, using the @code{start} command would stop the execution of
+your program too late, as the program would have already completed the
+elaboration phase.  Under these circumstances, insert breakpoints in your
+elaboration code before running your program.
+@end table
+
 @node Arguments
 @section Your program's arguments
 
@@ -1908,6 +1929,13 @@ Set the @value{GDBN} working directory to @var{directory}.
 Print the @value{GDBN} working directory.
 @end table
 
+It is generally impossible to find the current working directory of
+the process being debugged (since a program can change its directory
+during its run).  If you work on a system where @value{GDBN} is
+configured with the @file{/proc} support, you can use the @code{info
+proc} command (@pxref{SVR4 Process Information}) to find out the
+current working directory of the debuggee.
+
 @node Input/Output
 @section Your program's input and output
 
@@ -2160,8 +2188,8 @@ For example,
 
 On HP-UX systems:
 
-@cindex thread number
-@cindex thread identifier (GDB)
+@cindex debugging multithreaded programs (on HP-UX)
+@cindex thread identifier (GDB), on HP-UX
 For debugging purposes, @value{GDBN} associates its own thread
 number---a small integer assigned in thread-creation order---with each
 thread in your program.
@@ -2185,7 +2213,7 @@ HP-UX, you see
 when @value{GDBN} notices a new thread.
 
 @table @code
-@kindex info threads
+@kindex info threads (HP-UX)
 @item info threads
 Display a summary of all threads currently in your
 program.  @value{GDBN} displays for each thread (in this order):
@@ -2237,7 +2265,6 @@ As with the @samp{[New @dots{}]} message, the form of the text after
 @samp{Switching to} depends on your system's conventions for identifying
 threads.
 
-@kindex thread apply
 @item thread apply [@var{threadno}] [@var{all}]  @var{args}
 The @code{thread apply} command allows you to apply a command to one or
 more threads.  Specify the numbers of the threads that you want affected
@@ -2288,9 +2315,10 @@ get its process ID.  Then tell @value{GDBN} (a new invocation of
 the child process (@pxref{Attach}).  From that point on you can debug
 the child process just like any other process which you attached to.
 
-On HP-UX (11.x and later only?), @value{GDBN} provides support for
-debugging programs that create additional processes using the
-@code{fork} or @code{vfork} function.
+On some systems, @value{GDBN} provides support for debugging programs that
+create additional processes using the @code{fork} or @code{vfork} functions.
+Currently, the only platforms with this feature are HP-UX (11.x and later
+only?) and GNU/Linux (kernel version 2.5.60 and later).
 
 By default, when a program forks, @value{GDBN} will continue to debug
 the parent process and the child process will run unimpeded.
@@ -2314,8 +2342,6 @@ unimpeded.  This is the default.
 The new process is debugged after a fork.  The parent process runs
 unimpeded.
 
-@item ask
-The debugger will ask for one of the above choices.
 @end table
 
 @item show follow-fork-mode
@@ -2441,6 +2467,7 @@ all breakpoint in that range are operated on.
 * Break Commands::              Breakpoint command lists
 * Breakpoint Menus::            Breakpoint menus
 * Error in Breakpoints::        ``Cannot insert breakpoints''
+* Breakpoint related warnings:: ``Breakpoint address adjusted...''
 @end menu
 
 @node Set Breaks
@@ -2576,10 +2603,19 @@ an @code{fo} followed by zero or more @code{o}s.  There is an implicit
 @code{.*} leading and trailing the regular expression you supply, so to
 match only functions that begin with @code{foo}, use @code{^foo}.
 
+@cindex non-member C@t{++} functions, set breakpoint in
 When debugging C@t{++} programs, @code{rbreak} is useful for setting
 breakpoints on overloaded functions that are not members of any special
 classes.
 
+@cindex set breakpoints on all functions
+The @code{rbreak} command can be used to set breakpoints in
+@strong{all} the functions in a program, like this:
+
+@smallexample
+(@value{GDBP}) rbreak .
+@end smallexample
+
 @kindex info breakpoints
 @cindex @code{$_} and @code{info breakpoints}
 @item info breakpoints @r{[}@var{n}@r{]}
@@ -2598,16 +2634,23 @@ Whether the breakpoint is marked to be disabled or deleted when hit.
 Enabled breakpoints are marked with @samp{y}.  @samp{n} marks breakpoints
 that are not enabled.
 @item Address
-Where the breakpoint is in your program, as a memory address.
+Where the breakpoint is in your program, as a memory address.  If the
+breakpoint is pending (see below for details) on a future load of a shared library, the address
+will be listed as @samp{<PENDING>}.
 @item What
 Where the breakpoint is in the source for your program, as a file and
-line number.
+line number.  For a pending breakpoint, the original string passed to
+the breakpoint command will be listed as it cannot be resolved until
+the appropriate shared library is loaded in the future.
 @end table
 
 @noindent
 If a breakpoint is conditional, @code{info break} shows the condition on
 the line following the affected breakpoint; breakpoint commands, if any,
-are listed after that.
+are listed after that.  A pending breakpoint is allowed to have a condition
+specified for it.  The condition is not parsed for validity until a shared
+library is loaded that allows the pending breakpoint to resolve to a
+valid location.
 
 @noindent
 @code{info break} with a breakpoint
@@ -2630,6 +2673,58 @@ your program.  There is nothing silly or meaningless about this.  When
 the breakpoints are conditional, this is even useful
 (@pxref{Conditions, ,Break conditions}).
 
+@cindex pending breakpoints
+If a specified breakpoint location cannot be found, it may be due to the fact
+that the location is in a shared library that is yet to be loaded.  In such
+a case, you may want @value{GDBN} to create a special breakpoint (known as
+a @dfn{pending breakpoint}) that
+attempts to resolve itself in the future when an appropriate shared library
+gets loaded.
+
+Pending breakpoints are useful to set at the start of your
+@value{GDBN} session for locations that you know will be dynamically loaded
+later by the program being debugged.  When shared libraries are loaded,
+a check is made to see if the load resolves any pending breakpoint locations.
+If a pending breakpoint location gets resolved,
+a regular breakpoint is created and the original pending breakpoint is removed.
+
+@value{GDBN} provides some additional commands for controlling pending
+breakpoint support:
+
+@kindex set breakpoint pending
+@kindex show breakpoint pending
+@table @code
+@item set breakpoint pending auto
+This is the default behavior.  When @value{GDBN} cannot find the breakpoint
+location, it queries you whether a pending breakpoint should be created.
+
+@item set breakpoint pending on
+This indicates that an unrecognized breakpoint location should automatically
+result in a pending breakpoint being created.
+
+@item set breakpoint pending off
+This indicates that pending breakpoints are not to be created.  Any
+unrecognized breakpoint location results in an error.  This setting does
+not affect any pending breakpoints previously created.
+
+@item show breakpoint pending
+Show the current behavior setting for creating pending breakpoints.
+@end table
+
+@cindex operations allowed on pending breakpoints
+Normal breakpoint operations apply to pending breakpoints as well.  You may
+specify a condition for a pending breakpoint and/or commands to run when the
+breakpoint is reached.  You can also enable or disable
+the pending breakpoint.  When you specify a condition for a pending breakpoint,
+the parsing of the condition will be deferred until the point where the
+pending breakpoint location is resolved.  Disabling a pending breakpoint
+tells @value{GDBN} to not attempt to resolve the breakpoint on any subsequent
+shared library load.  When a pending breakpoint is re-enabled,
+@value{GDBN} checks to see if the location is already resolved.
+This is done because any number of shared library loads could have
+occurred since the time the breakpoint was disabled and one or more
+of these loads could resolve the location.
+
 @cindex negative breakpoint numbers
 @cindex internal @value{GDBN} breakpoints
 @value{GDBN} itself sometimes sets breakpoints in your program for
@@ -2801,34 +2896,30 @@ shared library.  Use the @code{catch} command to set a catchpoint.
 Stop when @var{event} occurs.  @var{event} can be any of the following:
 @table @code
 @item throw
-@kindex catch throw
+@cindex stop on C@t{++} exceptions
 The throwing of a C@t{++} exception.
 
 @item catch
-@kindex catch catch
 The catching of a C@t{++} exception.
 
 @item exec
-@kindex catch exec
+@cindex break on fork/exec
 A call to @code{exec}.  This is currently only available for HP-UX.
 
 @item fork
-@kindex catch fork
 A call to @code{fork}.  This is currently only available for HP-UX.
 
 @item vfork
-@kindex catch vfork
 A call to @code{vfork}.  This is currently only available for HP-UX.
 
 @item load
 @itemx load @var{libname}
-@kindex catch load
+@cindex break on load/unload of shared library
 The dynamic loading of any shared library, or the loading of the library
 @var{libname}.  This is currently only available for HP-UX.
 
 @item unload
 @itemx unload @var{libname}
-@kindex catch unload
 The unloading of any dynamically loaded shared library, or the unloading
 of the library @var{libname}.  This is currently only available for HP-UX.
 @end table
@@ -2941,8 +3032,7 @@ confirm off}).  You can abbreviate this command as @code{d}.
 @node Disabling
 @subsection Disabling breakpoints
 
-@kindex disable breakpoints
-@kindex enable breakpoints
+@cindex enable/disable a breakpoint
 Rather than deleting a breakpoint, watchpoint, or catchpoint, you might
 prefer to @dfn{disable} it.  This makes the breakpoint inoperative as if
 it had been deleted, but remembers the information on the breakpoint so
@@ -2976,7 +3066,6 @@ You can use the following commands to enable or disable breakpoints,
 watchpoints, and catchpoints:
 
 @table @code
-@kindex disable breakpoints
 @kindex disable
 @kindex dis @r{(@code{disable})}
 @item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
@@ -2986,7 +3075,6 @@ options such as ignore-counts, conditions and commands are remembered in
 case the breakpoint is enabled again later.  You may abbreviate
 @code{disable} as @code{dis}.
 
-@kindex enable breakpoints
 @kindex enable
 @item enable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
 Enable the specified breakpoints (or all defined breakpoints).  They
@@ -3214,7 +3302,7 @@ end
 @cindex overloading
 @cindex symbol overloading
 
-Some programming languages (notably C@t{++} and Objective-C) permit a 
+Some programming languages (notably C@t{++} and Objective-C) permit a
 single function name
 to be defined several times, for application in different contexts.
 This is called @dfn{overloading}.  When a function name is overloaded,
@@ -3309,6 +3397,58 @@ watchpoints it needs to insert.
 When this message is printed, you need to disable or remove some of the
 hardware-assisted breakpoints and watchpoints, and then continue.
 
+@node Breakpoint related warnings
+@subsection ``Breakpoint address adjusted...''
+@cindex breakpoint address adjusted
+
+Some processor architectures place constraints on the addresses at
+which breakpoints may be placed.  For architectures thus constrained,
+@value{GDBN} will attempt to adjust the breakpoint's address to comply
+with the constraints dictated by the architecture.
+
+One example of such an architecture is the Fujitsu FR-V.  The FR-V is
+a VLIW architecture in which a number of RISC-like instructions may be
+bundled together for parallel execution.  The FR-V architecture
+constrains the location of a breakpoint instruction within such a
+bundle to the instruction with the lowest address.  @value{GDBN}
+honors this constraint by adjusting a breakpoint's address to the
+first in the bundle.
+
+It is not uncommon for optimized code to have bundles which contain
+instructions from different source statements, thus it may happen that
+a breakpoint's address will be adjusted from one source statement to
+another.  Since this adjustment may significantly alter @value{GDBN}'s
+breakpoint related behavior from what the user expects, a warning is
+printed when the breakpoint is first set and also when the breakpoint
+is hit.
+
+A warning like the one below is printed when setting a breakpoint
+that's been subject to address adjustment:
+
+@smallexample
+warning: Breakpoint address adjusted from 0x00010414 to 0x00010410.
+@end smallexample
+
+Such warnings are printed both for user settable and @value{GDBN}'s
+internal breakpoints.  If you see one of these warnings, you should
+verify that a breakpoint set at the adjusted address will have the
+desired affect.  If not, the breakpoint in question may be removed and
+other breakpoints may be set which will have the desired behavior.
+E.g., it may be sufficient to place the breakpoint at a later
+instruction.  A conditional breakpoint may also be useful in some
+cases to prevent the breakpoint from triggering too often.
+
+@value{GDBN} will also issue a warning when stopping at one of these
+adjusted breakpoints:
+
+@smallexample
+warning: Breakpoint 1 address previously adjusted from 0x00010414
+to 0x00010410.
+@end smallexample
+
+When this warning is encountered, it may be too late to take remedial
+action except in cases where the breakpoint is hit earlier or more
+frequently than expected.
 
 @node Continuing and Stepping
 @section Continuing and stepping
@@ -3707,6 +3847,47 @@ allows you to examine the overall state of the program, including
 switching between threads, without worrying that things may change
 underfoot.
 
+@cindex thread breakpoints and system calls
+@cindex system calls and thread breakpoints
+@cindex premature return from system calls
+There is an unfortunate side effect.  If one thread stops for a
+breakpoint, or for some other reason, and another thread is blocked in a
+system call, then the system call may return prematurely.  This is a
+consequence of the interaction between multiple threads and the signals
+that @value{GDBN} uses to implement breakpoints and other events that
+stop execution.
+
+To handle this problem, your program should check the return value of
+each system call and react appropriately.  This is good programming
+style anyways.
+
+For example, do not write code like this:
+
+@smallexample
+  sleep (10);
+@end smallexample
+
+The call to @code{sleep} will return early if a different thread stops
+at a breakpoint or for some other reason.
+
+Instead, write this:
+
+@smallexample
+  int unslept = 10;
+  while (unslept > 0)
+    unslept = sleep (unslept);
+@end smallexample
+
+A system call is allowed to return early, so the system is still
+conforming to its specification.  But @value{GDBN} does cause your
+multi-threaded program to behave differently than it would without
+@value{GDBN}.
+
+Also, @value{GDBN} uses internal breakpoints in the thread library to
+monitor certain events such as thread creation and thread destruction.
+When such an event happens, a system call in another thread may return
+prematurely, even though your program does not appear to stop.
+
 @cindex continuing threads
 @cindex threads, continuing
 Conversely, whenever you restart the program, @emph{all} threads start
@@ -3892,7 +4073,6 @@ Similar, but print only the outermost @var{n} frames.
 
 @kindex where
 @kindex info stack
-@kindex info s @r{(@code{info stack})}
 The names @code{where} and @code{info stack} (abbreviated @code{info s})
 are additional aliases for @code{backtrace}.
 
@@ -3922,27 +4102,50 @@ 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 user 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.
 
-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.
+If you need to examine the startup code, or limit the number of levels
+in a backtrace, you can change this behavior:
 
 @table @code
-@item set backtrace-below-main off
+@item set backtrace past-main
+@itemx set backtrace past-main on
+@kindex set backtrace
+Backtraces will continue past the user entry point.
+
+@item set backtrace past-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 past-main
+@kindex show backtrace
+Display the current user entry point backtrace policy.
+
+@item set backtrace past-entry
+@itemx set backtrace past-entry on
+Backtraces will continue past the internal entry point of an application. 
+This entry point is encoded by the linker when the application is built,
+and is likely before the user entry point @code{main} (or equivalent) is called.
+
+@item set backtrace past-entry off
+Backtraces will stop when they encouter the internal entry point of an
+application.  This is the default.
+
+@item show backtrace past-entry
+Display the current internal entry point backtrace policy.
 
-@item show backtrace-below-main
-Display the current backtrace policy.
+@item set backtrace limit @var{n}
+@itemx set backtrace limit 0
+@cindex backtrace limit
+Limit the backtrace to @var{n} levels.  A value of zero means
+unlimited.
+
+@item show backtrace limit
+Display the current limit on backtrace levels.
 @end table
 
 @node Selection
@@ -4297,25 +4500,26 @@ 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
+The optional numeric value +@var{number} specifies the number of the line in
+the file where to start editing.}.
+By default, it is @file{@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 ...
+gdb @dots{}
 @end smallexample
 or in the @code{csh} shell,
 @smallexample
 setenv EDITOR /usr/bin/vi
-gdb ...
+gdb @dots{}
 @end smallexample
 
 @node Search
 @section Searching source files
-@cindex searching
+@cindex searching source files
 @kindex reverse-search
 
 There are two commands for searching through the current source file for a
@@ -4350,16 +4554,30 @@ the directories could be moved between the compilation and your debugging
 session.  @value{GDBN} has a list of directories to search for source files;
 this is called the @dfn{source path}.  Each time @value{GDBN} wants a source file,
 it tries all the directories in the list, in the order they are present
-in the list, until it finds a file with the desired name.  Note that
-the executable search path is @emph{not} used for this purpose.  Neither is
-the current working directory, unless it happens to be in the source
-path.
-
-If @value{GDBN} cannot find a source file in the source path, and the
-object program records a directory, @value{GDBN} tries that directory
-too.  If the source path is empty, and there is no record of the
-compilation directory, @value{GDBN} looks in the current directory as a
-last resort.
+in the list, until it finds a file with the desired name.
+
+For example, suppose an executable references the file
+@file{/usr/src/foo-1.0/lib/foo.c}, and our source path is
+@file{/mnt/cross}.  The file is first looked up literally; if this
+fails, @file{/mnt/cross/usr/src/foo-1.0/lib/foo.c} is tried; if this
+fails, @file{/mnt/cross/foo.c} is opened; if this fails, an error
+message is printed.  @value{GDBN} does not look up the parts of the
+source file name, such as @file{/mnt/cross/src/foo-1.0/lib/foo.c}.
+Likewise, the subdirectories of the source path are not searched: if
+the source path is @file{/mnt/cross}, and the binary refers to
+@file{foo.c}, @value{GDBN} would not find it under
+@file{/mnt/cross/usr/src/foo-1.0/lib}.
+
+Plain file names, relative file names with leading directories, file
+names containing dots, etc.@: are all treated as described above; for
+instance, if the source path is @file{/mnt/cross}, and the source file
+is recorded as @file{../lib/foo.c}, @value{GDBN} would first try
+@file{../lib/foo.c}, then @file{/mnt/cross/../lib/foo.c}, and after
+that---@file{/mnt/cross/foo.c}.
+
+Note that the executable search path is @emph{not} used to locate the
+source files.  Neither is the current working directory, unless it
+happens to be in the source path.
 
 Whenever you reset or rearrange the source path, @value{GDBN} clears out
 any information it has cached about where source files are found and where
@@ -4424,6 +4642,7 @@ directories in one command.
 
 @node Machine Code
 @section Source and machine code
+@cindex source line and its code address
 
 You can use the command @code{info line} to map source lines to program
 addresses (and vice versa), and the command @code{disassemble} to display
@@ -4453,6 +4672,7 @@ Line 895 of "builtin.c" starts at pc 0x634c and ends at 0x6350.
 @end smallexample
 
 @noindent
+@cindex code address and its source line
 We can also inquire (using @code{*@var{addr}} as the form for
 @var{linespec}) what source line covers a particular address:
 @smallexample
@@ -4461,6 +4681,7 @@ Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
 @end smallexample
 
 @cindex @code{$_} and @code{info line}
+@cindex @code{x} command, default address
 @kindex x@r{(examine), and} info line
 After @code{info line}, the default address for the @code{x} command
 is changed to the starting address of the line, so that @samp{x/i} is
@@ -4506,10 +4727,6 @@ mnemonics or other syntax.
 
 @table @code
 @kindex set disassembly-flavor
-@cindex assembly instructions
-@cindex instructions, assembly
-@cindex machine instructions
-@cindex listing machine instructions
 @cindex Intel disassembly flavor
 @cindex AT&T disassembly flavor
 @item set disassembly-flavor @var{instruction-set}
@@ -4550,6 +4767,7 @@ formats}.
 
 @item print
 @itemx print /@var{f}
+@cindex reprint the last value
 If you omit @var{expr}, @value{GDBN} displays the last value again (from the
 @dfn{value history}; @pxref{Value History, ,Value history}).  This allows you to
 conveniently inspect the same value in an alternative format.
@@ -4577,8 +4795,10 @@ Table}.
 * Registers::                   Registers
 * Floating Point Hardware::     Floating point hardware
 * Vector Unit::                 Vector Unit
+* Auxiliary Vector::            Auxiliary data provided by operating system
 * Memory Region Attributes::    Memory region attributes
 * Dump/Restore Files::          Copy between memory and a file
+* Core File Generation::        Cause a program dump its core
 * Character Sets::              Debugging programs that use a different
                                 character set than GDB does
 @end menu
@@ -4595,6 +4815,7 @@ casts, and string constants.  It also includes preprocessor macros, if
 you compiled your program to include this information; see
 @ref{Compilation}.
 
+@cindex arrays in expressions
 @value{GDBN} supports array constants in expressions input by
 the user.  The syntax is @{@var{element}, @var{element}@dots{}@}.  For example,
 you can use the command @code{print @{1, 2, 3@}} to build up an array in
@@ -4608,6 +4829,7 @@ languages.
 In this section, we discuss operators that you can use in @value{GDBN}
 expressions regardless of your programming language.
 
+@cindex casts, in expressions
 Casts are supported in all languages, not just in C, because it is so
 useful to cast a number into a pointer in order to examine a structure
 at that address in memory.
@@ -4686,7 +4908,7 @@ in this file.  But it is possible to have more than one such variable or
 function with the same name (in different source files).  If that
 happens, referring to that name has unpredictable effects.  If you wish,
 you can specify a static variable in a particular function or file,
-using the colon-colon notation:
+using the colon-colon (@code{::}) notation:
 
 @cindex colon-colon, context for variables/functions
 @iftex
@@ -4717,6 +4939,8 @@ scope resolution operator in @value{GDBN} expressions.
 
 @cindex wrong values
 @cindex variable values, wrong
+@cindex function entry/exit, wrong values of variables
+@cindex optimized code, wrong values of variables
 @quotation
 @emph{Warning:} Occasionally, a local variable may appear to have the
 wrong value at certain points in a function---just after entry to a new
@@ -4749,18 +4973,20 @@ No symbol "foo" in current context.
 
 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
+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}.
-
+@xref{C, , Debugging C++}, for more info about debug info formats
+that are best suited to C@t{++} programs.
 
 @node Arrays
 @section Artificial arrays
 
 @cindex artificial array
+@cindex arrays
 @kindex @@@r{, referencing memory as an array}
 It is often useful to print out several successive objects of the
 same type in memory; a section of an array, or an array of
@@ -5093,6 +5319,7 @@ It also includes expressions which would not be displayed right now
 because they refer to automatic variables not currently available.
 @end table
 
+@cindex display disabled out of scope
 If a display expression refers to local variables, then it does not make
 sense outside the lexical context for which it was set up.  Such an
 expression is disabled when execution enters a context where one of its
@@ -5116,9 +5343,10 @@ and symbols are printed.
 These settings are useful for debugging programs in any language:
 
 @table @code
-@kindex set print address
+@kindex set print
 @item set print address
 @itemx set print address on
+@cindex print/don't print memory addresses
 @value{GDBN} prints memory addresses showing the location of stack
 traces, structure values, pointer values, breakpoints, and so forth,
 even when it also displays the contents of those addresses.  The default
@@ -5152,7 +5380,7 @@ dependent displays from the @value{GDBN} interface.  For example, with
 @code{print address off}, you should get the same text for backtraces on
 all machines---whether or not they involve pointer arguments.
 
-@kindex show print address
+@kindex show print
 @item show print address
 Show whether or not addresses are to be printed.
 @end table
@@ -5166,8 +5394,8 @@ you can set @value{GDBN} to print the source file and line number when
 it prints a symbolic address:
 
 @table @code
-@kindex set print symbol-filename
 @item set print symbol-filename on
+@cindex closest symbol and offset for an address
 Tell @value{GDBN} to print the source file name and line number of a
 symbol in the symbolic form of an address.
 
@@ -5175,7 +5403,6 @@ symbol in the symbolic form of an address.
 Do not print source file name and line number of a symbol.  This is the
 default.
 
-@kindex show print symbol-filename
 @item show print symbol-filename
 Show whether or not @value{GDBN} will print the source file name and
 line number of a symbol in the symbolic form of an address.
@@ -5189,14 +5416,13 @@ Also, you may wish to see the symbolic form only if the address being
 printed is reasonably close to the closest earlier symbol:
 
 @table @code
-@kindex set print max-symbolic-offset
 @item set print max-symbolic-offset @var{max-offset}
+@cindex maximum value for offset of closest symbol
 Tell @value{GDBN} to only display the symbolic form of an address if the
 offset between the closest earlier symbol and the address is less than
 @var{max-offset}.  The default is 0, which tells @value{GDBN}
 to always print the symbolic form of an address if any symbol precedes it.
 
-@kindex show print max-symbolic-offset
 @item show print max-symbolic-offset
 Ask how large the maximum offset is that @value{GDBN} prints in a
 symbolic address.
@@ -5226,22 +5452,21 @@ the appropriate @code{set print} options turned on.
 Other settings control how different kinds of objects are printed:
 
 @table @code
-@kindex set print array
 @item set print array
 @itemx set print array on
+@cindex pretty print arrays
 Pretty print arrays.  This format is more convenient to read,
 but uses more space.  The default is off.
 
 @item set print array off
 Return to compressed format for arrays.
 
-@kindex show print array
 @item show print array
 Show whether compressed or pretty format is selected for displaying
 arrays.
 
-@kindex set print elements
 @item set print elements @var{number-of-elements}
+@cindex number of array elements to print
 Set a limit on how many elements of an array @value{GDBN} will print.
 If @value{GDBN} is printing a large array, it stops printing after it has
 printed the number of elements set by the @code{set print elements} command.
@@ -5249,19 +5474,17 @@ This limit also applies to the display of strings.
 When @value{GDBN} starts, this limit is set to 200.
 Setting  @var{number-of-elements} to zero means that the printing is unlimited.
 
-@kindex show print elements
 @item show print elements
 Display the number of elements of a large array that @value{GDBN} will print.
 If the number is 0, then the printing is unlimited.
 
-@kindex set print null-stop
 @item set print null-stop
+@cindex @sc{null} elements in arrays
 Cause @value{GDBN} to stop printing the characters of an array when the first
 @sc{null} is encountered.  This is useful when large arrays actually
 contain only short strings.
 The default is off.
 
-@kindex set print pretty
 @item set print pretty on
 Cause @value{GDBN} to print structures in an indented format with one member
 per line, like this:
@@ -5292,12 +5515,12 @@ meat = 0x54 "Pork"@}
 @noindent
 This is the default format.
 
-@kindex show print pretty
 @item show print pretty
 Show which format @value{GDBN} is using to print structures.
 
-@kindex set print sevenbit-strings
 @item set print sevenbit-strings on
+@cindex eight-bit characters in strings
+@cindex octal escapes in strings
 Print using only seven-bit characters; if this option is set,
 @value{GDBN} displays any eight-bit characters (in strings or
 character values) using the notation @code{\}@var{nnn}.  This setting is
@@ -5308,19 +5531,17 @@ high-order bit of characters as a marker or ``meta'' bit.
 Print full eight-bit characters.  This allows the use of more
 international character sets, and is the default.
 
-@kindex show print sevenbit-strings
 @item show print sevenbit-strings
 Show whether or not @value{GDBN} is printing only seven-bit characters.
 
-@kindex set print union
 @item set print union on
+@cindex unions in structures, printing
 Tell @value{GDBN} to print unions which are contained in structures.  This
 is the default setting.
 
 @item set print union off
 Tell @value{GDBN} not to print unions which are contained in structures.
 
-@kindex show print union
 @item show print union
 Ask @value{GDBN} whether or not it will print unions which are contained in
 structures.
@@ -5364,31 +5585,26 @@ $1 = @{it = Tree, form = @{...@}@}
 These settings are of interest when debugging C@t{++} programs:
 
 @table @code
-@cindex demangling
-@kindex set print demangle
+@cindex demangling C@t{++} names
 @item set print demangle
 @itemx set print demangle on
 Print C@t{++} names in their source form rather than in the encoded
 (``mangled'') form passed to the assembler and linker for type-safe
 linkage.  The default is on.
 
-@kindex show print demangle
 @item show print demangle
 Show whether C@t{++} names are printed in mangled or demangled form.
 
-@kindex set print asm-demangle
 @item set print asm-demangle
 @itemx set print asm-demangle on
 Print C@t{++} names in their source form rather than their mangled form, even
 in assembler code printouts such as instruction disassemblies.
 The default is off.
 
-@kindex show print asm-demangle
 @item show print asm-demangle
 Show whether C@t{++} names in assembly listings are printed in mangled
 or demangled form.
 
-@kindex set demangle-style
 @cindex C@t{++} symbol decoding style
 @cindex symbol decoding style, C@t{++}
 @item set demangle-style @var{style}
@@ -5418,13 +5634,12 @@ require further enhancement to permit that.
 @end table
 If you omit @var{style}, you will see a list of possible formats.
 
-@kindex show demangle-style
 @item show demangle-style
 Display the encoding style currently in use for decoding C@t{++} symbols.
 
-@kindex set print object
 @item set print object
 @itemx set print object on
+@cindex derived type of an object, printing
 When displaying a pointer to an object, identify the @emph{actual}
 (derived) type of the object rather than the @emph{declared} type, using
 the virtual function table.
@@ -5433,26 +5648,24 @@ the virtual function table.
 Display only the declared type of objects, without reference to the
 virtual function table.  This is the default setting.
 
-@kindex show print object
 @item show print object
 Show whether actual, or declared, object types are displayed.
 
-@kindex set print static-members
 @item set print static-members
 @itemx set print static-members on
+@cindex static members of C@t{++} objects
 Print static members when displaying a C@t{++} object.  The default is on.
 
 @item set print static-members off
 Do not print static members when displaying a C@t{++} object.
 
-@kindex show print static-members
 @item show print static-members
 Show whether C@t{++} static members are printed, or not.
 
 @c These don't work with HP ANSI C++ yet.
-@kindex set print vtbl
 @item set print vtbl
 @itemx set print vtbl on
+@cindex pretty print C@t{++} virtual function tables
 Pretty print C@t{++} virtual function tables.  The default is off.
 (The @code{vtbl} commands do not work on programs compiled with the HP
 ANSI C@t{++} compiler (@code{aCC}).)
@@ -5460,7 +5673,6 @@ ANSI C@t{++} compiler (@code{aCC}).)
 @item set print vtbl off
 Do not pretty print C@t{++} virtual function tables.
 
-@kindex show print vtbl
 @item show print vtbl
 Show whether C@t{++} virtual function tables are pretty printed, or not.
 @end table
@@ -5757,12 +5969,38 @@ Display information about the vector unit.  The exact contents and
 layout vary depending on the hardware.
 @end table
 
+@node Auxiliary Vector
+@section Operating system auxiliary vector
+@cindex auxiliary vector
+@cindex vector, auxiliary
+
+Some operating systems supply an @dfn{auxiliary vector} to programs at
+startup.  This is akin to the arguments and environment that you
+specify for a program, but contains a system-dependent variety of
+binary values that tell system libraries important details about the
+hardware, operating system, and process.  Each value's purpose is
+identified by an integer tag; the meanings are well-known but system-specific.
+Depending on the configuration and operating system facilities,
+@value{GDBN} may be able to show you this information.
+
+@table @code
+@kindex info auxv
+@item info auxv
+Display the auxiliary vector of the inferior, which can be either a
+live process or a core dump file.  @value{GDBN} prints each tag value
+numerically, and also shows names and text descriptions for recognized
+tags.  Some values in the vector are numbers, some bit masks, and some
+pointers to strings or other data.  @value{GDBN} displays each value in the
+most appropriate form for a recognized tag, and in hexadecimal for
+an unrecognized tag.
+@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 
-required by regions of your target's memory.  @value{GDBN} uses attributes 
+@dfn{Memory region attributes} allow you to describe special handling
+required by regions of your target's memory.  @value{GDBN} uses attributes
 to determine whether to allow certain types of memory accesses; whether to
 use specific width accesses; and whether to cache target memory.
 
@@ -5772,7 +6010,7 @@ accessing memory in that region.  Similarly, if no memory regions have
 been defined, @value{GDBN} uses the default attributes when accessing
 all memory.
 
-When a memory region is defined, it is given a number to identify it; 
+When a memory region is defined, it is given a number to identify it;
 to enable, disable, or remove a memory region, you specify that number.
 
 @table @code
@@ -5790,7 +6028,7 @@ Remove memory regions @var{nums}@dots{}.
 @kindex disable mem
 @item disable mem @var{nums}@dots{}
 Disable memory regions @var{nums}@dots{}.
-A disabled memory region is not forgotten.  
+A disabled memory region is not forgotten.
 It may be enabled again later.
 
 @kindex enable mem
@@ -5805,7 +6043,7 @@ for each region.
 @table @emph
 @item Memory Region Number
 @item Enabled or Disabled.
-Enabled memory regions are marked with @samp{y}.  
+Enabled memory regions are marked with @samp{y}.
 Disabled memory regions are marked with @samp{n}.
 
 @item Lo Address
@@ -5822,7 +6060,7 @@ The list of attributes set for this memory region.
 
 @subsection Attributes
 
-@subsubsection Memory Access Mode 
+@subsubsection Memory Access Mode
 The access mode attributes set whether @value{GDBN} may make read or
 write accesses to a memory region.
 
@@ -5863,7 +6101,7 @@ Use 64 bit memory accesses.
 @c
 @c @table @code
 @c @item hwbreak
-@c Always use hardware breakpoints 
+@c Always use hardware breakpoints
 @c @item swbreak (default)
 @c @end table
 
@@ -5876,13 +6114,13 @@ registers.
 
 @table @code
 @item cache
-Enable @value{GDBN} to cache target memory. 
+Enable @value{GDBN} to cache target memory.
 @item nocache
 Disable @value{GDBN} from caching target memory.  This is the default.
 @end table
 
 @c @subsubsection Memory Write Verification
-@c The memory write verification attributes set whether @value{GDBN} 
+@c The memory write verification attributes set whether @value{GDBN}
 @c will re-reads data after each write to verify the write was successful.
 @c
 @c @table @code
@@ -5944,7 +6182,7 @@ Restore the contents of file @var{filename} into memory.  The
 file format, except for raw binary.  To restore a raw binary file you
 must specify the optional keyword @code{binary} after the filename.
 
-If @var{bias} is non-zero, its value will be added to the addresses 
+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}
@@ -5952,11 +6190,41 @@ 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 
+These offsets are relative to the addresses in the file, before
 the @var{bias} argument is applied.
 
 @end table
 
+@node Core File Generation
+@section How to Produce a Core File from Your Program
+@cindex dump core from inferior
+
+A @dfn{core file} or @dfn{core dump} is a file that records the memory
+image of a running process and its process status (register values
+etc.).  Its primary use is post-mortem debugging of a program that
+crashed while it ran outside a debugger.  A program that crashes
+automatically produces a core file, unless this feature is disabled by
+the user.  @xref{Files}, for information on invoking @value{GDBN} in
+the post-mortem debugging mode.
+
+Occasionally, you may wish to produce a core file of the program you
+are debugging in order to preserve a snapshot of its state.
+@value{GDBN} has a special command for that.
+
+@table @code
+@kindex gcore
+@kindex generate-core-file
+@item generate-core-file [@var{file}]
+@itemx gcore [@var{file}]
+Produce a core dump of the inferior process.  The optional argument
+@var{file} specifies the file name where to put the core dump.  If not
+specified, the file name defaults to @file{core.@var{pid}}, where
+@var{pid} is the inferior process ID.
+
+Note that this command is implemented only for some systems (as of
+this writing, @sc{gnu}/Linux, FreeBSD, Solaris, Unixware, and S390).
+@end table
+
 @node Character Sets
 @section Character Sets
 @cindex character sets
@@ -6023,15 +6291,15 @@ for both host and target.
 
 @item show charset
 @kindex show charset
-Show the names of the current host and target charsets. 
+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. 
+Show the name of the current host charset.
 
 @itemx show target-charset
 @kindex show target-charset
-Show the name of the current target charset. 
+Show the name of the current target charset.
 
 @end table
 
@@ -6098,7 +6366,7 @@ $ gdb -nw charset-test
 GNU gdb 2001-12-19-cvs
 Copyright 2001 Free Software Foundation, Inc.
 @dots{}
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 We can use the @code{show charset} command to see what character sets
@@ -6106,18 +6374,18 @@ We can use the @code{show charset} command to see what character sets
 strings:
 
 @smallexample
-(gdb) show charset
+(@value{GDBP}) show charset
 The current host and target character set is `ISO-8859-1'.
-(gdb) 
+(@value{GDBP})
 @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
+(@value{GDBP}) set charset ASCII
+(@value{GDBP}) show charset
 The current host and target character set is `ASCII'.
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 Let's assume that @sc{ascii} is indeed the correct character set for our
@@ -6127,20 +6395,20 @@ 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
+(@value{GDBP}) print ascii_hello
 $1 = 0x401698 "Hello, world!\n"
-(gdb) print ascii_hello[0]
+(@value{GDBP}) print ascii_hello[0]
 $2 = 72 'H'
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 @value{GDBN} uses the target character set for character and string
 literals you use in expressions:
 
 @smallexample
-(gdb) print '+'
+(@value{GDBP}) print '+'
 $3 = 43 '+'
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 The @sc{ascii} character set uses the number 43 to encode the @samp{+}
@@ -6151,20 +6419,20 @@ 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
+(@value{GDBP}) print ibm1047_hello
 $4 = 0x4016a8 "\310\205\223\223\226k@@\246\226\231\223\204Z%"
-(gdb) print ibm1047_hello[0]
+(@value{GDBP}) print ibm1047_hello[0]
 $5 = 200 '\310'
-(gdb) 
+(@value{GDBP})
 @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 
+(@value{GDBP}) set target-charset
+ASCII       EBCDIC-US   IBM1047     ISO-8859-1
+(@value{GDBP}) set target-charset
 @end smallexample
 
 We can select @sc{ibm1047} as our target character set, and examine the
@@ -6174,28 +6442,28 @@ 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
+(@value{GDBP}) set target-charset IBM1047
+(@value{GDBP}) show charset
 The current host character set is `ASCII'.
 The current target character set is `IBM1047'.
-(gdb) print ascii_hello
+(@value{GDBP}) print ascii_hello
 $6 = 0x401698 "\110\145%%?\054\040\167?\162%\144\041\012"
-(gdb) print ascii_hello[0]
+(@value{GDBP}) print ascii_hello[0]
 $7 = 72 '\110'
-(gdb) print ibm1047_hello
+(@value{GDBP}) print ibm1047_hello
 $8 = 0x4016a8 "Hello, world!\n"
-(gdb) print ibm1047_hello[0]
+(@value{GDBP}) print ibm1047_hello[0]
 $9 = 200 'H'
-(gdb)
+(@value{GDBP})
 @end smallexample
 
 As above, @value{GDBN} uses the target character set for character and
 string literals you use in expressions:
 
 @smallexample
-(gdb) print '+'
+(@value{GDBP}) print '+'
 $10 = 78 '+'
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 The @sc{ibm1047} character set uses the number 78 to encode the @samp{+}
@@ -6205,7 +6473,7 @@ character.
 @node Macros
 @chapter C Preprocessor Macros
 
-Some languages, such as C and C++, provide a way to define and invoke
+Some languages, such as C and C@t{++}, 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
@@ -6245,9 +6513,9 @@ Show the results of expanding all preprocessor macro invocations in
 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}
+@cindex expand macro once
 @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
@@ -6336,7 +6604,7 @@ $ gdb -nw sample
 GNU gdb 2002-05-06-cvs
 Copyright 2002 Free Software Foundation, Inc.
 GDB is free software, @dots{}
-(gdb)
+(@value{GDBP})
 @end smallexample
 
 We can expand macros and examine their definitions, even when the
@@ -6344,7 +6612,7 @@ program is not running.  @value{GDBN} uses the current listing position
 to decide which macro definitions are in scope:
 
 @smallexample
-(gdb) list main
+(@value{GDBP}) list main
 3
 4       #define M 42
 5       #define ADD(x) (M + x)
@@ -6355,18 +6623,18 @@ to decide which macro definitions are in scope:
 10        printf ("Hello, world!\n");
 11      #undef N
 12        printf ("We're so creative.\n");
-(gdb) info macro ADD
+(@value{GDBP}) info macro ADD
 Defined at /home/jimb/gdb/macros/play/sample.c:5
 #define ADD(x) (M + x)
-(gdb) info macro Q
+(@value{GDBP}) 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)
+(@value{GDBP}) macro expand ADD(1)
 expands to: (42 + 1)
-(gdb) macro expand-once ADD(1)
+(@value{GDBP}) macro expand-once ADD(1)
 expands to: once (M + 1)
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 In the example above, note that @command{macro expand-once} expands only
@@ -6378,27 +6646,27 @@ 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
+(@value{GDBP}) break main
 Breakpoint 1 at 0x8048370: file sample.c, line 10.
-(gdb) run
-Starting program: /home/jimb/gdb/macros/play/sample 
+(@value{GDBP}) run
+Starting program: /home/jimb/gdb/macros/play/sample
 
 Breakpoint 1, main () at sample.c:10
 10        printf ("Hello, world!\n");
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 At line 10, the definition of the macro @code{N} at line 9 is in force:
 
 @smallexample
-(gdb) info macro N
+(@value{GDBP}) info macro N
 Defined at /home/jimb/gdb/macros/play/sample.c:9
 #define N 28
-(gdb) macro expand N Q M
+(@value{GDBP}) macro expand N Q M
 expands to: 28 < 42
-(gdb) print N Q M
+(@value{GDBP}) print N Q M
 $1 = 1
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 As we step over directives that remove @code{N}'s definition, and then
@@ -6406,23 +6674,23 @@ give it a new definition, @value{GDBN} finds the definition (or lack
 thereof) in force at each point:
 
 @smallexample
-(gdb) next
+(@value{GDBP}) next
 Hello, world!
 12        printf ("We're so creative.\n");
-(gdb) info macro N
+(@value{GDBP}) 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
+(@value{GDBP}) next
 We're so creative.
 14        printf ("Goodbye, world!\n");
-(gdb) info macro N
+(@value{GDBP}) info macro N
 Defined at /home/jimb/gdb/macros/play/sample.c:13
 #define N 1729
-(gdb) macro expand N Q M
+(@value{GDBP}) macro expand N Q M
 expands to: 1729 < 42
-(gdb) print N Q M
+(@value{GDBP}) print N Q M
 $2 = 0
-(gdb) 
+(@value{GDBP})
 @end smallexample
 
 
@@ -6461,9 +6729,9 @@ tracepoints as of this writing.
 This chapter describes the tracepoint commands and features.
 
 @menu
-* Set Tracepoints::         
-* Analyze Collected Data::      
-* Tracepoint Variables::        
+* Set Tracepoints::
+* Analyze Collected Data::
+* Tracepoint Variables::
 @end menu
 
 @node Set Tracepoints
@@ -6488,12 +6756,12 @@ 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::  
+* Create and Delete Tracepoints::
+* Enable and Disable Tracepoints::
+* Tracepoint Passcounts::
+* Tracepoint Actions::
+* Listing Tracepoints::
+* Starting and Stopping Trace Experiment::
 @end menu
 
 @node Create and Delete Tracepoints
@@ -6592,7 +6860,7 @@ user.
 Examples:
 
 @smallexample
-(@value{GDBP}) @b{passcount 5 2} // Stop on the 5th execution of 
+(@value{GDBP}) @b{passcount 5 2} // Stop on the 5th execution of
 @exdent @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @code{// tracepoint 2}
 
 (@value{GDBP}) @b{passcount 12}  // Stop on the 12th execution of the
@@ -6764,7 +7032,7 @@ experiment.
 This command takes no arguments.  It ends the trace experiment, and
 stops collecting data.
 
-@strong{Note:} a trace experiment and data collection may stop
+@strong{Note}: a trace experiment and data collection may stop
 automatically if any tracepoint's passcount is reached
 (@pxref{Tracepoint Passcounts}), or if the trace buffer becomes full.
 
@@ -7220,14 +7488,13 @@ you can abbreviate this as @code{ov} or @code{ovly}.  The commands are:
 
 @table @code
 @item overlay off
-@kindex overlay off
+@kindex overlay
 Disable @value{GDBN}'s overlay support.  When overlay support is
 disabled, @value{GDBN} assumes that all functions and variables are
 always present at their mapped addresses.  By default, @value{GDBN}'s
 overlay support is disabled.
 
 @item overlay manual
-@kindex overlay manual
 @cindex manual overlay debugging
 Enable @dfn{manual} overlay debugging.  In this mode, @value{GDBN}
 relies on you to tell it which overlays are mapped, and which are not,
@@ -7236,7 +7503,6 @@ commands described below.
 
 @item overlay map-overlay @var{overlay}
 @itemx overlay map @var{overlay}
-@kindex overlay map-overlay
 @cindex map an overlay
 Tell @value{GDBN} that @var{overlay} is now mapped; @var{overlay} must
 be the name of the object file section containing the overlay.  When an
@@ -7247,7 +7513,6 @@ that any other overlays whose mapped ranges overlap that of
 
 @item overlay unmap-overlay @var{overlay}
 @itemx overlay unmap @var{overlay}
-@kindex overlay unmap-overlay
 @cindex unmap an overlay
 Tell @value{GDBN} that @var{overlay} is no longer mapped; @var{overlay}
 must be the name of the object file section containing the overlay.
@@ -7255,7 +7520,6 @@ When an overlay is unmapped, @value{GDBN} assumes it can find the
 overlay's functions and variables at their load addresses.
 
 @item overlay auto
-@kindex overlay auto
 Enable @dfn{automatic} overlay debugging.  In this mode, @value{GDBN}
 consults a data structure the overlay manager maintains in the inferior
 to see which overlays are mapped.  For details, see @ref{Automatic
@@ -7263,7 +7527,6 @@ Overlay Debugging}.
 
 @item overlay load-target
 @itemx overlay load
-@kindex overlay load-target
 @cindex reloading the overlay table
 Re-read the overlay table from the inferior.  Normally, @value{GDBN}
 re-reads the table @value{GDBN} automatically each time the inferior
@@ -7283,7 +7546,7 @@ Normally, when @value{GDBN} prints a code address, it includes the name
 of the function the address falls in:
 
 @smallexample
-(gdb) print main
+(@value{GDBP}) print main
 $3 = @{int ()@} 0x11a0 <main>
 @end smallexample
 @noindent
@@ -7293,9 +7556,9 @@ asterisks around them.  For example, if @code{foo} is a function in an
 unmapped overlay, @value{GDBN} prints it this way:
 
 @smallexample
-(gdb) overlay list
+(@value{GDBP}) overlay list
 No sections are mapped.
-(gdb) print foo
+(@value{GDBP}) print foo
 $5 = @{int (int)@} 0x100000 <*foo*>
 @end smallexample
 @noindent
@@ -7303,10 +7566,10 @@ When @code{foo}'s overlay is mapped, @value{GDBN} prints the function's
 name normally:
 
 @smallexample
-(gdb) overlay list
-Section .ov.foo.text, loaded at 0x100000 - 0x100034, 
+(@value{GDBP}) overlay list
+Section .ov.foo.text, loaded at 0x100000 - 0x100034,
         mapped at 0x1016 - 0x104a
-(gdb) print foo
+(@value{GDBP}) print foo
 $6 = @{int (int)@} 0x1016 <foo>
 @end smallexample
 
@@ -7387,7 +7650,7 @@ 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 
+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.
 
@@ -7511,6 +7774,11 @@ If a source file name ends in one of the following extensions, then
 @value{GDBN} infers that its language is the one indicated.
 
 @table @file
+@item .ada
+@itemx .ads
+@itemx .adb
+@itemx .a
+Ada source file.
 
 @item .c
 C source file
@@ -7600,8 +7868,6 @@ The following commands help you find out which language is the
 working language, and also what language source files were written in.
 
 @kindex show language
-@kindex info frame@r{, show the source language}
-@kindex info source@r{, show the source language}
 @table @code
 @item show language
 Display the current working language.  This is the
@@ -7609,12 +7875,14 @@ language you can use with commands such as @code{print} to
 build and compute expressions that may involve variables in your program.
 
 @item info frame
+@kindex info frame@r{, show the source language}
 Display the source language for this frame.  This language becomes the
 working language if you use an identifier from this frame.
 @xref{Frame Info, ,Information about a frame}, to identify the other
 information listed here.
 
 @item info source
+@kindex info source@r{, show the source language}
 Display the source language of this source file.
 @xref{Symbols, ,Examining the Symbol Table}, to identify the other
 information listed here.
@@ -7709,7 +7977,6 @@ details on specific languages.
 
 @value{GDBN} provides some additional commands for controlling the type checker:
 
-@kindex set check@r{, type}
 @kindex set check type
 @kindex show check type
 @table @code
@@ -7770,7 +8037,6 @@ Supported languages}, for further details on specific languages.
 
 @value{GDBN} provides some additional commands for controlling the range checker:
 
-@kindex set check@r{, range}
 @kindex set check range
 @kindex show check range
 @table @code
@@ -7801,7 +8067,7 @@ being set automatically by @value{GDBN}.
 @node Support
 @section Supported languages
 
-@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, and Modula-2.
+@value{GDBN} supports C, C@t{++}, Objective-C, Fortran, Java, assembly, Modula-2, and Ada.
 @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,
@@ -7819,8 +8085,9 @@ language reference or tutorial.
 
 @menu
 * C::                           C and C@t{++}
-* Objective-C::                 Objective-C             
+* Objective-C::                 Objective-C
 * Modula-2::                    Modula-2
+* Ada::                         Ada
 @end menu
 
 @node C
@@ -8345,8 +8612,8 @@ This section provides information about some commands and command
 options that are useful for debugging Objective-C code.
 
 @menu
-* Method Names in Commands::    
-* The Print Command with Objective-C::  
+* Method Names in Commands::
+* The Print Command with Objective-C::
 @end menu
 
 @node Method Names in Commands, The Print Command with Objective-C, Objective-C, Objective-C
@@ -8374,12 +8641,13 @@ A fully qualified Objective-C method name is specified as
 -[@var{Class} @var{methodName}]
 @end smallexample
 
-where the minus sign is used to indicate an instance method and a plus
-sign (not shown) is used to indicate a class method. The
-class name @var{Class} and method name @var{methoName} are enclosed in
-brackets, similar to the way messages are specified in Objective-C source
-code. For example, to set a breakpoint at the @code{create} instance method of 
-class @code{Fruit} in the program currently being debugged, enter:
+where the minus sign is used to indicate an instance method and a
+plus sign (not shown) is used to indicate a class method.  The class
+name @var{Class} and method name @var{methodName} are enclosed in
+brackets, similar to the way messages are specified in Objective-C
+source code.  For example, to set a breakpoint at the @code{create}
+instance method of class @code{Fruit} in the program currently being
+debugged, enter:
 
 @smallexample
 break -[Fruit create]
@@ -8392,10 +8660,10 @@ enter:
 list +[NSText initialize]
 @end smallexample
 
-In the current version of GDB, the plus or minus sign is required.  In
-future versions of GDB, the plus or minus sign will be optional, but you
-can use it to narrow the search.  It is also possible to specify just a
-method name:
+In the current version of @value{GDBN}, the plus or minus sign is
+required.  In future versions of @value{GDBN}, the plus or minus
+sign will be optional, but you can use it to narrow the search.  It
+is also possible to specify just a method name:
 
 @smallexample
 break create
@@ -8416,22 +8684,26 @@ clear -[NSWindow makeKeyAndOrderFront:]
 
 @node The Print Command with Objective-C
 @subsubsection The Print Command With Objective-C
+@kindex print-object
+@kindex po @r{(@code{print-object})}
 
-The print command has also been extended to accept methods. For example:
+The print command has also been extended to accept methods.  For example:
 
 @smallexample
-print -[object hash]
+print -[@var{object} hash]
 @end smallexample
 
 @cindex print an Objective-C object description
-will tell gdb to send the -hash message to object and print the
-result. Also an additional command has been added, @code{print-object}
-or @code{po} for short, which is meant to print the description of an
-object. However, this command may only work with certain Objective-C
-libraries that have a particular hook function, called
-@code{_NSPrintForDebugger} defined.
-
-@node Modula-2,  , Objective-C, Support
+@cindex @code{_NSPrintForDebugger}, and printing Objective-C objects
+@noindent
+will tell @value{GDBN} to send the @code{hash} message to @var{object}
+and print the result.  Also, an additional command has been added,
+@code{print-object} or @code{po} for short, which is meant to print
+the description of an object.  However, this command may only work
+with certain Objective-C libraries that have a particular hook
+function, @code{_NSPrintForDebugger}, defined.
+
+@node Modula-2, Ada, Objective-C, Support
 @subsection Modula-2
 
 @cindex Modula-2, @value{GDBN} support
@@ -8874,6 +9146,341 @@ 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 Ada
+@subsection Ada
+@cindex Ada
+
+The extensions made to @value{GDBN} for Ada only support
+output from the @sc{gnu} Ada (GNAT) compiler.
+Other Ada compilers are not currently supported, and
+attempting to debug executables produced by them is most likely
+to be difficult.
+
+
+@cindex expressions in Ada
+@menu
+* Ada Mode Intro::              General remarks on the Ada syntax 
+                                   and semantics supported by Ada mode 
+                                   in @value{GDBN}.
+* Omissions from Ada::          Restrictions on the Ada expression syntax.
+* Additions to Ada::            Extensions of the Ada expression syntax.
+* Stopping Before Main Program:: Debugging the program during elaboration.
+* Ada Glitches::                Known peculiarities of Ada mode.
+@end menu
+
+@node Ada Mode Intro
+@subsubsection Introduction
+@cindex Ada mode, general
+
+The Ada mode of @value{GDBN} supports a fairly large subset of Ada expression 
+syntax, with some extensions.
+The philosophy behind the design of this subset is 
+
+@itemize @bullet
+@item
+That @value{GDBN} should provide basic literals and access to operations for 
+arithmetic, dereferencing, field selection, indexing, and subprogram calls, 
+leaving more sophisticated computations to subprograms written into the
+program (which therefore may be called from @value{GDBN}).
+
+@item 
+That type safety and strict adherence to Ada language restrictions
+are not particularly important to the @value{GDBN} user.
+
+@item 
+That brevity is important to the @value{GDBN} user.
+@end itemize
+
+Thus, for brevity, the debugger acts as if there were 
+implicit @code{with} and @code{use} clauses in effect for all user-written 
+packages, making it unnecessary to fully qualify most names with 
+their packages, regardless of context.  Where this causes ambiguity, 
+@value{GDBN} asks the user's intent.
+
+The debugger will start in Ada mode if it detects an Ada main program. 
+As for other languages, it will enter Ada mode when stopped in a program that
+was translated from an Ada source file.
+
+While in Ada mode, you may use `@t{--}' for comments.  This is useful 
+mostly for documenting command files.  The standard @value{GDBN} comment 
+(@samp{#}) still works at the beginning of a line in Ada mode, but not in the 
+middle (to allow based literals).
+
+The debugger supports limited overloading.  Given a subprogram call in which
+the function symbol has multiple definitions, it will use the number of 
+actual parameters and some information about their types to attempt to narrow
+the set of definitions.  It also makes very limited use of context, preferring
+procedures to functions in the context of the @code{call} command, and
+functions to procedures elsewhere. 
+
+@node Omissions from Ada
+@subsubsection Omissions from Ada
+@cindex Ada, omissions from
+
+Here are the notable omissions from the subset:
+
+@itemize @bullet
+@item
+Only a subset of the attributes are supported:
+
+@itemize @minus
+@item
+@t{'First}, @t{'Last}, and @t{'Length}
+ on array objects (not on types and subtypes).
+
+@item
+@t{'Min} and @t{'Max}.  
+
+@item 
+@t{'Pos} and @t{'Val}. 
+
+@item
+@t{'Tag}.
+
+@item
+@t{'Range} on array objects (not subtypes), but only as the right
+operand of the membership (@code{in}) operator.
+
+@item 
+@t{'Access}, @t{'Unchecked_Access}, and 
+@t{'Unrestricted_Access} (a GNAT extension).
+
+@item
+@t{'Address}.
+@end itemize
+
+@item
+The names in
+@code{Characters.Latin_1} are not available and
+concatenation is not implemented.  Thus, escape characters in strings are 
+not currently available.
+
+@item
+Equality tests (@samp{=} and @samp{/=}) on arrays test for bitwise
+equality of representations.  They will generally work correctly
+for strings and arrays whose elements have integer or enumeration types.
+They may not work correctly for arrays whose element
+types have user-defined equality, for arrays of real values 
+(in particular, IEEE-conformant floating point, because of negative
+zeroes and NaNs), and for arrays whose elements contain unused bits with
+indeterminate values.  
+
+@item
+The other component-by-component array operations (@code{and}, @code{or}, 
+@code{xor}, @code{not}, and relational tests other than equality)
+are not implemented. 
+
+@item 
+There are no record or array aggregates.
+
+@item
+Calls to dispatching subprograms are not implemented.
+
+@item
+The overloading algorithm is much more limited (i.e., less selective)
+than that of real Ada.  It makes only limited use of the context in which a subexpression
+appears to resolve its meaning, and it is much looser in its rules for allowing
+type matches.  As a result, some function calls will be ambiguous, and the user
+will be asked to choose the proper resolution.
+
+@item
+The @code{new} operator is not implemented.
+
+@item
+Entry calls are not implemented.
+
+@item 
+Aside from printing, arithmetic operations on the native VAX floating-point 
+formats are not supported.
+
+@item
+It is not possible to slice a packed array.
+@end itemize
+
+@node Additions to Ada
+@subsubsection Additions to Ada
+@cindex Ada, deviations from 
+
+As it does for other languages, @value{GDBN} makes certain generic
+extensions to Ada (@pxref{Expressions}):
+
+@itemize @bullet
+@item
+If the expression @var{E} is a variable residing in memory 
+(typically a local variable or array element) and @var{N} is 
+a positive integer, then @code{@var{E}@@@var{N}} displays the values of
+@var{E} and the @var{N}-1 adjacent variables following it in memory as an array.  
+In Ada, this operator is generally not necessary, since its prime use
+is in displaying parts of an array, and slicing will usually do this in Ada.
+However, there are occasional uses when debugging programs
+in which certain debugging information has been optimized away.
+
+@item
+@code{@var{B}::@var{var}} means ``the variable named @var{var} that appears
+in function or file @var{B}.''  When @var{B} is a file name, you must typically
+surround it in single quotes.
+
+@item 
+The expression @code{@{@var{type}@} @var{addr}} means ``the variable of type
+@var{type} that appears at address @var{addr}.''
+
+@item
+A name starting with @samp{$} is a convenience variable 
+(@pxref{Convenience Vars}) or a machine register (@pxref{Registers}).
+@end itemize
+
+In addition, @value{GDBN} provides a few other shortcuts and outright additions specific 
+to Ada:
+
+@itemize @bullet
+@item 
+The assignment statement is allowed as an expression, returning
+its right-hand operand as its value.  Thus, you may enter
+
+@smallexample
+set x := y + 3
+print A(tmp := y + 1)
+@end smallexample
+
+@item 
+The semicolon is allowed as an ``operator,''  returning as its value 
+the value of its right-hand operand.
+This allows, for example,
+complex conditional breaks:
+
+@smallexample
+break f
+condition 1 (report(i); k += 1; A(k) > 100)
+@end smallexample
+
+@item 
+Rather than use catenation and symbolic character names to introduce special 
+characters into strings, one may instead use a special bracket notation, 
+which is also used to print strings.  A sequence of characters of the form 
+@samp{["@var{XX}"]} within a string or character literal denotes the 
+(single) character whose numeric encoding is @var{XX} in hexadecimal.  The
+sequence of characters @samp{["""]} also denotes a single quotation mark 
+in strings.   For example,
+@smallexample
+   "One line.["0a"]Next line.["0a"]"
+@end smallexample
+@noindent
+contains an ASCII newline character (@code{Ada.Characters.Latin_1.LF}) after each
+period.
+
+@item
+The subtype used as a prefix for the attributes @t{'Pos}, @t{'Min}, and
+@t{'Max} is optional (and is ignored in any case).  For example, it is valid
+to write
+
+@smallexample
+print 'max(x, y)
+@end smallexample
+
+@item
+When printing arrays, @value{GDBN} uses positional notation when the 
+array has a lower bound of 1, and uses a modified named notation otherwise.
+For example, a one-dimensional array of three integers with a lower bound of 3 might print as
+
+@smallexample
+(3 => 10, 17, 1)
+@end smallexample
+
+@noindent
+That is, in contrast to valid Ada, only the first component has a @code{=>} 
+clause.
+
+@item
+You may abbreviate attributes in expressions with any unique,
+multi-character subsequence of 
+their names (an exact match gets preference).
+For example, you may use @t{a'len}, @t{a'gth}, or @t{a'lh}
+in place of  @t{a'length}.
+
+@item
+@cindex quoting Ada internal identifiers
+Since Ada is case-insensitive, the debugger normally maps identifiers you type 
+to lower case.  The GNAT compiler uses upper-case characters for 
+some of its internal identifiers, which are normally of no interest to users.
+For the rare occasions when you actually have to look at them,
+enclose them in angle brackets to avoid the lower-case mapping. 
+For example,
+@smallexample
+@value{GDBP} print <JMPBUF_SAVE>[0]
+@end smallexample
+
+@item
+Printing an object of class-wide type or dereferencing an 
+access-to-class-wide value will display all the components of the object's
+specific type (as indicated by its run-time tag).  Likewise, component
+selection on such a value will operate on the specific type of the
+object.
+
+@end itemize
+
+@node Stopping Before Main Program
+@subsubsection Stopping at the Very Beginning
+
+@cindex breakpointing Ada elaboration code
+It is sometimes necessary to debug the program during elaboration, and
+before reaching the main procedure.
+As defined in the Ada Reference
+Manual, the elaboration code is invoked from a procedure called
+@code{adainit}.  To run your program up to the beginning of
+elaboration, simply use the following two commands:
+@code{tbreak adainit} and @code{run}.
+
+@node Ada Glitches
+@subsubsection Known Peculiarities of Ada Mode
+@cindex Ada, problems
+
+Besides the omissions listed previously (@pxref{Omissions from Ada}),
+we know of several problems with and limitations of Ada mode in
+@value{GDBN},
+some of which will be fixed with planned future releases of the debugger 
+and the GNU Ada compiler.
+
+@itemize @bullet
+@item
+Currently, the debugger 
+has insufficient information to determine whether certain pointers represent
+pointers to objects or the objects themselves.
+Thus, the user may have to tack an extra @code{.all} after an expression
+to get it printed properly.
+
+@item 
+Static constants that the compiler chooses not to materialize as objects in 
+storage are invisible to the debugger.
+
+@item
+Named parameter associations in function argument lists are ignored (the
+argument lists are treated as positional).
+
+@item
+Many useful library packages are currently invisible to the debugger.
+
+@item
+Fixed-point arithmetic, conversions, input, and output is carried out using 
+floating-point arithmetic, and may give results that only approximate those on 
+the host machine.
+
+@item
+The type of the @t{'Address} attribute may not be @code{System.Address}.
+
+@item
+The GNAT compiler never generates the prefix @code{Standard} for any of 
+the standard symbols defined by the Ada language.  @value{GDBN} knows about 
+this: it will strip the prefix from names when you use it, and will never
+look for a name you have so qualified among local symbols, nor match against
+symbols in other packages or subprograms.  If you have 
+defined entities anywhere in your program other than parameters and 
+local variables whose simple names match names in @code{Standard}, 
+GNAT's lack of qualification here can cause confusion.  When this happens,
+you can usually resolve the confusion 
+by qualifying the problematic names with package
+@code{Standard} explicitly.  
+@end itemize
+
 @node Unsupported languages
 @section Unsupported languages
 
@@ -9073,8 +9680,8 @@ Print the names and data types of all defined functions
 whose names contain a match for regular expression @var{regexp}.
 Thus, @samp{info fun step} finds all functions whose names
 include @code{step}; @samp{info fun ^step} finds those whose names
-start with @code{step}.  If a function name contains characters 
-that conflict with the regular expression language (eg. 
+start with @code{step}.  If a function name contains characters
+that conflict with the regular expression language (eg.
 @samp{operator*()}), they may be quoted with a backslash.
 
 @kindex info variables
@@ -9205,7 +9812,7 @@ structure in more detail.  For example:
 (@value{GDBP}) maint info psymtabs dwarf2read
 @{ objfile /home/gnu/build/gdb/gdb
   ((struct objfile *) 0x82e69d0)
-  @{ psymtab /home/gnu/src/gdb/dwarf2read.c 
+  @{ psymtab /home/gnu/src/gdb/dwarf2read.c
     ((struct partial_symtab *) 0x8474b10)
     readin no
     fullname (null)
@@ -9230,9 +9837,9 @@ read the symtab for the compilation unit containing that function:
 Breakpoint 1 at 0x814e5da: file /home/gnu/src/gdb/dwarf2read.c,
 line 1574.
 (@value{GDBP}) maint info symtabs
-@{ objfile /home/gnu/build/gdb/gdb 
+@{ objfile /home/gnu/build/gdb/gdb
   ((struct objfile *) 0x82e69d0)
-  @{ symtab /home/gnu/src/gdb/dwarf2read.c 
+  @{ symtab /home/gnu/src/gdb/dwarf2read.c
     ((struct symtab *) 0x86c1f38)
     dirname (null)
     fullname (null)
@@ -9240,7 +9847,7 @@ line 1574.
     debugformat DWARF 2
   @}
 @}
-(@value{GDBP}) 
+(@value{GDBP})
 @end smallexample
 @end table
 
@@ -9490,18 +10097,35 @@ selected stack frame returns naturally.
 @node Calling
 @section Calling program functions
 
+@table @code
 @cindex calling functions
+@cindex inferior functions, calling
+@item print @var{expr}
+Evaluate the expression @var{expr} and displaying the resuling value.
+@var{expr} may include calls to functions in the program being
+debugged.
+
 @kindex call
-@table @code
 @item call @var{expr}
 Evaluate the expression @var{expr} without displaying @code{void}
 returned values.
-@end table
 
 You can use this variant of the @code{print} command if you want to
-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.
+execute a function from your program that does not return anything
+(a.k.a.@: @dfn{a void function}), but without cluttering the output
+with @code{void} returned values that @value{GDBN} will otherwise
+print.  If the result is not void, it is printed and saved in the
+value history.
+@end table
+
+@cindex weak alias functions
+Sometimes, a function you wish to call is actually a @dfn{weak alias}
+for another function.  In such case, @value{GDBN} might not pick up
+the type information, including the types of the function arguments,
+which causes @value{GDBN} to call the inferior function incorrectly.
+As a result, the called function will function erroneously and may
+even crash.  A solution to that is to use the name of the aliased
+function instead.
 
 @node Patching
 @section Patching programs
@@ -9586,9 +10210,9 @@ On systems with memory-mapped files, an auxiliary file named
 @var{filename}.  If so, @value{GDBN} maps in the symbol table from
 @file{@var{filename}.syms}, starting up more quickly.  See the
 descriptions of the file options @samp{-mapped} and @samp{-readnow}
-(available on the command line, and with the commands @code{file},
-@code{symbol-file}, or @code{add-symbol-file}, described below),
-for more information.
+(available on the command line, see @ref{File Options, , -readnow},
+and with the commands @code{file}, @code{symbol-file}, or
+@code{add-symbol-file}, described below), for more information.
 
 @item file
 @code{file} with no argument makes @value{GDBN} discard any information it
@@ -9689,9 +10313,9 @@ symbol table.  It cannot be shared across multiple host platforms.
 @c (eg rooted in val of env var GDBSYMS) could exist for mappable symbol
 @c files.
 
-@kindex core
 @kindex core-file
 @item core-file @r{[} @var{filename} @r{]}
+@itemx core
 Specify the whereabouts of a core dump file to be used as the ``contents
 of memory''.  Traditionally, core files contain only some parts of the
 address space of the process that generated them; @value{GDBN} can access the
@@ -9754,7 +10378,7 @@ Some embedded operating systems, like Sun Chorus and VxWorks, can load
 relocatable files into an already running program; such systems
 typically make the requirements above easy to meet.  However, it's
 important to recognize that many native systems use complex link
-procedures (@code{.linkonce} section factoring and C++ constructor table
+procedures (@code{.linkonce} section factoring and C@t{++} constructor table
 assembly, for example) that make the requirements difficult to meet.  In
 general, one cannot assume that using @code{add-symbol-file} to read a
 relocatable object file's symbolic information will have the same effect
@@ -9896,6 +10520,16 @@ informs @value{GDBN} that a new library has been loaded.  If @var{mode}
 is @code{off}, symbols must be loaded manually, using the
 @code{sharedlibrary} command.  The default value is @code{on}.
 
+@cindex memory used for symbol tables
+If your program uses lots of shared libraries with debug info that
+takes large amounts of memory, you can decrease the @value{GDBN}
+memory footprint by preventing it from automatically loading the
+symbols from shared libraries.  To that end, type @kbd{set
+auto-solib-add off} before running the inferior, then load each
+library whose debug symbols you do need with @kbd{sharedlibrary
+@var{regexp}}, where @var{regexp} is a regular expresion that matches
+the libraries whose symbols you want to be loaded.
+
 @kindex show auto-solib-add
 @item show auto-solib-add
 Display the current autoloading mode.
@@ -10109,7 +10743,7 @@ 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}
+@kindex gnu_debuglink_crc32
 @smallexample
 unsigned long
 gnu_debuglink_crc32 (unsigned long crc,
@@ -10381,22 +11015,24 @@ Use the @code{show gnutarget} command to display what file format
 and @code{show gnutarget} displays @samp{The current BDF target is "auto"}.
 @end table
 
+@cindex common targets
 Here are some common targets (available, or not, depending on the GDB
 configuration):
 
 @table @code
-@kindex target exec
+@kindex target
 @item target exec @var{program}
+@cindex executable file target
 An executable file.  @samp{target exec @var{program}} is the same as
 @samp{exec-file @var{program}}.
 
-@kindex target core
 @item target core @var{filename}
+@cindex core dump file target
 A core dump file.  @samp{target core @var{filename}} is the same as
 @samp{core-file @var{filename}}.
 
-@kindex target remote
 @item target remote @var{dev}
+@cindex remote target
 Remote serial target in GDB-specific protocol.  The argument @var{dev}
 specifies what serial device to use for the connection (e.g.
 @file{/dev/ttya}). @xref{Remote, ,Remote debugging}.  @code{target remote}
@@ -10404,8 +11040,8 @@ supports the @code{load} command.  This is only useful if you have
 some other way of getting the stub to the target system, and you can put
 it somewhere in memory where it won't get clobbered by the download.
 
-@kindex target sim
 @item target sim
+@cindex built-in simulator target
 Builtin CPU simulator.  @value{GDBN} includes simulators for most architectures.
 In general,
 @smallexample
@@ -10426,8 +11062,8 @@ Some configurations may include these targets as well:
 
 @table @code
 
-@kindex target nrom
 @item target nrom @var{dev}
+@cindex NetROM ROM emulator target
 NetROM ROM emulator.  This target only supports downloading.
 
 @end table
@@ -10468,7 +11104,7 @@ specifies a fixed address.
 @cindex choosing target byte order
 @cindex target byte order
 
-Some types of processors, such as the MIPS, PowerPC, and Hitachi SH,
+Some types of processors, such as the MIPS, PowerPC, and Renesas SH,
 offer the ability to run either big-endian or little-endian byte
 orders.  Usually the executable or symbol will include a bit to
 designate the endian-ness, and you will not need to worry about
@@ -10476,15 +11112,13 @@ which to use.  However, you may still find it useful to adjust
 @value{GDBN}'s idea of processor endian-ness manually.
 
 @table @code
-@kindex set endian big
+@kindex set endian
 @item set endian big
 Instruct @value{GDBN} to assume the target is big-endian.
 
-@kindex set endian little
 @item set endian little
 Instruct @value{GDBN} to assume the target is little-endian.
 
-@kindex set endian auto
 @item set endian auto
 Instruct @value{GDBN} to use the byte order associated with the
 executable.
@@ -10520,9 +11154,7 @@ configuration of @value{GDBN}; use @code{help target} to list them.
 
 @node KOD
 @section Kernel Object Display
-
 @cindex kernel object display
-@cindex kernel object
 @cindex KOD
 
 Some targets support kernel object display.  Using this facility,
@@ -10531,6 +11163,7 @@ and can display information about operating system-level objects such as
 mutexes and other synchronization objects.  Exactly which objects can be
 displayed is determined on a per-OS basis.
 
+@kindex set os
 Use the @code{set os} command to set the operating system.  This tells
 @value{GDBN} which kernel object display module to initialize:
 
@@ -10538,11 +11171,17 @@ Use the @code{set os} command to set the operating system.  This tells
 (@value{GDBP}) set os cisco
 @end smallexample
 
+@kindex show os
+The associated command @code{show os} displays the operating system
+set with the @code{set os} command; if no operating system has been
+set, @code{show os} will display an empty string @samp{""}.
+
 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:
 
+@kindex info cisco
 @smallexample
 (@value{GDBP}) info cisco
 List of Cisco Kernel Objects
@@ -10553,8 +11192,10 @@ any        Any and all objects
 Further subcommands can be used to query about particular objects known
 by the kernel.
 
-There is currently no way to determine whether a given operating system
-is supported other than to try it.
+There is currently no way to determine whether a given operating
+system is supported other than to try setting it with @kbd{set os
+@var{name}}, where @var{name} is the name of the operating system you
+want to try.
 
 
 @node Remote Debugging
@@ -10915,9 +11556,9 @@ For Motorola 680x0 architectures.
 
 @item sh-stub.c
 @cindex @file{sh-stub.c}
-@cindex Hitachi
+@cindex Renesas
 @cindex SH
-For Hitachi SH architectures.
+For Renesas SH architectures.
 
 @item sparc-stub.c
 @cindex @file{sparc-stub.c}
@@ -10950,14 +11591,14 @@ subroutines:
 
 @table @code
 @item set_debug_traps
-@kindex set_debug_traps
+@findex set_debug_traps
 @cindex remote serial stub, initialization
 This routine arranges for @code{handle_exception} to run when your
 program stops.  You must call this subroutine explicitly near the
 beginning of your program.
 
 @item handle_exception
-@kindex handle_exception
+@findex handle_exception
 @cindex remote serial stub, main routine
 This is the central workhorse, but your program never calls it
 explicitly---the setup code arranges for @code{handle_exception} to
@@ -11005,13 +11646,13 @@ serial port.
 
 @table @code
 @item int getDebugChar()
-@kindex getDebugChar
+@findex getDebugChar
 Write this subroutine to read a single character from the serial port.
 It may be identical to @code{getchar} for your target system; a
 different name is used to allow you to distinguish the two if you wish.
 
 @item void putDebugChar(int)
-@kindex putDebugChar
+@findex putDebugChar
 Write this subroutine to write a single character to the serial port.
 It may be identical to @code{putchar} for your target system; a
 different name is used to allow you to distinguish the two if you wish.
@@ -11034,7 +11675,7 @@ Other routines you need to supply are:
 
 @table @code
 @item void exceptionHandler (int @var{exception_number}, void *@var{exception_address})
-@kindex exceptionHandler
+@findex exceptionHandler
 Write this function to install @var{exception_address} in the exception
 handling tables.  You need to do this because the stub does not have any
 way of knowing what the exception handling tables on your target system
@@ -11056,7 +11697,7 @@ should be at privilege level 0 (the most privileged level).  The
 help from @code{exceptionHandler}.
 
 @item void flush_i_cache()
-@kindex flush_i_cache
+@findex flush_i_cache
 On @sc{sparc} and @sc{sparclite} only, write this subroutine to flush the
 instruction cache, if any, on your target machine.  If there is no
 instruction cache, this subroutine may be a no-op.
@@ -11070,7 +11711,7 @@ You must also make sure this library routine is available:
 
 @table @code
 @item void *memset(void *, int, int)
-@kindex memset
+@findex memset
 This is the standard library function @code{memset} that sets an area of
 memory to a known value.  If you have one of the free versions of
 @code{libc.a}, @code{memset} can be found there; otherwise, you must
@@ -11170,6 +11811,7 @@ configurations.
 
 @menu
 * HP-UX::                       HP-UX
+* BSD libkvm Interface::       Debugging BSD kernel memory images
 * SVR4 Process Information::    SVR4 process information
 * DJGPP Native::                Features specific to the DJGPP port
 * Cygwin Native::              Features specific to the Cygwin port
@@ -11182,30 +11824,104 @@ 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.
 
-@node SVR4 Process Information
-@subsection SVR4 process information
+@node BSD libkvm Interface
+@subsection BSD libkvm Interface
 
-@kindex /proc
-@cindex process image
+@cindex libkvm
+@cindex kernel memory image
+@cindex kernel crash dump
 
-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.
+BSD-derived systems (FreeBSD/NetBSD/OpenBSD) have a kernel memory
+interface that provides a uniform interface for accessing kernel virtual
+memory images, including live systems and crash dumps.  @value{GDBN}
+uses this interface to allow you to debug live kernels and kernel crash
+dumps on many native BSD configurations.  This is implemented as a
+special @code{kvm} debugging target.  For debugging a live system, load
+the currently running kernel into @value{GDBN} and connect to the
+@code{kvm} target:
+
+@smallexample
+(@value{GDBP}) @b{target kvm}
+@end smallexample
+
+For debugging crash dumps, provide the file name of the crash dump as an
+argument:
+
+@smallexample
+(@value{GDBP}) @b{target kvm /var/crash/bsd.0}
+@end smallexample
+
+Once connected to the @code{kvm} target, the following commands are
+available:
+
+@table @code
+@kindex kvm
+@item kvm pcb
+Set current context from pcb address.
+
+@item kvm proc
+Set current context from proc address.  This command isn't available on
+modern FreeBSD systems.
+@end table
+
+@node SVR4 Process Information
+@subsection SVR4 process information
+@cindex /proc
+@cindex examine process image
+@cindex process info via @file{/proc}
+
+Many versions of SVR4 and compatible systems 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 information about the process running
+your program, or about any process running on your system.  @code{info
+proc} works only on SVR4 systems that include the @code{procfs} code.
+This includes, as of this writing, @sc{gnu}/Linux, OSF/1 (Digital
+Unix), Solaris, Irix, and Unixware, but not HP-UX, for example.
 
 @table @code
 @kindex info proc
+@cindex process ID
 @item info proc
-Summarize available information about the process.
+@itemx info proc @var{process-id}
+Summarize available information about any running process.  If a
+process ID is specified by @var{process-id}, display information about
+that process; otherwise display information about the program being
+debugged.  The summary includes the debugged process ID, the command
+line used to invoke it, its current working directory, and its
+executable file's absolute file name.
+
+On some systems, @var{process-id} can be of the form
+@samp{[@var{pid}]/@var{tid}} which specifies a certain thread ID
+within a process.  If the optional @var{pid} part is missing, it means
+a thread from the process being debugged (the leading @samp{/} still
+needs to be present, or else @value{GDBN} will interpret the number as
+a process ID rather than a thread ID).
 
-@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.
+@cindex memory address space mappings
+Report the memory address space ranges accessible in the program, with
+information on whether the process has read, write, or execute access
+rights to each range.  On @sc{gnu}/Linux systems, each memory range
+includes the object file which is mapped to that range, instead of the
+memory access rights to that range.
+
+@item info proc stat
+@itemx info proc status
+@cindex process detailed status information
+These subcommands are specific to @sc{gnu}/Linux systems.  They show
+the process-related information, including the user ID and group ID;
+how many threads are there in the process; its virtual memory usage;
+the signals that are pending, blocked, and ignored; its TTY; its
+consumption of system and user time; its stack size; its @samp{nice}
+value; etc.  For more information, see the @samp{proc(5)} man page
+(type @kbd{man 5 proc} from your shell prompt).
+
+@item info proc all
+Show all the information about the process described under all of the
+above @code{info proc} subcommands.
+
 @ignore
 @comment These sub-options of 'info proc' were not included when
 @comment procfs.c was re-written.  Keep their descriptions around
@@ -11219,15 +11935,6 @@ its children.
 @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.
-
-@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.
-
-@item info proc all
-Show all the above information about the process.
 @end ignore
 @end table
 
@@ -11335,10 +12042,10 @@ 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:
 
-@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} 
+@exdent @code{Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30}
 @end smallexample
 
 @noindent
@@ -11407,9 +12114,9 @@ This is a Cygwin specific alias of info shared.
 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 
+@kindex set new-console
 @item set new-console @var{mode}
-If @var{mode} is @code{on} the debuggee will 
+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.
@@ -11436,17 +12143,17 @@ 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 
+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 
+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 
+This boolean value adds debug ouptut concerning memory events
 seen by the debugger.
 
 @kindex set shell
@@ -11508,7 +12215,7 @@ some confusion. If in doubt, try the @code{info functions} and
 @pxref{Symbols}). Here's an example:
 
 @smallexample
-(gdb) info function CreateFileA
+(@value{GDBP}) info function CreateFileA
 All functions matching regular expression "CreateFileA":
 
 Non-debugging symbols:
@@ -11517,7 +12224,7 @@ Non-debugging symbols:
 @end smallexample
 
 @smallexample
-(gdb) info function !
+(@value{GDBP}) info function !
 All functions matching regular expression "!":
 
 Non-debugging symbols:
@@ -11544,28 +12251,28 @@ type information in the command. Here's an example of the type of
 problem:
 
 @smallexample
-(gdb) print 'cygwin1!__argv'
+(@value{GDBP}) print 'cygwin1!__argv'
 $1 = 268572168
 @end smallexample
 
 @smallexample
-(gdb) x 'cygwin1!__argv'
+(@value{GDBP}) x 'cygwin1!__argv'
 0x10021610:      "\230y\""
 @end smallexample
 
 And two possible solutions:
 
 @smallexample
-(gdb) print ((char **)'cygwin1!__argv')[0]
+(@value{GDBP}) print ((char **)'cygwin1!__argv')[0]
 $2 = 0x22fd98 "/cygdrive/c/mydirectory/myprogram"
 @end smallexample
 
 @smallexample
-(gdb) x/2x &'cygwin1!__argv'
+(@value{GDBP}) x/2x &'cygwin1!__argv'
 0x610c0aa8 <cygwin1!__argv>:    0x10021608      0x00000000
-(gdb) x/x 0x10021608
+(@value{GDBP}) x/x 0x10021608
 0x10021608:     0x0022fd98
-(gdb) x/s 0x0022fd98
+(@value{GDBP}) x/s 0x0022fd98
 0x22fd98:        "/cygdrive/c/mydirectory/myprogram"
 @end smallexample
 
@@ -11576,7 +12283,7 @@ function's frame set-up code. You can work around this by using ``*&''
 to set the breakpoint at a raw memory address:
 
 @smallexample
-(gdb) break *&'python22!PyOS_Readline'
+(@value{GDBP}) break *&'python22!PyOS_Readline'
 Breakpoint 1 at 0x1e04eff0
 @end smallexample
 
@@ -11637,7 +12344,7 @@ The following information on connecting to VxWorks was current when
 this manual was produced; newer releases of VxWorks may use revised
 procedures.
 
-@kindex INCLUDE_RDB
+@findex 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
@@ -11769,15 +12476,15 @@ configurations.
 
 @menu
 * ARM::                         ARM
-* H8/300::                      Hitachi H8/300
-* H8/500::                      Hitachi H8/500
-* M32R/D::                      Mitsubishi M32R/D
+* H8/300::                      Renesas H8/300
+* H8/500::                      Renesas H8/500
+* M32R/D::                      Renesas M32R/D
 * M68K::                        Motorola M68K
 * MIPS Embedded::               MIPS Embedded
 * OpenRISC 1000::               OpenRisc 1000
 * PA::                          HP PA Embedded
 * PowerPC:                      PowerPC
-* SH::                          Hitachi SH
+* SH::                          Renesas SH
 * Sparclet::                    Tsqware Sparclet
 * Sparclite::                   Fujitsu Sparclite
 * ST2000::                      Tandem ST2000
@@ -11802,50 +12509,50 @@ ARM Demon monitor.
 @end table
 
 @node H8/300
-@subsection Hitachi H8/300
+@subsection Renesas H8/300
 
 @table @code
 
 @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.
+A Renesas 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.
+E7000 emulator for Renesas 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.
+Renesas 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
+@cindex download to Renesas SH
+@cindex Renesas SH download
+When you select remote debugging to a Renesas SH, H8/300, or H8/500
+board, the @code{load} command downloads your program to the Renesas
 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:
+Renesas 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,
+for Renesas microprocessors, or @samp{target e7000}, the in-circuit
+emulator for the Renesas SH and the Renesas 300H.  (@samp{target hms} is
+the default when @value{GDBN} is configured specifically for the Renesas SH,
 H8/300, or H8/500.)
 
 @item
-what serial device connects your host to your Hitachi board (the first
+what serial device connects your host to your Renesas board (the first
 serial device available on your host is the default).
 
 @item
@@ -11853,24 +12560,24 @@ 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.
+* Renesas Boards::      Connecting to Renesas boards.
+* Renesas ICE::         Using the E7000 In-Circuit Emulator.
+* Renesas Special::     Special @value{GDBN} commands for Renesas micros.
 @end menu
 
-@node Hitachi Boards
-@subsubsection Connecting to Hitachi boards
+@node Renesas Boards
+@subsubsection Connecting to Renesas boards
 
 @c only for Unix hosts
 @kindex device
-@cindex serial device, Hitachi micros
+@cindex serial device, Renesas 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
+@cindex serial line speed, Renesas 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
@@ -11878,7 +12585,7 @@ 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 Unix host to debug your Renesas 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
@@ -11888,7 +12595,7 @@ 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.
+the Renesas 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
@@ -11921,7 +12628,7 @@ 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
+cross-debugging to the Renesas 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
@@ -11971,12 +12678,12 @@ to detect program completion.
 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
+@node Renesas ICE
 @subsubsection Using the E7000 in-circuit emulator
 
-@kindex target e7000@r{, with Hitachi ICE}
+@kindex target e7000@r{, with Renesas 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
+Renesas 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
@@ -11991,8 +12698,8 @@ 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
+@node Renesas Special
+@subsubsection Special @value{GDBN} commands for Renesas micros
 
 Some @value{GDBN} commands are available only for the H8/300:
 
@@ -12025,13 +12732,17 @@ memory}.  The accepted values for @var{mod} are @code{small},
 @end table
 
 @node M32R/D
-@subsection Mitsubishi M32R/D
+@subsection Renesas M32R/D
 
 @table @code
 
 @kindex target m32r
 @item target m32r @var{dev}
-Mitsubishi M32R/D ROM monitor.
+Renesas M32R/D ROM monitor.
+
+@kindex target m32rsdi
+@item target m32rsdi @var{dev}
+Renesas M32R SDI server, connected via parallel port to the board.
 
 @end table
 
@@ -12293,49 +13004,39 @@ or Data.  For example:
 
 @code{hwatch ($LEA == my_var) && ($LDATA < 50) || ($SEA == my_var) && ($SDATA >= 50)}
 
-@kindex htrace info
+@kindex htrace
 @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.
 
@@ -12378,25 +13079,25 @@ W89K monitor, running on a Winbond HPPA board.
 @end table
 
 @node SH
-@subsection Hitachi SH
+@subsection Renesas SH
 
 @table @code
 
-@kindex target hms@r{, with Hitachi SH}
+@kindex target hms@r{, with Renesas SH}
 @item target hms @var{dev}
-A Hitachi SH board attached via serial line to your host.  Use special
+A Renesas 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}
+@kindex target e7000@r{, with Renesas SH}
 @item target e7000 @var{dev}
-E7000 emulator for Hitachi SH.
+E7000 emulator for Renesas 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.
+Renesas SH-3 and SH-3E target systems.
 
 @end table
 
@@ -12791,7 +13492,7 @@ Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
 @cindex readline
 @cindex command line editing
 
-@value{GDBN} reads its input commands via the @dfn{readline} interface.  This
+@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
@@ -12816,19 +13517,31 @@ Disable command line editing.
 Show whether command line editing is enabled.
 @end table
 
+@xref{Command Line Editing}, for more details about the Readline
+interface.  Users unfamiliar with @sc{gnu} Emacs or @code{vi} are
+encouraged to read that chapter.
+
 @node History
 @section Command history
+@cindex 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.
 
+@value{GDBN} uses the @sc{gnu} History library, a part of the Readline
+package, to provide the history facility.  @xref{Using History
+Interactively}, for the detailed description of the History library.
+
+Here is the description of @value{GDBN} commands related to command
+history.
+
 @table @code
 @cindex history substitution
 @cindex history file
 @kindex set history filename
-@kindex GDBHISTFILE
+@cindex @env{GDBHISTFILE}, environment variable
 @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
@@ -12840,7 +13553,7 @@ to the value of the environment variable @code{GDBHISTFILE}, or to
 is not set.
 
 @cindex history save
-@kindex set history save
+@kindex set history
 @item set history save
 @itemx set history save on
 Record command history in a file, whose name may be specified with the
@@ -12850,19 +13563,16 @@ Record command history in a file, whose name may be specified with the
 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
+@xref{Event Designators}, for more details.
 
+@cindex history expansion, turn on/off
 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
@@ -12874,21 +13584,14 @@ history facilities do not attempt substitution on the strings
 The commands to control history expansion are:
 
 @table @code
-@kindex set history expansion
 @item set history expansion on
 @itemx set history expansion
+@kindex 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
@@ -13015,7 +13718,7 @@ current ABI.
 @kindex show osabi
 
 One @value{GDBN} configuration can debug binaries for multiple operating
-system targets, either via remote debugging or native emulation. 
+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
@@ -13163,78 +13866,86 @@ Displays state of confirmation requests.
 
 @node Debugging Output
 @section Optional messages about internal happenings
+@cindex optional debugging messages
+
 @table @code
-@kindex set debug arch
+@kindex set debug
+@cindex gdbarch debugging info
 @item set debug arch
 Turns on or off display of gdbarch debugging info. The default is off
-@kindex show debug arch
+@kindex show debug
 @item show debug arch
 Displays the current state of displaying gdbarch debugging info.
-@kindex set debug event
 @item set debug event
+@cindex event debugging info
 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
+@cindex expression debugging info
 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
+@cindex frame debugging info
 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 infrun
+@cindex inferior debugging info
+Turns on or off display of @value{GDBN} debugging info for running the inferior.
+The default is off.  @file{infrun.c} contains GDB's runtime state machine used 
+for implementing operations such as single-stepping the inferior.
+@item show debug infrun
+Displays the current state of @value{GDBN} inferior debugging.
+@item set debug observer
+@cindex observer debugging info
+Turns on or off display of @value{GDBN} observer debugging.  This
+includes info such as the notification of observable events.
+@item show debug observer
+Displays the current state of observer debugging.
 @item set debug overload
+@cindex C@t{++} overload debugging info
 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
+@cindex target debugging info
 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
+default is 0.  Set it to 1 to track events, and to 2 to also track the
+value of large memory transfers.  Changes to this flag do not take effect
+until the next time you connect to a target or use the @code{run} command.
 @item show debug target
 Displays the current state of displaying @value{GDBN} target debugging
 info.
-@kindex set debug varobj
 @item set debug varobj
+@cindex variable object debugging info
 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.
@@ -13363,7 +14074,6 @@ messages when used in a user-defined command.
 @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)
@@ -13371,7 +14081,6 @@ 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
@@ -13379,7 +14088,7 @@ 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.
+occurs, the hook is not re-executed, thereby avoiding infinite 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!
@@ -13409,7 +14118,7 @@ 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, 
+command, and to add extra text to the beginning and end of the message,
 you could define:
 
 @smallexample
@@ -13677,6 +14386,7 @@ interpreter-exec mi "-data-list-register-names"
 @node TUI
 @chapter @value{GDBN} Text User Interface
 @cindex TUI
+@cindex Text User Interface
 
 @menu
 * TUI Overview::                TUI overview
@@ -13686,12 +14396,14 @@ interpreter-exec mi "-data-list-register-names"
 * 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}).
+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 enabled by invoking @value{GDBN} using either
+@pindex gdbtui
+@samp{gdbtui} or @samp{gdb -tui}.
 
 @node TUI Overview
 @section TUI overview
@@ -13729,7 +14441,7 @@ 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.
+changed are highlighted.  
 
 @end table
 
@@ -13920,7 +14632,7 @@ key bindings such as @key{C-p}, @key{C-n}, @key{C-b} and @key{C-f}.
 
 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. 
+some gdb commands.
 
 @table @kbd
 @kindex c @r{(SingleKey TUI key)}
@@ -13989,27 +14701,22 @@ in the TUI mode.
 List and give the size of all displayed windows.
 
 @item layout next
-@kindex layout next
+@kindex layout
 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
@@ -14022,6 +14729,22 @@ can be affected to another window.
 @kindex refresh
 Refresh the screen.  This is similar to using @key{C-L} key.
 
+@item tui reg float
+@kindex tui reg
+Show the floating point registers in the register window.
+
+@item tui reg general
+Show the general registers in the register window.
+
+@item tui reg next
+Show the next register group.  The list of register groups as well as
+their order is target specific.  The predefined register groups are the
+following: @code{general}, @code{float}, @code{system}, @code{vector},
+@code{all}, @code{save}, @code{restore}.
+
+@item tui reg system
+Show the system registers in the register window.
+
 @item update
 @kindex update
 Update the source window and the current execution point.
@@ -14226,7 +14949,7 @@ 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.
-  
+
 The description given here is for GNU Emacs version 21.3 and a more
 detailed description of its interaction with @value{GDBN} is given in
 the Emacs manual (@pxref{Debuggers,,, Emacs, The @sc{gnu} Emacs Manual}).
@@ -14414,7 +15137,7 @@ corresponding output for that command will also be prefixed by that same
 
 @table @code
 @item @var{output} @expansion{}
-@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(gdb)" @var{nl}}
+@code{( @var{out-of-band-record} )* [ @var{result-record} ] "(@value{GDBP})" @var{nl}}
 
 @item @var{result-record} @expansion{}
 @code{ [ @var{token} ] "^" @var{result-class} ( "," @var{result} )* @var{nl}}
@@ -15866,17 +16589,17 @@ The corresponding @value{GDBN} command is @samp{cd}.
 
 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 
+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 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 
+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.
@@ -15915,18 +16638,18 @@ The corresponding @value{GDBN} command is @samp{dir}.
 
 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 
+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 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 
+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.
@@ -15940,7 +16663,7 @@ The corresponding @value{GDBN} command is @samp{path}.
 
 @smallexample
 (@value{GDBP})
--environment-path 
+-environment-path
 ^done,path="/usr/bin"
 (@value{GDBP})
 -environment-path /kwikemart/marge/ezannoni/flathead-dev/ppc-eabi/gdb /bin
@@ -16546,7 +17269,7 @@ N.A.
  -file-list-exec-source-file
 @end smallexample
 
-List the line number, the current source file, and the absolute path 
+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
@@ -16574,14 +17297,24 @@ There's no @value{GDBN} command which directly corresponds to this one.
 
 List the source files for the current executable.
 
+It will always output the filename, but only when GDB can find the absolute
+file name of a source file, will it output the fullname.
+
 @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.
-
+@smallexample
+(@value{GDBP})
+-file-list-exec-source-files
+^done,files=[
+@{file=foo.c,fullname=/home/foo.c@},
+@{file=/home/bar.c,fullname=/home/bar.c@},
+@{file=gdb_could_not_find_fullpath.c@}]
+(@value{GDBP})
+@end smallexample
 
 @subheading The @code{-file-list-shared-libraries} Command
 @findex -file-list-shared-libraries
@@ -16759,7 +17492,7 @@ information when you start an interactive session.
 ~Type "show copying" to see the conditions.
 ~There is absolutely no warranty for GDB.  Type "show warranty" for
 ~ details.
-~This GDB was configured as 
+~This GDB was configured as
  "--host=sparc-sun-solaris2.5.1 --target=ppc-eabi".
 ^done
 (@value{GDBP})
@@ -17090,8 +17823,14 @@ Show a single frame:
 @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.
+argument of 0 or @code{--no-values}, prints only the names of the variables.
+With argument of 1 or @code{--all-values}, prints also their values.  With
+argument of 2 or @code{--simple-values}, prints the name, type and value for
+simple data types and the name and type for arrays, structures and
+unions.  In this last case, the idea is that the user can see the
+value of simple data types immediately and he can create variable
+objects for other data types if he wishes to explore their values in
+more detail.
 
 @subsubheading @value{GDBN} Command
 
@@ -17104,9 +17843,12 @@ prints also their values.
 -stack-list-locals 0
 ^done,locals=[name="A",name="B",name="C"]
 (@value{GDBP})
--stack-list-locals 1
+-stack-list-locals --all-values
 ^done,locals=[@{name="A",value="1"@},@{name="B",value="2"@},
-  @{name="C",value="3"@}]
+  @{name="C",value="@{1, 2, 3@}"@}]
+-stack-list-locals --simple-values
+^done,locals=[@{name="A",type="int",value="1"@},
+  @{name="B",type="int",value="2"@},@{name="C",type="int [3]"@}]
 (@value{GDBP})
 @end smallexample
 
@@ -17213,7 +17955,7 @@ Show the core addresses of the code for a source line.
 
 @subsubheading @value{GDBN} Command
 
-The corresponding @value{GDBN} comamnd is @samp{info line}.
+The corresponding @value{GDBN} command is @samp{info line}.
 @code{gdbtk} has the @samp{gdb_get_line} and @samp{gdb_get_file} commands.
 
 @subsubheading Example
@@ -18050,14 +18792,26 @@ Returns the number of children of a variable object @var{name}:
 @subsubheading Synopsis
 
 @smallexample
- -var-list-children @var{name}
+ -var-list-children [@var{print-values}] @var{name}
 @end smallexample
 
-Returns a list of the children of the specified variable object:
+Returns a list of the children of the specified variable object.  With
+just the variable object name as an argument or with an optional
+preceding argument of 0 or @code{--no-values}, prints only the names of the
+variables.  With an optional preceding argument of 1 or @code{--all-values},
+also prints their values.
+
+@subsubheading Example
 
 @smallexample
+(@value{GDBP})
+ -var-list-children n
  numchild=@var{n},children=[@{name=@var{name},
  numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
+(@value{GDBP})
+ -var-list-children --all-values n
+ numchild=@var{n},children=[@{name=@var{name},
+ numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}]
 @end smallexample
 
 
@@ -18146,7 +18900,7 @@ before the value of a child variable can be evaluated.
 
 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 
+value is altered by the assign, the variable will show up in any
 subsequent @code{-var-update} list.
 
 @subsubheading Example
@@ -18246,12 +19000,12 @@ for details.
 This GDB was configured as "i386-pc-linux-gnu"
 
 ^Z^Zpre-prompt
-(gdb) 
+(@value{GDBP})
 ^Z^Zprompt
 @kbd{quit}
 
 ^Z^Zpost-prompt
-$ 
+$
 @end smallexample
 
 Here @samp{quit} is input to @value{GDBN}; the rest is output from
@@ -18401,13 +19155,13 @@ deleted a breakpoint.
 @findex starting
 @findex stopping
 When the program starts executing due to a @value{GDBN} command such as
-@code{step} or @code{continue}, 
+@code{step} or @code{continue},
 
 @smallexample
 ^Z^Zstarting
 @end smallexample
 
-is output.  When the program stops, 
+is output.  When the program stops,
 
 @smallexample
 ^Z^Zstopped
@@ -18655,6 +19409,16 @@ 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.
 
+@pindex script
+@cindex recording a session script
+To collect all this information, you can use a session recording program
+such as @command{script}, which is available on many Unix systems.
+Just run your @value{GDBN} session inside @command{script} and then
+include the @file{typescript} file with your bug report.
+
+Another way to record a @value{GDBN} session is to run @value{GDBN}
+inside Emacs and then save the entire buffer to a file.
+
 @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
@@ -19158,13 +19922,13 @@ either quit @value{GDBN} or create a core file of the current
 @value{GDBN} session.
 
 @smallexample
-(gdb) @kbd{maint internal-error testing, 1, 2}
+(@value{GDBP}) @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) 
+(@value{GDBP})
 @end smallexample
 
 Takes an optional parameter that is used as the text of the error or
@@ -19176,18 +19940,18 @@ warning message.
 Prints the contents of @value{GDBN}'s internal dummy-frame stack.
 
 @smallexample
-(gdb) @kbd{b add}
+(@value{GDBP}) @kbd{b add}
 @dots{}
-(gdb) @kbd{print add(2,3)}
+(@value{GDBP}) @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}
+(@value{GDBP}) @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) 
+(@value{GDBP})
 @end smallexample
 
 Takes an optional file parameter.
@@ -19218,15 +19982,15 @@ Print @value{GDBN}'s internal register group data structures.
 Takes an optional file parameter.
 
 @smallexample
-(gdb) @kbd{maint print reggroups}
- Group      Type      
- general    user      
- float      user      
- all        user      
- vector     user      
- system     user      
- save       internal  
- restore    internal  
+(@value{GDBP}) @kbd{maint print reggroups}
+ Group      Type
+ general    user
+ float      user
+ all        user
+ vector     user
+ system     user
+ save       internal
+ restore    internal
 @end smallexample
 
 @kindex maint set profile
@@ -19245,7 +20009,20 @@ if you use profiling, @value{GDBN} will overwrite the profiling log file
 data in a @file{gmon.out} file, be sure to move it to a safe location.
 
 Configuring with @samp{--enable-profiling} arranges for @value{GDBN} to be
-compiled with the @samp{-pg} compiler option. 
+compiled with the @samp{-pg} compiler option.
+
+@kindex maint set dwarf2 max-cache-age
+@kindex maint show dwarf2 max-cache-age
+@item maint set dwarf2 max-cache-age
+@itemx maint show dwarf2 max-cache-age
+Control the DWARF 2 compilation unit cache.
+
+In object files with inter-compilation-unit references, such as those
+produced by the GCC option @samp{-feliminate-dwarf2-dups}, the DWARF 2
+reader needs to frequently refer to previously read compilation units.
+This setting controls how long a compilation unit will remain in the cache
+if it is not referenced.  Setting it to zero disables caching, which will
+slow down @value{GDBN} startup but reduce memory consumption.
 
 @end table
 
@@ -19344,10 +20121,6 @@ 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.
 
-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.
-
 So:
 @smallexample
 "@code{0* }"
@@ -19363,8 +20136,8 @@ For any @var{command} not supported by the stub, an empty response
 protocol.  A newer @value{GDBN} can tell if a packet is supported based
 on that response.
 
-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 
+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.
 
 @node Packets
@@ -19504,9 +20277,9 @@ Reply:
 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.
+determined by the @value{GDBN} internal macros
+@var{DEPRECATED_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
@@ -19529,7 +20302,7 @@ for an error
 
 Reserved for future use.
 
-@item @code{H}@var{c}@var{t@dots{}} --- set thread 
+@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},
@@ -19650,17 +20423,20 @@ Reserved for future use.
 
 @item @code{O} --- reserved
 
-Reserved for future use.
-
-@item @code{p}@var{n@dots{}} --- read reg @strong{(reserved)}
+@item @code{p}@var{hex number of register} --- read register packet
 @cindex @code{p} packet
 
-@xref{write register packet}.
+@xref{read registers packet}, for a description of how the returned
+register value is encoded.
 
 Reply:
 @table @samp
-@item @var{r@dots{}.}
-The hex encoded value of the register in target byte order.
+@item @var{XX@dots{}}
+the register's value
+@item E@var{NN}
+for an error
+@item
+Indicating an unrecognized @var{query}.
 @end table
 
 @item @code{P}@var{n@dots{}}@code{=}@var{r@dots{}} --- write register
@@ -19740,7 +20516,7 @@ Like @samp{C} but step not continue.
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
 
-@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search 
+@item @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM} --- search
 @cindex @code{t} packet
 
 Search backwards starting at address @var{addr} for a match with pattern
@@ -19768,9 +20544,51 @@ Reserved for future use.
 
 Reserved for future use.
 
-@item @code{v} --- reserved
+@item @code{v} --- verbose packet prefix
 
-Reserved for future use.
+Packets starting with @code{v} are identified by a multi-letter name,
+up to the first @code{;} or @code{?} (or the end of the packet).
+
+@item @code{vCont}[;@var{action}[@code{:}@var{tid}]]... --- extended resume
+@cindex @code{vCont} packet
+
+Resume the inferior.  Different actions may be specified for each thread.
+If an action is specified with no @var{tid}, then it is applied to any
+threads that don't have a specific action specified; if no default action is
+specified then other threads should remain stopped.  Specifying multiple
+default actions is an error; specifying no actions is also an error.
+Thread IDs are specified in hexadecimal.  Currently supported actions are:
+
+@table @code
+@item c
+Continue.
+@item C@var{sig}
+Continue with signal @var{sig}.  @var{sig} should be two hex digits.
+@item s
+Step.
+@item S@var{sig}
+Step with signal @var{sig}.  @var{sig} should be two hex digits.
+@end table
+
+The optional @var{addr} argument normally associated with these packets is
+not supported in @code{vCont}.
+
+Reply:
+@xref{Stop Reply Packets}, for the reply specifications.
+
+@item @code{vCont?} --- extended resume query
+@cindex @code{vCont?} packet
+
+Query support for the @code{vCont} packet.
+
+Reply:
+@table @samp
+@item @code{vCont}[;@var{action}]...
+The @code{vCont} packet is supported.  Each @var{action} is a supported
+command in the @code{vCont} packet.
+@item
+The @code{vCont} packet is not supported.
+@end table
 
 @item @code{V} --- reserved
 
@@ -19793,7 +20611,8 @@ Reserved for future use.
 
 @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}.
+escaped using @code{0x7d}, and then XORed with @code{0x20}.
+For example, @code{0x7d} would be transmitted as @code{0x7d 0x5d}.
 
 Reply:
 @table @samp
@@ -19958,12 +20777,13 @@ conventions is used.
 
 @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.
+by @code{DEPRECATED_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}
 
@@ -19974,15 +20794,6 @@ applicable to certain targets.
 
 The process terminated with signal @var{AA}.
 
-@item N@var{AA};@var{t@dots{}};@var{d@dots{}};@var{b@dots{}} @strong{(obsolete)}
-
-@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.}
-
 @item O@var{XX@dots{}}
 
 @var{XX@dots{}} is hex encoding of @sc{ascii} data.  This can happen at
@@ -20023,7 +20834,7 @@ Return the current thread id.
 Reply:
 @table @samp
 @item @code{QC}@var{pid}
-Where @var{pid} is a HEX encoded 16 bit process id.
+Where @var{pid} is an unsigned hexidecimal process id.
 @item *
 Any other reply implies the old pid.
 @end table
@@ -20052,10 +20863,10 @@ a comma-separated list of thread ids
 @end table
 
 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'}).
+more thread ids, in big-endian unsigned 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'}).
 
 @item @code{q}@code{ThreadExtraInfo}@code{,}@var{id} --- extra thread info
 
@@ -20189,6 +21000,115 @@ encoded).  @value{GDBN} will continue to supply the values of symbols
 (if available), until the target ceases to request them.
 @end table
 
+@item @code{qPart}:@var{object}:@code{read}:@var{annex}:@var{offset},@var{length} --- read special data
+
+Read uninterpreted bytes from the target's special data area
+identified by the keyword @code{object}.
+Request @var{length} bytes starting at @var{offset} bytes into the data.
+The content and encoding of @var{annex} is specific to the object;
+it can supply additional details about what data to access.
+
+Here are the specific requests of this form defined so far.
+All @samp{@code{qPart}:@var{object}:@code{read}:@dots{}}
+requests use the same reply formats, listed below.
+
+@table @asis
+@item @code{qPart}:@code{auxv}:@code{read}::@var{offset},@var{length}
+Access the target's @dfn{auxiliary vector}.  @xref{Auxiliary Vector}.
+Note @var{annex} must be empty.
+@end table
+
+Reply:
+@table @asis
+@item @code{OK}
+The @var{offset} in the request is at the end of the data.
+There is no more data to be read.
+
+@item @var{XX@dots{}}
+Hex encoded data bytes read.
+This may be fewer bytes than the @var{length} in the request.
+
+@item @code{E00}
+The request was malformed, or @var{annex} was invalid.
+
+@item @code{E}@var{nn}
+The offset was invalid, or there was an error encountered reading the data.
+@var{nn} is a hex-encoded @code{errno} value.
+
+@item @code{""} (empty)
+An empty reply indicates the @var{object} or @var{annex} string was not
+recognized by the stub.
+@end table
+
+@item @code{qPart}:@var{object}:@code{write}:@var{annex}:@var{offset}:@var{data@dots{}}
+
+Write uninterpreted bytes into the target's special data area
+identified by the keyword @code{object},
+starting at @var{offset} bytes into the data.
+@var{data@dots{}} is the hex-encoded data to be written.
+The content and encoding of @var{annex} is specific to the object;
+it can supply additional details about what data to access.
+
+No requests of this form are presently in use.  This specification
+serves as a placeholder to document the common format that new
+specific request specifications ought to use.
+
+Reply:
+@table @asis
+@item @var{nn}
+@var{nn} (hex encoded) is the number of bytes written.
+This may be fewer bytes than supplied in the request.
+
+@item @code{E00}
+The request was malformed, or @var{annex} was invalid.
+
+@item @code{E}@var{nn}
+The offset was invalid, or there was an error encountered writing the data.
+@var{nn} is a hex-encoded @code{errno} value.
+
+@item @code{""} (empty)
+An empty reply indicates the @var{object} or @var{annex} string was not
+recognized by the stub, or that the object does not support writing.
+@end table
+
+@item @code{qPart}:@var{object}:@var{operation}:@dots{}
+Requests of this form may be added in the future.  When a stub does
+not recognize the @var{object} keyword, or its support for
+@var{object} does not recognize the @var{operation} keyword,
+the stub must respond with an empty packet.
+
+@item @code{qGetTLSAddr}:@var{thread-id},@var{offset},@var{lm} --- get thread local storage address
+
+Fetch the address associated with thread local storage specified
+by @var{thread-id}, @var{offset}, and @var{lm}.
+
+@var{thread-id} is the (big endian, hex encoded) thread id associated with the
+thread for which to fetch the TLS address.
+
+@var{offset} is the (big endian, hex encoded) offset associated with the
+thread local variable.  (This offset is obtained from the debug
+information associated with the variable.)
+
+@var{lm} is the (big endian, hex encoded) OS/ABI specific encoding of the
+the load module associated with the thread local storage.  For example,
+a @sc{gnu}/Linux system will pass the link map address of the shared
+object associated with the thread local storage under consideration. 
+Other operating environments may choose to represent the load module
+differently, so the precise meaning of this parameter will vary.
+
+Reply:
+@table @asis
+@item @var{XX@dots{}}
+Hex encoded (big endian) bytes representing the address of the thread
+local storage requested.
+
+@item @code{E}@var{nn} (where @var{nn} are hex digits)
+An error occurred.
+
+@item @code{""} (empty)
+An empty reply indicates that @code{qGetTLSAddr} is not supported by the stub.
+@end table
+
 @end table
 
 @node Register Packet Format
@@ -20256,8 +21176,8 @@ Example sequence of a target being stepped by a single instruction:
 @menu
 * File-I/O Overview::
 * Protocol basics::
-* The `F' request packet::
-* The `F' reply packet::
+* The F request packet::
+* The F reply packet::
 * Memory transfer::
 * The Ctrl-C message::
 * Console I/O::
@@ -20300,7 +21220,7 @@ previous activity (continue, step).  No additional continue or step
 request from @value{GDBN} is required.
 
 @smallexample
-(gdb) continue
+(@value{GDBP}) continue
   <- target requests 'system call X'
   target is stopped, @value{GDBN} executes system call
   -> GDB returns result
@@ -20319,20 +21239,20 @@ system are not supported by this protocol.
 
 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 
+@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:
 
 @itemize @bullet
-@item 
+@item
 A unique identifier for the requested system call.
 
 @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. 
+pointer/length pair.  Numerical values are given as they are.
 Numerical control values are given in a protocol specific representation.
 
 @end itemize
@@ -20340,7 +21260,7 @@ Numerical control values are given in a protocol specific representation.
 At that point @value{GDBN} has to perform the following actions.
 
 @itemize @bullet
-@item 
+@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
@@ -20384,7 +21304,7 @@ Return value.
 After having done the needed type and value coercion, the target continues
 the latest continue or step action.
 
-@node The `F' request packet
+@node The F request packet
 @subsection The @code{F} request packet
 @cindex file-i/o request packet
 @cindex @code{F} request packet
@@ -20402,7 +21322,7 @@ This is just the name of the function.
 
 @var{parameter@dots{}} are the parameters to the system call.
 
-@end table 
+@end table
 
 Parameters are hexadecimal integer values, either the real values in case
 of scalar datatypes, as pointers to target buffer space in case of compound
@@ -20411,7 +21331,7 @@ 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.
 
-@node The `F' reply packet
+@node The F reply packet
 @subsection The @code{F} reply packet
 @cindex file-i/o reply packet
 @cindex @code{F} reply packet
@@ -20469,7 +21389,7 @@ 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 
+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:
 
@@ -20554,7 +21474,7 @@ 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 
+by @value{GDBN} by default.  The user has to allow this call explicitly by
 entering
 
 @table @samp
@@ -20603,7 +21523,7 @@ The current setting is shown by typing
 int open(const char *pathname, int flags);
 int open(const char *pathname, int flags, mode_t mode);
 
-@exdent Request:     
+@exdent Request:
 Fopen,pathptr/len,flags,mode
 @end smallexample
 
@@ -20611,30 +21531,30 @@ Fopen,pathptr/len,flags,mode
 @code{flags} is the bitwise or of the following values:
 
 @table @code
-@item O_CREAT    
+@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 O_EXCL     
+@item O_EXCL
 When used with O_CREAT, if the file already exists it is
 an error and open() fails.
 
-@item O_TRUNC    
+@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 O_APPEND   
+@item O_APPEND
 The file is opened in append mode.
 
-@item O_RDONLY   
+@item O_RDONLY
 The file is opened for reading only.
 
-@item O_WRONLY   
+@item O_WRONLY
 The file is opened for writing only.
 
-@item O_RDWR     
+@item O_RDWR
 The file is opened for reading and writing.
 
 @noindent
@@ -20646,22 +21566,22 @@ Each other bit is silently ignored.
 @code{mode} is the bitwise or of the following values:
 
 @table @code
-@item S_IRUSR    
+@item S_IRUSR
 User has read permission.
 
-@item S_IWUSR    
+@item S_IWUSR
 User has write permission.
 
-@item S_IRGRP    
+@item S_IRGRP
 Group has read permission.
 
-@item S_IWGRP    
+@item S_IWGRP
 Group has write permission.
 
-@item S_IROTH    
+@item S_IROTH
 Others have read permission.
 
-@item S_IWOTH    
+@item S_IWOTH
 Others have write permission.
 
 @noindent
@@ -20678,42 +21598,42 @@ occured.
 @end smallexample
 
 @table @code
-@item EEXIST     
+@item EEXIST
 pathname already exists and O_CREAT and O_EXCL were used.
 
-@item EISDIR     
+@item EISDIR
 pathname refers to a directory.
 
-@item EACCES     
+@item EACCES
 The requested access is not allowed.
 
 @item ENAMETOOLONG
 pathname was too long.
 
-@item ENOENT     
+@item ENOENT
 A directory component in pathname does not exist.
 
-@item ENODEV     
+@item ENODEV
 pathname refers to a device, pipe, named pipe or socket.
 
-@item EROFS      
+@item EROFS
 pathname refers to a file on a read-only filesystem and
 write access was requested.
 
-@item EFAULT     
+@item EFAULT
 pathname is an invalid pointer value.
 
-@item ENOSPC     
+@item ENOSPC
 No space on device to create the file.
 
-@item EMFILE     
+@item EMFILE
 The process already has the maximum number of files open.
 
-@item ENFILE     
+@item ENFILE
 The limit on the total number of files open on the system
 has been reached.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20722,10 +21642,10 @@ The call was interrupted by the user.
 @cindex close, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int close(int fd);
 
-@exdent Request:     
+@exdent Request:
 Fclose,fd
 
 @exdent Return value:
@@ -20735,10 +21655,10 @@ close returns zero on success, or -1 if an error occurred.
 @end smallexample
 
 @table @code
-@item EBADF      
+@item EBADF
 fd isn't a valid open file descriptor.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20747,29 +21667,29 @@ The call was interrupted by the user.
 @cindex read, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int read(int fd, void *buf, unsigned int count);
 
-@exdent Request:     
+@exdent Request:
 Fread,fd,bufptr,count
 
 @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. 
+returns zero as well.  On error, -1 is returned.
 
 @exdent Errors:
 @end smallexample
 
 @table @code
-@item EBADF      
+@item EBADF
 fd is not a valid file descriptor or is not open for
 reading.
 
-@item EFAULT     
+@item EFAULT
 buf is an invalid pointer value.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20778,10 +21698,10 @@ The call was interrupted by the user.
 @cindex write, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int write(int fd, const void *buf, unsigned int count);
 
-@exdent Request:     
+@exdent Request:
 Fwrite,fd,bufptr,count
 
 @exdent Return value:
@@ -20793,21 +21713,21 @@ is returned.
 @end smallexample
 
 @table @code
-@item EBADF      
+@item EBADF
 fd is not a valid file descriptor or is not open for
 writing.
 
-@item EFAULT     
+@item EFAULT
 buf is an invalid pointer value.
 
-@item EFBIG      
+@item EFBIG
 An attempt was made to write a file that exceeds the
 host specific maximum file size allowed.
 
-@item ENOSPC     
+@item ENOSPC
 No space on device to write the data.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20816,24 +21736,24 @@ The call was interrupted by the user.
 @cindex lseek, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 long lseek (int fd, long offset, int flag);
 
-@exdent Request:     
+@exdent Request:
 Flseek,fd,offset,flag
 @end smallexample
 
 @code{flag} is one of:
 
 @table @code
-@item SEEK_SET   
+@item SEEK_SET
 The offset is set to offset bytes.
 
-@item SEEK_CUR   
+@item SEEK_CUR
 The offset is set to its current location plus offset
 bytes.
 
-@item SEEK_END   
+@item SEEK_END
 The offset is set to the size of the file plus offset
 bytes.
 @end table
@@ -20848,16 +21768,16 @@ value of -1 is returned.
 @end smallexample
 
 @table @code
-@item EBADF      
+@item EBADF
 fd is not a valid open file descriptor.
 
-@item ESPIPE     
+@item ESPIPE
 fd is associated with the @value{GDBN} console.
 
-@item EINVAL     
+@item EINVAL
 flag is not a proper value.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20866,10 +21786,10 @@ The call was interrupted by the user.
 @cindex rename, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int rename(const char *oldpath, const char *newpath);
 
-@exdent Request:     
+@exdent Request:
 Frename,oldpathptr/len,newpathptr/len
 
 @exdent Return value:
@@ -20879,47 +21799,47 @@ On success, zero is returned.  On error, -1 is returned.
 @end smallexample
 
 @table @code
-@item EISDIR     
+@item EISDIR
 newpath is an existing directory, but oldpath is not a
 directory.
 
-@item EEXIST     
+@item EEXIST
 newpath is a non-empty directory.
 
-@item EBUSY      
+@item EBUSY
 oldpath or newpath is a directory that is in use by some
 process.
 
-@item EINVAL     
+@item EINVAL
 An attempt was made to make a directory a subdirectory
 of itself.
 
-@item ENOTDIR    
+@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 EFAULT     
+@item EFAULT
 oldpathptr or newpathptr are invalid pointer values.
 
-@item EACCES     
+@item EACCES
 No access to the file or the path of the file.
 
 @item ENAMETOOLONG
-             
+
 oldpath or newpath was too long.
 
-@item ENOENT     
+@item ENOENT
 A directory component in oldpath or newpath does not exist.
 
-@item EROFS      
+@item EROFS
 The file is on a read-only filesystem.
 
-@item ENOSPC     
+@item ENOSPC
 The device containing the file has no room for the new
 directory entry.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20928,10 +21848,10 @@ The call was interrupted by the user.
 @cindex unlink, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int unlink(const char *pathname);
 
-@exdent Request:     
+@exdent Request:
 Funlink,pathnameptr/len
 
 @exdent Return value:
@@ -20941,32 +21861,32 @@ On success, zero is returned.  On error, -1 is returned.
 @end smallexample
 
 @table @code
-@item EACCES     
+@item EACCES
 No access to the file or the path of the file.
 
-@item EPERM      
+@item EPERM
 The system does not allow unlinking of directories.
 
-@item EBUSY      
+@item EBUSY
 The file pathname cannot be unlinked because it's
 being used by another process.
 
-@item EFAULT     
+@item EFAULT
 pathnameptr is an invalid pointer value.
 
 @item ENAMETOOLONG
 pathname was too long.
 
-@item ENOENT     
+@item ENOENT
 A directory component in pathname does not exist.
 
-@item ENOTDIR    
+@item ENOTDIR
 A component of the path is not a directory.
 
-@item EROFS      
+@item EROFS
 The file is on a read-only filesystem.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -20976,11 +21896,11 @@ The call was interrupted by the user.
 @cindex stat, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int stat(const char *pathname, struct stat *buf);
 int fstat(int fd, struct stat *buf);
 
-@exdent Request:     
+@exdent Request:
 Fstat,pathnameptr/len,bufptr
 Ffstat,fd,bufptr
 
@@ -20991,26 +21911,26 @@ On success, zero is returned.  On error, -1 is returned.
 @end smallexample
 
 @table @code
-@item EBADF      
+@item EBADF
 fd is not a valid open file.
 
-@item ENOENT     
+@item ENOENT
 A directory component in pathname does not exist or the
 path is an empty string.
 
-@item ENOTDIR    
+@item ENOTDIR
 A component of the path is not a directory.
 
-@item EFAULT     
+@item EFAULT
 pathnameptr is an invalid pointer value.
 
-@item EACCES     
+@item EACCES
 No access to the file or the path of the file.
 
 @item ENAMETOOLONG
 pathname was too long.
 
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -21019,10 +21939,10 @@ The call was interrupted by the user.
 @cindex gettimeofday, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int gettimeofday(struct timeval *tv, void *tz);
 
-@exdent Request:     
+@exdent Request:
 Fgettimeofday,tvptr,tzptr
 
 @exdent Return value:
@@ -21032,10 +21952,10 @@ On success, 0 is returned, -1 otherwise.
 @end smallexample
 
 @table @code
-@item EINVAL     
+@item EINVAL
 tz is a non-NULL pointer.
 
-@item EFAULT     
+@item EFAULT
 tvptr and/or tzptr is an invalid pointer value.
 @end table
 
@@ -21044,10 +21964,10 @@ tvptr and/or tzptr is an invalid pointer value.
 @cindex isatty, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int isatty(int fd);
 
-@exdent Request:     
+@exdent Request:
 Fisatty,fd
 
 @exdent Return value:
@@ -21057,7 +21977,7 @@ Returns 1 if fd refers to the @value{GDBN} console, 0 otherwise.
 @end smallexample
 
 @table @code
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -21066,10 +21986,10 @@ The call was interrupted by the user.
 @cindex system, file-i/o system call
 
 @smallexample
-@exdent Synopsis:    
+@exdent Synopsis:
 int system(const char *command);
 
-@exdent Request:     
+@exdent Request:
 Fsystem,commandptr/len
 
 @exdent Return value:
@@ -21083,7 +22003,7 @@ In case /bin/sh could not be executed, 127 is returned.
 @end smallexample
 
 @table @code
-@item EINTR      
+@item EINTR
 The call was interrupted by the user.
 @end table
 
@@ -21111,8 +22031,8 @@ int@r{,} unsigned int@r{,} long@r{,} unsigned long@r{,} mode_t @r{and} time_t
 @code{Int}, @code{unsigned int}, @code{mode_t} and @code{time_t} are
 implemented as 32 bit values in this protocol.
 
-@code{Long} and @code{unsigned long} are implemented as 64 bit types. 
-    
+@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.
 
@@ -21220,7 +22140,7 @@ The buffer of type struct timeval used by the target and @value{GDBN}
 is defined as follows:
 
 @smallexample
-struct timeval @{ 
+struct timeval @{
     time_t tv_sec;  /* second */
     long   tv_usec; /* microsecond */
 @};
@@ -21396,7 +22316,9 @@ host is called:
 
 @include gpl.texi
 
+@raisesections
 @include fdl.texi
+@lowersections
 
 @node Index
 @unnumbered Index
This page took 0.116821 seconds and 4 git commands to generate.