Allow Python notification of new object-file loadings.
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index f8b7e2db1173c76f371637b53533e59983216657..aad877a582cf1c327e40746635396bcc2cf769a0 100644 (file)
@@ -30,7 +30,7 @@
 
 @c !!set GDB manual's edition---not the same as GDB version!
 @c This is updated by GNU Press.
-@set EDITION Ninth
+@set EDITION Tenth
 
 @c !!set GDB edit command default editor
 @set EDITOR /bin/ex
@@ -97,13 +97,9 @@ Version @value{GDBVN}.
 Published by the Free Software Foundation @*
 51 Franklin Street, Fifth Floor,
 Boston, MA 02110-1301, USA@*
-ISBN 1-882114-77-9 @*
+ISBN 978-0-9831592-3-0 @*
 
 @insertcopying
-@page
-This edition of the GDB manual is dedicated to the memory of Fred
-Fish.  Fred was a long-standing contributor to GDB and to Free
-software in general.  We will miss him.
 @end titlepage
 @page
 
@@ -171,6 +167,7 @@ software in general.  We will miss him.
 * Command Line Editing::        Command Line Editing
 * Using History Interactively:: Using History Interactively
 @end ifclear
+* In Memoriam::                 In Memoriam
 * Formatting Documentation::    How to format and print @value{GDBN} documentation
 * Installing GDB::              Installing GDB
 * Maintenance Commands::        Maintenance Commands
@@ -181,6 +178,7 @@ software in general.  We will miss him.
 * Operating System Information:: Getting additional information from
                                  the operating system
 * Trace File Format::          GDB trace file format
+* Index Section Format::        .gdb_index section format
 * Copying::                    GNU General Public License says
                                 how you can copy and share GDB
 * GNU Free Documentation License::  The license for this documentation
@@ -1594,8 +1592,10 @@ left-hand-side:
 
 @smallexample
 (@value{GDBP}) p gdb_stdout.@kbd{M-?}
-magic      to_delete  to_fputs   to_put     to_rewind  
-to_data    to_flush   to_isatty  to_read    to_write   
+magic                to_fputs             to_rewind
+to_data              to_isatty            to_write
+to_delete            to_put               to_write_async_safe
+to_flush             to_read
 @end smallexample
 
 @noindent
@@ -1609,6 +1609,7 @@ struct ui_file
    int *magic;
    ui_file_flush_ftype *to_flush;
    ui_file_write_ftype *to_write;
+   ui_file_write_async_safe_ftype *to_write_async_safe;
    ui_file_fputs_ftype *to_fputs;
    ui_file_read_ftype *to_read;
    ui_file_delete_ftype *to_delete;
@@ -2465,7 +2466,7 @@ You can get multiple executables into a debugging session via the
 systems @value{GDBN} can add inferiors to the debug session
 automatically by following calls to @code{fork} and @code{exec}.  To
 remove inferiors from the debugging session use the
-@w{@code{remove-inferior}} command.
+@w{@code{remove-inferiors}} command.
 
 @table @code
 @kindex add-inferior
@@ -2498,37 +2499,37 @@ Added inferior 2.
 
 You can now simply switch focus to inferior 2 and run it.
 
-@kindex remove-inferior
-@item remove-inferior @var{infno}
-Removes the inferior @var{infno}.  It is not possible to remove an
-inferior that is running with this command.  For those, use the
-@code{kill} or @code{detach} command first.
+@kindex remove-inferiors
+@item remove-inferiors @var{infno}@dots{}
+Removes the inferior or inferiors @var{infno}@dots{}.  It is not
+possible to remove an inferior that is running with this command.  For
+those, use the @code{kill} or @code{detach} command first.
 
 @end table
 
 To quit debugging one of the running inferiors that is not the current
 inferior, you can either detach from it by using the @w{@code{detach
 inferior}} command (allowing it to run independently), or kill it
-using the @w{@code{kill inferior}} command:
+using the @w{@code{kill inferiors}} command:
 
 @table @code
-@kindex detach inferior @var{infno}
-@item detach inferior @var{infno}
-Detach from the inferior identified by @value{GDBN} inferior number
-@var{infno}.  Note that the inferior's entry still stays on the list
-of inferiors shown by @code{info inferiors}, but its Description will
-show @samp{<null>}.
+@kindex detach inferiors @var{infno}@dots{}
+@item detach inferior @var{infno}@dots{}
+Detach from the inferior or inferiors identified by @value{GDBN}
+inferior number(s) @var{infno}@dots{}.  Note that the inferior's entry
+still stays on the list of inferiors shown by @code{info inferiors},
+but its Description will show @samp{<null>}.
 
-@kindex kill inferior @var{infno}
-@item kill inferior @var{infno}
-Kill the inferior identified by @value{GDBN} inferior number
-@var{infno}.  Note that the inferior's entry still stays on the list
-of inferiors shown by @code{info inferiors}, but its Description will
-show @samp{<null>}.
+@kindex kill inferiors @var{infno}@dots{}
+@item kill inferiors @var{infno}@dots{}
+Kill the inferior or inferiors identified by @value{GDBN} inferior
+number(s) @var{infno}@dots{}.  Note that the inferior's entry still
+stays on the list of inferiors shown by @code{info inferiors}, but its
+Description will show @samp{<null>}.
 @end table
 
 After the successful completion of a command such as @code{detach},
-@code{detach inferior}, @code{kill} or @code{kill inferior}, or after
+@code{detach inferiors}, @code{kill} or @code{kill inferiors}, or after
 a normal process exit, the inferior is still valid and listed with
 @code{info inferiors}, ready to be restarted.
 
@@ -2857,14 +2858,22 @@ watchpoints in programs with multiple threads.
 If this variable is set, @var{path} is a colon-separated list of
 directories @value{GDBN} will use to search for @code{libthread_db}.
 If you omit @var{path}, @samp{libthread-db-search-path} will be reset to
-an empty list.
+its default value (@code{$sdir:$pdir} on @sc{gnu}/Linux and Solaris systems).
+Internally, the default value comes from the @code{LIBTHREAD_DB_SEARCH_PATH}
+macro.
 
 On @sc{gnu}/Linux and Solaris systems, @value{GDBN} uses a ``helper''
 @code{libthread_db} library to obtain information about threads in the
 inferior process.  @value{GDBN} will use @samp{libthread-db-search-path}
-to find @code{libthread_db}.  If that fails, @value{GDBN} will continue
-with default system shared library directories, and finally the directory
-from which @code{libpthread} was loaded in the inferior process.
+to find @code{libthread_db}.
+
+A special entry @samp{$sdir} for @samp{libthread-db-search-path}
+refers to the default system directories that are
+normally searched for loading shared libraries.
+
+A special entry @samp{$pdir} for @samp{libthread-db-search-path}
+refers to the directory from which @code{libpthread}
+was loaded in the inferior process.
 
 For any @code{libthread_db} library @value{GDBN} finds in above directories,
 @value{GDBN} attempts to initialize it with the current inferior process.
@@ -2986,8 +2995,8 @@ to another by using the @code{inferior} command (@pxref{Inferiors and
 Programs, ,Debugging Multiple Inferiors and Programs}).
 
 To quit debugging one of the forked processes, you can either detach
-from it by using the @w{@code{detach inferior}} command (allowing it
-to run independently), or kill it using the @w{@code{kill inferior}}
+from it by using the @w{@code{detach inferiors}} command (allowing it
+to run independently), or kill it using the @w{@code{kill inferiors}}
 command.  @xref{Inferiors and Programs, ,Debugging Multiple Inferiors
 and Programs}.
 
@@ -3438,12 +3447,12 @@ optionally be surrounded by spaces.
 
 @kindex info breakpoints
 @cindex @code{$_} and @code{info breakpoints}
-@item info breakpoints @r{[}@var{n}@r{]}
-@itemx info break @r{[}@var{n}@r{]}
+@item info breakpoints @r{[}@var{n}@dots{}@r{]}
+@itemx info break @r{[}@var{n}@dots{}@r{]}
 Print a table of all breakpoints, watchpoints, and catchpoints set and
 not deleted.  Optional argument @var{n} means print information only
-about the specified breakpoint (or watchpoint or catchpoint).  For
-each breakpoint, following columns are printed:
+about the specified breakpoint(s) (or watchpoint(s) or catchpoint(s)).
+For each breakpoint, following columns are printed:
 
 @table @emph
 @item Breakpoint Numbers
@@ -3727,7 +3736,7 @@ watchpoints, which do not slow down the running of your program.
 
 @table @code
 @kindex watch
-@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item watch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint for an expression.  @value{GDBN} will break when the
 expression @var{expr} is written into by the program and its value
 changes.  The simplest (and the most popular) use of this command is
@@ -3738,7 +3747,7 @@ to watch the value of a single variable:
 @end smallexample
 
 If the command includes a @code{@r{[}thread @var{threadnum}@r{]}}
-clause, @value{GDBN} breaks only when the thread identified by
+argument, @value{GDBN} breaks only when the thread identified by
 @var{threadnum} changes the value of @var{expr}.  If any other threads
 change the value of @var{expr}, @value{GDBN} will not break.  Note
 that watchpoints restricted to a single thread in this way only work
@@ -3753,18 +3762,35 @@ to determine the size of the watched memory.  If the expression's
 result does not have an address, then @value{GDBN} will print an
 error.
 
+The @code{@r{[}mask @var{maskvalue}@r{]}} argument allows creation
+of masked watchpoints, if the current architecture supports this
+feature (e.g., PowerPC Embedded architecture, see @ref{PowerPC
+Embedded}.)  A @dfn{masked watchpoint} specifies a mask in addition
+to an address to watch.  The mask specifies that some bits of an address
+(the bits which are reset in the mask) should be ignored when matching
+the address accessed by the inferior against the watchpoint address.
+Thus, a masked watchpoint watches many addresses simultaneously---those
+addresses whose unmasked bits are identical to the unmasked bits in the
+watchpoint address.  The @code{mask} argument implies @code{-location}.
+Examples:
+
+@smallexample
+(@value{GDBP}) watch foo mask 0xffff00ff
+(@value{GDBP}) watch *0xdeadbeef mask 0xffffff00
+@end smallexample
+
 @kindex rwatch
-@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item rwatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint that will break when the value of @var{expr} is read
 by the program.
 
 @kindex awatch
-@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]}
+@item awatch @r{[}-l@r{|}-location@r{]} @var{expr} @r{[}thread @var{threadnum}@r{]} @r{[}mask @var{maskvalue}@r{]}
 Set a watchpoint that will break when @var{expr} is either read from
 or written into by the program.
 
-@kindex info watchpoints @r{[}@var{n}@r{]}
-@item info watchpoints
+@kindex info watchpoints @r{[}@var{n}@dots{}@r{]}
+@item info watchpoints @r{[}@var{n}@dots{}@r{]}
 This command prints a list of watchpoints, using the same format as
 @code{info break} (@pxref{Set Breaks}).
 @end table
@@ -6361,6 +6387,9 @@ Specifies the line @var{linenum} in the source file @var{filename}.
 Specifies the line that begins the body of the function @var{function}.
 For example, in C, this is the line with the open brace.
 
+@item @var{function}:@var{label}
+Specifies the line where @var{label} appears in @var{function}.
+
 @item @var{filename}:@var{function}
 Specifies the line that begins the body of the function @var{function}
 in the file @var{filename}.  You only need the file name with a
@@ -7647,7 +7676,11 @@ is a common name for the program counter; @pxref{Registers, ,Registers}).
 @kindex undisplay
 @item undisplay @var{dnums}@dots{}
 @itemx delete display @var{dnums}@dots{}
-Remove item numbers @var{dnums} from the list of expressions to display.
+Remove items from the list of expressions to display.  Specify the
+numbers of the displays that you want affected with the command
+argument @var{dnums}.  It can be a single display number, one of the
+numbers shown in the first field of the @samp{info display} display;
+or it could be a range of display numbers, as in @code{2-4}.
 
 @code{undisplay} does not repeat if you press @key{RET} after using it.
 (Otherwise you would just get the error @samp{No display number @dots{}}.)
@@ -7656,12 +7689,20 @@ Remove item numbers @var{dnums} from the list of expressions to display.
 @item disable display @var{dnums}@dots{}
 Disable the display of item numbers @var{dnums}.  A disabled display
 item is not printed automatically, but is not forgotten.  It may be
-enabled again later.
+enabled again later.  Specify the numbers of the displays that you
+want affected with the command argument @var{dnums}.  It can be a
+single display number, one of the numbers shown in the first field of
+the @samp{info display} display; or it could be a range of display
+numbers, as in @code{2-4}.
 
 @kindex enable display
 @item enable display @var{dnums}@dots{}
 Enable display of item numbers @var{dnums}.  It becomes effective once
 again in auto display of its expression, until you specify otherwise.
+Specify the numbers of the displays that you want affected with the
+command argument @var{dnums}.  It can be a single display number, one
+of the numbers shown in the first field of the @samp{info display}
+display; or it could be a range of display numbers, as in @code{2-4}.
 
 @item display
 Display the current values of the expressions on the list, just as is
@@ -9291,6 +9332,26 @@ operation.
 
 If a line number is specified, the contents of that line will be
 printed in hex.
+
+@item set dcache size @var{size}
+@cindex dcache size
+@kindex set dcache size
+Set maximum number of entries in dcache (dcache depth above).
+
+@item set dcache line-size @var{line-size}
+@cindex dcache line-size
+@kindex set dcache line-size
+Set number of bytes each dcache entry caches (dcache width above).
+Must be a power of 2.
+
+@item show dcache size
+@kindex show dcache size
+Show maximum number of dcache entries.  See also @ref{Caching Remote Data, info dcache}.
+
+@item show dcache line-size
+@kindex show dcache line-size
+Show default size of dcache lines.  See also @ref{Caching Remote Data, info dcache}.
+
 @end table
 
 @node Searching Memory
@@ -9547,11 +9608,24 @@ can be any string of tokens.
 
 @kindex info macro
 @cindex macro definition, showing
-@cindex definition, showing a macro's
+@cindex definition of a macro, showing
+@cindex macros, from debug info
 @item info macro @var{macro}
-Show the definition of the macro named @var{macro}, and describe the
+Show the current definition of the named @var{macro}, and describe the
 source location or compiler command-line where that definition was established.
 
+@kindex info macros
+@item info macros @var{linespec}
+Show all macro definitions that are in effect at the location specified
+by @var{linespec},  and describe the source location or compiler
+command-line where those definitions were established.
+
+@kindex info definitions
+@item info definitions @var{macro}
+Show all definitions of the named @var{macro} that are defined in the current
+compilation unit, and describe the source location or compiler command-line
+where those definitions were established.
+
 @kindex macro define
 @cindex user-defined macros
 @cindex defining macros interactively
@@ -9817,7 +9891,7 @@ investigating what the target is actually doing.  @value{GDBN}'s
 support for static tracing includes being able to list instrumentation
 points, and attach them with @value{GDBN} defined high level
 tracepoints that expose the whole range of convenience of
-@value{GDBN}'s tracepoints support.  Namelly, support for collecting
+@value{GDBN}'s tracepoints support.  Namely, support for collecting
 registers values and values of global or local (to the instrumentation
 point) variables; tracepoint conditions and trace state variables.
 The act of installing a @value{GDBN} static tracepoint on an
@@ -9996,14 +10070,20 @@ These commands are deprecated; they are equivalent to plain @code{disable} and @
 @item disable tracepoint @r{[}@var{num}@r{]}
 Disable tracepoint @var{num}, or all tracepoints if no argument
 @var{num} is given.  A disabled tracepoint will have no effect during
-the next trace experiment, but it is not forgotten.  You can re-enable
+a trace experiment, but it is not forgotten.  You can re-enable
 a disabled tracepoint using the @code{enable tracepoint} command.
+If the command is issued during a trace experiment and the debug target
+has support for disabling tracepoints during a trace experiment, then the
+change will be effective immediately.  Otherwise, it will be applied to the
+next trace experiment.
 
 @kindex enable tracepoint
 @item enable tracepoint @r{[}@var{num}@r{]}
-Enable tracepoint @var{num}, or all tracepoints.  The enabled
-tracepoints will become effective the next time a trace experiment is
-run.
+Enable tracepoint @var{num}, or all tracepoints.  If this command is
+issued during a trace experiment and the debug target supports enabling
+tracepoints during a trace experiment, then the enabled tracepoints will
+become effective immediately.  Otherwise, they will become effective the
+next time a trace experiment is run.
 @end table
 
 @node Tracepoint Passcounts
@@ -10063,7 +10143,7 @@ just as with breakpoints.
 
 Unlike breakpoint conditions, @value{GDBN} does not actually evaluate
 the conditional expression itself.  Instead, @value{GDBN} encodes the
-expression into an agent expression (@pxref{Agent Expressions}
+expression into an agent expression (@pxref{Agent Expressions})
 suitable for execution on the target, independently of @value{GDBN}.
 Global variables become raw memory locations, locals become stack
 accesses, and so forth.
@@ -10204,6 +10284,10 @@ Collect all function arguments.
 @item $locals
 Collect all local variables.
 
+@item $_ret
+Collect the return address.  This is helpful if you want to see more
+of a backtrace.
+
 @item $_sdata
 @vindex $_sdata@r{, collect}
 Collect static tracepoint marker specific data.  Only available for
@@ -10242,12 +10326,6 @@ state variables (@pxref{Trace State Variables}) without adding those
 values to the trace buffer, as would be the case if the @code{collect}
 action were used.
 
-@kindex printf
-@item printf @var{template}, @var{expressions}@dots{}
-Print the values of one or more @var{expressions} under the control of
-the string @var{template} in @code{gdbserver} part.
-The command format is with simple @code{printf} (@pxref{Output, printf}).
-
 @kindex while-stepping @r{(tracepoints)}
 @item while-stepping @var{n}
 Perform @var{n} single-step instruction traces after the tracepoint,
@@ -10289,10 +10367,10 @@ tracepoint hit.
 @subsection Listing Tracepoints
 
 @table @code
-@kindex info tracepoints
-@kindex info tp
+@kindex info tracepoints @r{[}@var{n}@dots{}@r{]}
+@kindex info tp @r{[}@var{n}@dots{}@r{]}
 @cindex information about tracepoints
-@item info tracepoints @r{[}@var{num}@r{]}
+@item info tracepoints @r{[}@var{num}@dots{}@r{]}
 Display information about the tracepoint @var{num}.  If you don't
 specify a tracepoint number, displays information about all the
 tracepoints defined so far.  The format is similar to that used for
@@ -10425,6 +10503,7 @@ Enter actions for tracepoint #1, one per line.
 (@value{GDBP}) @b{tstop}
 @end smallexample
 
+@anchor{disconnected tracing}
 @cindex disconnected tracing
 You can choose to continue running the trace experiment even if
 @value{GDBN} disconnects from the target, voluntarily or
@@ -10475,7 +10554,7 @@ frames, oldest first, until there is enough room to continue
 collecting.  This is especially useful if your tracepoints are being
 hit too often, and your trace gets terminated prematurely because the
 buffer is full.  To ask for a circular trace buffer, simply set
-@samp{circular_trace_buffer} to on.  You can set this at any time,
+@samp{circular-trace-buffer} to on.  You can set this at any time,
 including during tracing; if the agent can do it, it will change
 buffer handling on the fly, otherwise it will not take effect until
 the next run.
@@ -10552,7 +10631,7 @@ by @code{ptr}.
 @item
 It is not possible to collect a complete stack backtrace at a
 tracepoint.  Instead, you may collect the registers and a few hundred
-bytes from the stack pointer with something like @code{*$esp@@300}
+bytes from the stack pointer with something like @code{*(unsigned char *)$esp@@300}
 (adjust to use the name of the actual stack pointer register on your
 target architecture, and the amount of stack you wish to capture).
 Then the @code{backtrace} command will show a partial backtrace when
@@ -13820,16 +13899,34 @@ __read_nocancel + 6 in section .text of /usr/lib64/libc.so.6
 
 @kindex whatis
 @item whatis [@var{arg}]
-Print the data type of @var{arg}, which can be either an expression or
-a data type.  With no argument, print the data type of @code{$}, the
-last value in the value history.  If @var{arg} is an expression, it is
-not actually evaluated, and any side-effecting operations (such as
-assignments or function calls) inside it do not take place.  If
-@var{arg} is a type name, it may be the name of a type or typedef, or
-for C code it may have the form @samp{class @var{class-name}},
-@samp{struct @var{struct-tag}}, @samp{union @var{union-tag}} or
-@samp{enum @var{enum-tag}}.
-@xref{Expressions, ,Expressions}.
+Print the data type of @var{arg}, which can be either an expression
+or a name of a data type.  With no argument, print the data type of
+@code{$}, the last value in the value history.
+
+If @var{arg} is an expression (@pxref{Expressions, ,Expressions}), it
+is not actually evaluated, and any side-effecting operations (such as
+assignments or function calls) inside it do not take place.
+
+If @var{arg} is a variable or an expression, @code{whatis} prints its
+literal type as it is used in the source code.  If the type was
+defined using a @code{typedef}, @code{whatis} will @emph{not} print
+the data type underlying the @code{typedef}.  If the type of the
+variable or the expression is a compound data type, such as
+@code{struct} or  @code{class}, @code{whatis} never prints their
+fields or methods.  It just prints the @code{struct}/@code{class}
+name (a.k.a.@: its @dfn{tag}).  If you want to see the members of
+such a compound data type, use @code{ptype}.
+
+If @var{arg} is a type name that was defined using @code{typedef},
+@code{whatis} @dfn{unrolls} only one level of that @code{typedef}.
+Unrolling means that @code{whatis} will show the underlying type used
+in the @code{typedef} declaration of @var{arg}.  However, if that
+underlying type is also a @code{typedef}, @code{whatis} will not
+unroll it.
+
+For C code, the type names may also have the form @samp{class
+@var{class-name}}, @samp{struct @var{struct-tag}}, @samp{union
+@var{union-tag}} or @samp{enum @var{enum-tag}}.
 
 @kindex ptype
 @item ptype [@var{arg}]
@@ -13837,10 +13934,23 @@ for C code it may have the form @samp{class @var{class-name}},
 detailed description of the type, instead of just the name of the type.
 @xref{Expressions, ,Expressions}.
 
+Contrary to @code{whatis}, @code{ptype} always unrolls any
+@code{typedef}s in its argument declaration, whether the argument is
+a variable, expression, or a data type.  This means that @code{ptype}
+of a variable or an expression will not print literally its type as
+present in the source code---use @code{whatis} for that.  @code{typedef}s at
+the pointer or reference targets are also unrolled.  Only @code{typedef}s of
+fields, methods and inner @code{class typedef}s of @code{struct}s,
+@code{class}es and @code{union}s are not unrolled even with @code{ptype}.
+
 For example, for this variable declaration:
 
 @smallexample
-struct complex @{double real; double imag;@} v;
+typedef double real_t;
+struct complex @{ real_t real; double imag; @};
+typedef struct complex complex_t;
+complex_t var;
+real_t *real_pointer_var;
 @end smallexample
 
 @noindent
@@ -13848,13 +13958,26 @@ the two commands give this output:
 
 @smallexample
 @group
-(@value{GDBP}) whatis v
+(@value{GDBP}) whatis var
+type = complex_t
+(@value{GDBP}) ptype var
+type = struct complex @{
+    real_t real;
+    double imag;
+@}
+(@value{GDBP}) whatis complex_t
+type = struct complex
+(@value{GDBP}) whatis struct complex
 type = struct complex
-(@value{GDBP}) ptype v
+(@value{GDBP}) ptype struct complex
 type = struct complex @{
-    double real;
+    real_t real;
     double imag;
 @}
+(@value{GDBP}) whatis real_pointer_var
+type = real_t *
+(@value{GDBP}) ptype real_pointer_var
+type = double *
 @end group
 @end smallexample
 
@@ -14698,14 +14821,14 @@ the program is running.  To do this, use the @code{kill} command
 @cindex dynamic linking
 @item add-symbol-file @var{filename} @var{address}
 @itemx add-symbol-file @var{filename} @var{address} @r{[} -readnow @r{]}
-@itemx add-symbol-file @var{filename} @r{-s}@var{section} @var{address} @dots{}
+@itemx add-symbol-file @var{filename} @var{address} -s @var{section} @var{address} @dots{}
 The @code{add-symbol-file} command reads additional symbol table
 information from the file @var{filename}.  You would use this command
 when @var{filename} has been dynamically loaded (by some other means)
 into the program that is running.  @var{address} should be the memory
 address at which the file has been loaded; @value{GDBN} cannot figure
 this out for itself.  You can additionally specify an arbitrary number
-of @samp{@r{-s}@var{section} @var{address}} pairs, to give an explicit
+of @samp{-s @var{section} @var{address}} pairs, to give an explicit
 section name and base address for that section.  You can specify any
 @var{address} as an expression.
 
@@ -16125,6 +16248,7 @@ target system with the same privileges as the user running
 
 @subsection Running @code{gdbserver}
 @cindex arguments, to @code{gdbserver}
+@cindex @code{gdbserver}, command-line arguments
 
 Run @code{gdbserver} on the target system.  You need a copy of the
 program you want to debug, including any libraries it requires.
@@ -16171,6 +16295,8 @@ and exits.}  You must use the same port number with the host @value{GDBN}
 @code{target remote} command.
 
 @subsubsection Attaching to a Running Program
+@cindex attach to a program, @code{gdbserver}
+@cindex @option{--attach}, @code{gdbserver} option
 
 On some targets, @code{gdbserver} can also attach to running programs.
 This is accomplished via the @code{--attach} argument.  The syntax is:
@@ -16183,7 +16309,6 @@ target> gdbserver --attach @var{comm} @var{pid}
 to point @code{gdbserver} at a binary for the running process.
 
 @pindex pidof
-@cindex attach to a program by name
 You can debug processes by name instead of process ID if your target has the
 @code{pidof} utility:
 
@@ -16196,8 +16321,8 @@ has multiple threads, most versions of @code{pidof} support the
 @code{-s} option to only return the first process ID.
 
 @subsubsection Multi-Process Mode for @code{gdbserver}
-@cindex gdbserver, multiple processes
-@cindex multiple processes with gdbserver
+@cindex @code{gdbserver}, multiple processes
+@cindex multiple processes with @code{gdbserver}
 
 When you connect to @code{gdbserver} using @code{target remote},
 @code{gdbserver} debugs the specified program only once.  When the
@@ -16214,23 +16339,60 @@ remote exec-file}) to select the program to run.  Command line
 arguments are supported, except for wildcard expansion and I/O
 redirection (@pxref{Arguments}).
 
+@cindex @option{--multi}, @code{gdbserver} option
 To start @code{gdbserver} without supplying an initial command to run
 or process ID to attach, use the @option{--multi} command line option.
 Then you can connect using @kbd{target extended-remote} and start
 the program you want to debug.
 
-@code{gdbserver} does not automatically exit in multi-process mode.
-You can terminate it by using @code{monitor exit}
-(@pxref{Monitor Commands for gdbserver}).
+In multi-process mode @code{gdbserver} does not automatically exit unless you
+use the option @option{--once}.  You can terminate it by using
+@code{monitor exit} (@pxref{Monitor Commands for gdbserver}).  Note that the
+conditions under which @code{gdbserver} terminates depend on how @value{GDBN}
+connects to it (@kbd{target remote} or @kbd{target extended-remote}).  The
+@option{--multi} option to @code{gdbserver} has no influence on that.
+
+@subsubsection TCP port allocation lifecycle of @code{gdbserver}
+
+This section applies only when @code{gdbserver} is run to listen on a TCP port.
+
+@code{gdbserver} normally terminates after all of its debugged processes have
+terminated in @kbd{target remote} mode.  On the other hand, for @kbd{target
+extended-remote}, @code{gdbserver} stays running even with no processes left.
+@value{GDBN} normally terminates the spawned debugged process on its exit,
+which normally also terminates @code{gdbserver} in the @kbd{target remote}
+mode.  Therefore, when the connection drops unexpectedly, and @value{GDBN}
+cannot ask @code{gdbserver} to kill its debugged processes, @code{gdbserver}
+stays running even in the @kbd{target remote} mode.
+
+When @code{gdbserver} stays running, @value{GDBN} can connect to it again later.
+Such reconnecting is useful for features like @ref{disconnected tracing}.  For
+completeness, at most one @value{GDBN} can be connected at a time.
+
+@cindex @option{--once}, @code{gdbserver} option
+By default, @code{gdbserver} keeps the listening TCP port open, so that
+additional connections are possible.  However, if you start @code{gdbserver}
+with the @option{--once} option, it will stop listening for any further
+connection attempts after connecting to the first @value{GDBN} session.  This
+means no further connections to @code{gdbserver} will be possible after the
+first one.  It also means @code{gdbserver} will terminate after the first
+connection with remote @value{GDBN} has closed, even for unexpectedly closed
+connections and even in the @kbd{target extended-remote} mode.  The
+@option{--once} option allows reusing the same port number for connecting to
+multiple instances of @code{gdbserver} running on the same host, since each
+instance closes its port after the first connection.
 
 @subsubsection Other Command-Line Arguments for @code{gdbserver}
 
+@cindex @option{--debug}, @code{gdbserver} option
 The @option{--debug} option tells @code{gdbserver} to display extra
-status information about the debugging process.  The
-@option{--remote-debug} option tells @code{gdbserver} to display
+status information about the debugging process.
+@cindex @option{--remote-debug}, @code{gdbserver} option
+The @option{--remote-debug} option tells @code{gdbserver} to display
 remote protocol debug output.  These options are intended for
 @code{gdbserver} development and for bug reports to the developers.
 
+@cindex @option{--wrapper}, @code{gdbserver} option
 The @option{--wrapper} option specifies a wrapper to launch programs
 for debugging.  The option should be followed by the name of the
 wrapper, then any command-line arguments to pass to the wrapper, then
@@ -16305,7 +16467,10 @@ protocol (@pxref{Remote Protocol}).
 When this command is issued, @var{path} is a colon-separated list of
 directories to search for @code{libthread_db} (@pxref{Threads,,set
 libthread-db-search-path}).  If you omit @var{path},
-@samp{libthread-db-search-path} will be reset to an empty list.
+@samp{libthread-db-search-path} will be reset to its default value.
+
+The special entry @samp{$pdir} for @samp{libthread-db-search-path} is
+not supported in @code{gdbserver}.
 
 @item monitor exit
 Tell gdbserver to exit immediately.  This command should be followed by
@@ -16494,6 +16659,18 @@ responses.
 Restrict @value{GDBN} to using @var{limit} remote hardware breakpoint or
 watchpoints.  A limit of -1, the default, is treated as unlimited.
 
+@cindex limit hardware watchpoints length
+@cindex remote target, limit watchpoints length
+@anchor{set remote hardware-watchpoint-length-limit}
+@item set remote hardware-watchpoint-length-limit @var{limit}
+Restrict @value{GDBN} to using @var{limit} bytes for the maximum length of
+a remote hardware watchpoint.  A limit of -1, the default, is treated
+as unlimited.
+
+@item show remote hardware-watchpoint-length-limit
+Show the current limit (in bytes) of the maximum length of
+a remote hardware watchpoint.
+
 @item set remote exec-file @var{filename}
 @itemx show remote exec-file
 @anchor{set remote exec-file}
@@ -18733,9 +18910,30 @@ region using one of the following commands (@pxref{Expressions}):
 (@value{GDBP}) watch @{char[@var{length}]@} @var{address}
 @end smallexample
 
+PowerPC embedded processors support masked watchpoints.  See the discussion
+about the @code{mask} argument in @ref{Set Watchpoints}.
+
+@cindex ranged breakpoint
+PowerPC embedded processors support hardware accelerated
+@dfn{ranged breakpoints}.  A ranged breakpoint stops execution of
+the inferior whenever it executes an instruction at any address within
+the range it specifies.  To set a ranged breakpoint in @value{GDBN},
+use the @code{break-range} command.
+
 @value{GDBN} provides the following PowerPC-specific commands:
 
 @table @code
+@kindex break-range
+@item break-range @var{start-location}, @var{end-location}
+Set a breakpoint for an address range.
+@var{start-location} and @var{end-location} can specify a function name,
+a line number, an offset of lines from the current line or from the start
+location, or an address of an instruction (see @ref{Specify Location},
+for a list of all the possible ways to specify a @var{location}.)
+The breakpoint will stop execution of the inferior whenever it
+executes an instruction at any address within the specified range,
+(including @var{start-location} and @var{end-location}.)
+
 @kindex set powerpc
 @item set powerpc soft-float
 @itemx show powerpc soft-float
@@ -19426,6 +19624,35 @@ Directs @value{GDBN} to use @var{newprompt} as its prompt string henceforth.
 Prints a line of the form: @samp{Gdb's prompt is: @var{your-prompt}}
 @end table
 
+Versions of @value{GDBN} that ship with Python scripting enabled have
+prompt extensions.  The commands for interacting with these extensions
+are:
+
+@table @code
+@kindex set extended-prompt
+@item set extended-prompt @var{prompt}
+Set an extended prompt that allows for substitutions.
+@xref{gdb.prompt}, for a list of escape sequences that can be used for
+substitution.  Any escape sequences specified as part of the prompt
+string are replaced with the corresponding strings each time the prompt
+is displayed.
+
+For example:
+
+@smallexample
+set extended-prompt Current working directory: \w (gdb)
+@end smallexample
+
+Note that when an extended-prompt is set, it takes control of the
+@var{prompt_hook} hook.  @xref{prompt_hook}, for further information.
+
+@kindex show extended-prompt
+@item show extended-prompt
+Prints the extended prompt.  Any escape sequences specified as part of
+the prompt string with @code{set extended-prompt}, are replaced with the
+corresponding strings each time the prompt is displayed.
+@end table
+
 @node Editing
 @section Command Editing
 @cindex readline
@@ -19922,6 +20149,16 @@ Display debugging messages about inner workings of the AIX thread
 module.
 @item show debug aix-thread
 Show the current state of AIX thread debugging info display.
+@item set debug check-physname
+@cindex physname
+Check the results of the ``physname'' computation.  When reading DWARF
+debugging information for C@t{++}, @value{GDBN} attempts to compute
+each entity's name.  @value{GDBN} can do this computation in two
+different ways, depending on exactly what information is present.
+When enabled, this setting causes @value{GDBN} to compute the names
+both ways and display any discrepancies.
+@item show debug check-physname
+Show the current state of ``physname'' checking.
 @item set debug dwarf2-die
 @cindex DWARF2 DIEs
 Dump DWARF2 DIEs after they are read in.
@@ -19980,12 +20217,6 @@ Displays the current state of @value{GDBN} JIT debugging.
 Turns on or off debugging messages from the Linux LWP debug support.
 @item show debug lin-lwp
 Show the current state of Linux LWP debugging messages.
-@item set debug lin-lwp-async
-@cindex @sc{gnu}/Linux LWP async debug messages
-@cindex Linux lightweight processes
-Turns on or off debugging messages from the Linux LWP async debug support.
-@item show debug lin-lwp-async
-Show the current state of Linux LWP async debugging messages.
 @item set debug observer
 @cindex observer debugging info
 Turns on or off display of @value{GDBN} observer debugging.  This
@@ -20647,6 +20878,12 @@ This directory, known as the @dfn{python directory},
 is automatically added to the Python Search Path in order to allow
 the Python interpreter to locate all scripts installed at this location.
 
+Additionally, @value{GDBN} commands and convenience functions which
+are written in Python and are located in the
+@file{@var{data-directory}/python/gdb/command} or
+@file{@var{data-directory}/python/gdb/function} directories are
+automatically imported when @value{GDBN} starts.
+
 @menu
 * Python Commands::             Accessing Python from @value{GDBN}.
 * Python API::                  Accessing @value{GDBN} from Python.
@@ -20692,10 +20929,15 @@ End with a line saying just "end".
 
 @kindex maint set python print-stack
 @item maint set python print-stack
-By default, @value{GDBN} will print a stack trace when an error occurs
-in a Python script.  This can be controlled using @code{maint set
-python print-stack}: if @code{on}, the default, then Python stack
-printing is enabled; if @code{off}, then Python stack printing is
+This command is now deprecated.  Instead use @code{set python
+print-stack} 
+
+@kindex set python print-stack
+@item set python print-stack
+By default, @value{GDBN} will not print a stack trace when an error
+occurs in a Python script.  This can be controlled using @code{set
+python print-stack}: if @code{on}, then Python stack printing is
+enabled; if @code{off}, the default, then Python stack printing is
 disabled.
 @end table
 
@@ -20762,12 +21004,12 @@ methods and classes added by @value{GDBN} are placed in this module.
 use in all scripts evaluated by the @code{python} command.
 
 @findex gdb.PYTHONDIR
-@defvar PYTHONDIR
+@defvar gdb.PYTHONDIR
 A string containing the python directory (@pxref{Python}).
 @end defvar
 
 @findex gdb.execute
-@defun execute command [from_tty] [to_string]
+@defun gdb.execute (command @r{[}, from_tty @r{[}, to_string@r{]]})
 Evaluate @var{command}, a string, as a @value{GDBN} CLI command.
 If a GDB exception happens while @var{command} runs, it is
 translated as described in @ref{Exception Handling,,Exception Handling}.
@@ -20786,13 +21028,13 @@ and height, and its pagination will be disabled; @pxref{Screen Size}.
 @end defun
 
 @findex gdb.breakpoints
-@defun breakpoints
+@defun gdb.breakpoints ()
 Return a sequence holding all of @value{GDBN}'s breakpoints.
 @xref{Breakpoints In Python}, for more information.
 @end defun
 
 @findex gdb.parameter
-@defun parameter parameter
+@defun gdb.parameter (parameter)
 Return the value of a @value{GDBN} parameter.  @var{parameter} is a
 string naming the parameter to look up; @var{parameter} may contain
 spaces if the parameter has a multi-part name.  For example,
@@ -20805,7 +21047,7 @@ type, and returned.
 @end defun
 
 @findex gdb.history
-@defun history number
+@defun gdb.history (number)
 Return a value from @value{GDBN}'s value history (@pxref{Value
 History}).  @var{number} indicates which history element to return.
 If @var{number} is negative, then @value{GDBN} will take its absolute value
@@ -20820,7 +21062,7 @@ If no exception is raised, the return value is always an instance of
 @end defun
 
 @findex gdb.parse_and_eval
-@defun parse_and_eval expression
+@defun gdb.parse_and_eval (expression)
 Parse @var{expression} as an expression in the current language,
 evaluate it, and return the result as a @code{gdb.Value}.
 @var{expression} must be a string.
@@ -20833,7 +21075,7 @@ convenience variable (@pxref{Convenience Vars}) as a @code{gdb.Value}.
 @end defun
 
 @findex gdb.post_event
-@defun post_event event
+@defun gdb.post_event (event)
 Put @var{event}, a callable object taking no arguments, into
 @value{GDBN}'s internal event queue.  This callable will be invoked at
 some later point, during @value{GDBN}'s event processing.  Events
@@ -20871,29 +21113,75 @@ this.  For example:
 @end smallexample
 @end defun
 
-@findex gdb.write
-@defun write string
-Print a string to @value{GDBN}'s paginated standard output stream.
+@findex gdb.write 
+@defun gdb.write (string @r{[}, stream{]})
+Print a string to @value{GDBN}'s paginated output stream.  The
+optional @var{stream} determines the stream to print to.  The default
+stream is @value{GDBN}'s standard output stream.  Possible stream
+values are:
+
+@table @code
+@findex STDOUT
+@findex gdb.STDOUT
+@item gdb.STDOUT
+@value{GDBN}'s standard output stream.
+
+@findex STDERR
+@findex gdb.STDERR
+@item gdb.STDERR
+@value{GDBN}'s standard error stream.
+
+@findex STDLOG
+@findex gdb.STDLOG
+@item gdb.STDLOG
+@value{GDBN}'s log stream (@pxref{Logging Output}).
+@end table
+
 Writing to @code{sys.stdout} or @code{sys.stderr} will automatically
-call this function.
+call this function and will automatically direct the output to the
+relevant stream.
 @end defun
 
 @findex gdb.flush
-@defun flush
-Flush @value{GDBN}'s paginated standard output stream.  Flushing
-@code{sys.stdout} or @code{sys.stderr} will automatically call this
-function.
+@defun gdb.flush ()
+Flush the buffer of a @value{GDBN} paginated stream so that the
+contents are displayed immediately.  @value{GDBN} will flush the
+contents of a stream automatically when it encounters a newline in the
+buffer.  The optional @var{stream} determines the stream to flush.  The
+default stream is @value{GDBN}'s standard output stream.  Possible
+stream values are: 
+
+@table @code
+@findex STDOUT
+@findex gdb.STDOUT
+@item gdb.STDOUT
+@value{GDBN}'s standard output stream.
+
+@findex STDERR
+@findex gdb.STDERR
+@item gdb.STDERR
+@value{GDBN}'s standard error stream.
+
+@findex STDLOG
+@findex gdb.STDLOG
+@item gdb.STDLOG
+@value{GDBN}'s log stream (@pxref{Logging Output}).
+
+@end table
+
+Flushing @code{sys.stdout} or @code{sys.stderr} will automatically
+call this function for the relevant stream.
 @end defun
 
 @findex gdb.target_charset
-@defun target_charset
+@defun gdb.target_charset ()
 Return the name of the current target character set (@pxref{Character
 Sets}).  This differs from @code{gdb.parameter('target-charset')} in
 that @samp{auto} is never returned.
 @end defun
 
 @findex gdb.target_wide_charset
-@defun target_wide_charset
+@defun gdb.target_wide_charset ()
 Return the name of the current target wide character set
 (@pxref{Character Sets}).  This differs from
 @code{gdb.parameter('target-wide-charset')} in that @samp{auto} is
@@ -20901,13 +21189,13 @@ never returned.
 @end defun
 
 @findex gdb.solib_name
-@defun solib_name address
+@defun gdb.solib_name (address)
 Return the name of the shared library holding the given @var{address}
 as a string, or @code{None}.
 @end defun
 
 @findex gdb.decode_line 
-@defun decode_line @r{[}expression@r{]}
+@defun gdb.decode_line @r{[}expression@r{]}
 Return locations of the line specified by @var{expression}, or of the
 current line if no argument was given.  This function returns a Python
 tuple containing two elements.  The first element contains a string
@@ -20920,6 +21208,24 @@ provided, it is decoded the way that @value{GDBN}'s inbuilt
 @code{break} or @code{edit} commands do (@pxref{Specify Location}).
 @end defun
 
+@defun gdb.prompt_hook (current_prompt)
+@anchor{prompt_hook}
+
+If @var{prompt_hook} is callable, @value{GDBN} will call the method
+assigned to this operation before a prompt is displayed by
+@value{GDBN}.
+
+The parameter @code{current_prompt} contains the current @value{GDBN} 
+prompt.  This method must return a Python string, or @code{None}.  If
+a string is returned, the @value{GDBN} prompt will be set to that
+string.  If @code{None} is returned, @value{GDBN} will continue to use
+the current prompt.
+
+Some prompts cannot be substituted in @value{GDBN}.  Secondary prompts
+such as those used by readline for command input, and annotation
+related prompts are prohibited from being changed.
+@end defun
+
 @node Exception Handling
 @subsubsection Exception Handling
 @cindex python exceptions
@@ -21044,24 +21350,24 @@ Any values returned from a function call will be stored as a
 The following attributes are provided:
 
 @table @code
-@defivar Value address
+@defvar Value.address
 If this object is addressable, this read-only attribute holds a
 @code{gdb.Value} object representing the address.  Otherwise,
 this attribute holds @code{None}.
-@end defivar
+@end defvar
 
 @cindex optimized out value in Python
-@defivar Value is_optimized_out
+@defvar Value.is_optimized_out
 This read-only boolean attribute is true if the compiler optimized out
 this value, thus it is not available for fetching from the inferior.
-@end defivar
+@end defvar
 
-@defivar Value type
+@defvar Value.type
 The type of this @code{gdb.Value}.  The value of this attribute is a
 @code{gdb.Type} object (@pxref{Types In Python}).
-@end defivar
+@end defvar
 
-@defivar Value dynamic_type
+@defvar Value.dynamic_type
 The dynamic type of this @code{gdb.Value}.  This uses C@t{++} run-time
 type information (@acronym{RTTI}) to determine the dynamic type of the
 value.  If this value is of class type, it will return the class in
@@ -21075,13 +21381,13 @@ Note that this feature will only work when debugging a C@t{++} program
 that includes @acronym{RTTI} for the object in question.  Otherwise,
 it will just return the static type of the value as in @kbd{ptype foo}
 (@pxref{Symbols, ptype}).
-@end defivar
+@end defvar
 @end table
 
 The following methods are provided:
 
 @table @code
-@defmethod Value __init__ @var{val}
+@defun Value.__init__ (@var{val})
 Many Python values can be converted directly to a @code{gdb.Value} via
 this object initializer.  Specifically:
 
@@ -21114,16 +21420,16 @@ If @code{val} is a @code{gdb.LazyString} (@pxref{Lazy Strings In
 Python}), then the lazy string's @code{value} method is called, and
 its result is used.
 @end table
-@end defmethod
+@end defun
 
-@defmethod Value cast type
+@defun Value.cast (type)
 Return a new instance of @code{gdb.Value} that is the result of
 casting this instance to the type described by @var{type}, which must
 be a @code{gdb.Type} object.  If the cast cannot be performed for some
 reason, this method throws an exception.
-@end defmethod
+@end defun
 
-@defmethod Value dereference
+@defun Value.dereference ()
 For pointer data types, this method returns a new @code{gdb.Value} object
 whose contents is the object pointed to by the pointer.  For example, if
 @code{foo} is a C pointer to an @code{int}, declared in your C program as
@@ -21142,19 +21448,19 @@ bar = foo.dereference ()
 
 The result @code{bar} will be a @code{gdb.Value} object holding the
 value pointed to by @code{foo}.
-@end defmethod
+@end defun
 
-@defmethod Value dynamic_cast type
+@defun Value.dynamic_cast (type)
 Like @code{Value.cast}, but works as if the C@t{++} @code{dynamic_cast}
 operator were used.  Consult a C@t{++} reference for details.
-@end defmethod
+@end defun
 
-@defmethod Value reinterpret_cast type
+@defun Value.reinterpret_cast (type)
 Like @code{Value.cast}, but works as if the C@t{++} @code{reinterpret_cast}
 operator were used.  Consult a C@t{++} reference for details.
-@end defmethod
+@end defun
 
-@defmethod Value string @r{[}encoding@r{]} @r{[}errors@r{]} @r{[}length@r{]}
+@defun Value.string (@r{[}encoding@r{[}, errors@r{[}, length@r{]]]})
 If this @code{gdb.Value} represents a string, then this method
 converts the contents to a Python string.  Otherwise, this method will
 throw an exception.
@@ -21184,9 +21490,9 @@ argument to Python's @code{string.decode} method.
 
 If the optional @var{length} argument is given, the string will be
 fetched and converted to the given length.
-@end defmethod
+@end defun
 
-@defmethod Value lazy_string @r{[}encoding@r{]} @r{[}length@r{]}
+@defun Value.lazy_string (@r{[}encoding @r{[}, length@r{]]})
 If this @code{gdb.Value} represents a string, then this method
 converts the contents to a @code{gdb.LazyString} (@pxref{Lazy Strings
 In Python}).  Otherwise, this method will throw an exception.
@@ -21208,7 +21514,7 @@ If the optional @var{length} argument is given, the string will be
 fetched and encoded to the length of characters specified.  If
 the @var{length} argument is not provided, the string will be fetched
 and encoded until a null of appropriate width is found.
-@end defmethod
+@end defun
 @end table
 
 @node Types In Python
@@ -21224,7 +21530,7 @@ The following type-related functions are available in the @code{gdb}
 module:
 
 @findex gdb.lookup_type
-@defun lookup_type name [block]
+@defun gdb.lookup_type (name @r{[}, block@r{]})
 This function looks up a type by name.  @var{name} is the name of the
 type to look up.  It must be a string.
 
@@ -21235,32 +21541,45 @@ Ordinarily, this function will return an instance of @code{gdb.Type}.
 If the named type cannot be found, it will throw an exception.
 @end defun
 
+If the type is a structure or class type, or an enum type, the fields
+of that type can be accessed using the Python @dfn{dictionary syntax}.
+For example, if @code{some_type} is a @code{gdb.Type} instance holding
+a structure type, you can access its @code{foo} field with:
+
+@smallexample
+bar = some_type['foo']
+@end smallexample
+
+@code{bar} will be a @code{gdb.Field} object; see below under the
+description of the @code{Type.fields} method for a description of the
+@code{gdb.Field} class.
+
 An instance of @code{Type} has the following attributes:
 
 @table @code
-@defivar Type code
+@defvar Type.code
 The type code for this type.  The type code will be one of the
 @code{TYPE_CODE_} constants defined below.
-@end defivar
+@end defvar
 
-@defivar Type sizeof
+@defvar Type.sizeof
 The size of this type, in target @code{char} units.  Usually, a
 target's @code{char} type will be an 8-bit byte.  However, on some
 unusual platforms, this type may have a different size.
-@end defivar
+@end defvar
 
-@defivar Type tag
+@defvar Type.tag
 The tag name for this type.  The tag name is the name after
 @code{struct}, @code{union}, or @code{enum} in C and C@t{++}; not all
 languages have this concept.  If this type has no tag name, then
 @code{None} is returned.
-@end defivar
+@end defvar
 @end table
 
 The following methods are provided:
 
 @table @code
-@defmethod Type fields
+@defun Type.fields ()
 For structure and union types, this method returns the fields.  Range
 types have two fields, the minimum and maximum values.  Enum types
 have one field per enum constant.  Function and method types have one
@@ -21268,12 +21587,13 @@ field per parameter.  The base types of C@t{++} classes are also
 represented as fields.  If the type has no fields, or does not fit
 into one of these categories, an empty sequence will be returned.
 
-Each field is an object, with some pre-defined attributes:
+Each field is a @code{gdb.Field} object, with some pre-defined attributes:
 @table @code
 @item bitpos
 This attribute is not available for @code{static} fields (as in
 C@t{++} or Java).  For non-@code{static} fields, the value is the bit
-position of the field.
+position of the field.  For @code{enum} fields, the value is the
+enumeration member's integer representation.
 
 @item name
 The name of the field, or @code{None} for anonymous fields.
@@ -21298,56 +21618,56 @@ this will be zero; in this case the field's size is given by its type.
 The type of the field.  This is usually an instance of @code{Type},
 but it can be @code{None} in some situations.
 @end table
-@end defmethod
+@end defun
 
-@defmethod Type array @var{n1} @r{[}@var{n2}@r{]}
+@defun Type.array (@var{n1} @r{[}, @var{n2}@r{]})
 Return a new @code{gdb.Type} object which represents an array of this
 type.  If one argument is given, it is the inclusive upper bound of
 the array; in this case the lower bound is zero.  If two arguments are
 given, the first argument is the lower bound of the array, and the
 second argument is the upper bound of the array.  An array's length
 must not be negative, but the bounds can be.
-@end defmethod
+@end defun
 
-@defmethod Type const
+@defun Type.const ()
 Return a new @code{gdb.Type} object which represents a
 @code{const}-qualified variant of this type.
-@end defmethod
+@end defun
 
-@defmethod Type volatile
+@defun Type.volatile ()
 Return a new @code{gdb.Type} object which represents a
 @code{volatile}-qualified variant of this type.
-@end defmethod
+@end defun
 
-@defmethod Type unqualified
+@defun Type.unqualified ()
 Return a new @code{gdb.Type} object which represents an unqualified
 variant of this type.  That is, the result is neither @code{const} nor
 @code{volatile}.
-@end defmethod
+@end defun
 
-@defmethod Type range
+@defun Type.range ()
 Return a Python @code{Tuple} object that contains two elements: the
 low bound of the argument type and the high bound of that type.  If
 the type does not have a range, @value{GDBN} will raise a
 @code{gdb.error} exception (@pxref{Exception Handling}).
-@end defmethod
+@end defun
 
-@defmethod Type reference
+@defun Type.reference ()
 Return a new @code{gdb.Type} object which represents a reference to this
 type.
-@end defmethod
+@end defun
 
-@defmethod Type pointer
+@defun Type.pointer ()
 Return a new @code{gdb.Type} object which represents a pointer to this
 type.
-@end defmethod
+@end defun
 
-@defmethod Type strip_typedefs
+@defun Type.strip_typedefs ()
 Return a new @code{gdb.Type} that represents the real type,
 after removing all layers of typedefs.
-@end defmethod
+@end defun
 
-@defmethod Type target
+@defun Type.target ()
 Return a new @code{gdb.Type} object which represents the target type
 of this type.
 
@@ -21360,9 +21680,9 @@ target type is the aliased type.
 
 If the type does not have a target, this method will throw an
 exception.
-@end defmethod
+@end defun
 
-@defmethod Type template_argument n [block]
+@defun Type.template_argument (n @r{[}, block@r{]})
 If this @code{gdb.Type} is an instantiation of a template, this will
 return a new @code{gdb.Type} which represents the type of the
 @var{n}th template argument.
@@ -21372,7 +21692,7 @@ exception.  Ordinarily, only C@t{++} code will have template types.
 
 If @var{block} is given, then @var{name} is looked up in that scope.
 Otherwise, it is searched for globally.
-@end defmethod
+@end defun
 @end table
 
 
@@ -21383,133 +21703,133 @@ defined in the @code{gdb} module:
 @table @code
 @findex TYPE_CODE_PTR
 @findex gdb.TYPE_CODE_PTR
-@item TYPE_CODE_PTR
+@item gdb.TYPE_CODE_PTR
 The type is a pointer.
 
 @findex TYPE_CODE_ARRAY
 @findex gdb.TYPE_CODE_ARRAY
-@item TYPE_CODE_ARRAY
+@item gdb.TYPE_CODE_ARRAY
 The type is an array.
 
 @findex TYPE_CODE_STRUCT
 @findex gdb.TYPE_CODE_STRUCT
-@item TYPE_CODE_STRUCT
+@item gdb.TYPE_CODE_STRUCT
 The type is a structure.
 
 @findex TYPE_CODE_UNION
 @findex gdb.TYPE_CODE_UNION
-@item TYPE_CODE_UNION
+@item gdb.TYPE_CODE_UNION
 The type is a union.
 
 @findex TYPE_CODE_ENUM
 @findex gdb.TYPE_CODE_ENUM
-@item TYPE_CODE_ENUM
+@item gdb.TYPE_CODE_ENUM
 The type is an enum.
 
 @findex TYPE_CODE_FLAGS
 @findex gdb.TYPE_CODE_FLAGS
-@item TYPE_CODE_FLAGS
+@item gdb.TYPE_CODE_FLAGS
 A bit flags type, used for things such as status registers.
 
 @findex TYPE_CODE_FUNC
 @findex gdb.TYPE_CODE_FUNC
-@item TYPE_CODE_FUNC
+@item gdb.TYPE_CODE_FUNC
 The type is a function.
 
 @findex TYPE_CODE_INT
 @findex gdb.TYPE_CODE_INT
-@item TYPE_CODE_INT
+@item gdb.TYPE_CODE_INT
 The type is an integer type.
 
 @findex TYPE_CODE_FLT
 @findex gdb.TYPE_CODE_FLT
-@item TYPE_CODE_FLT
+@item gdb.TYPE_CODE_FLT
 A floating point type.
 
 @findex TYPE_CODE_VOID
 @findex gdb.TYPE_CODE_VOID
-@item TYPE_CODE_VOID
+@item gdb.TYPE_CODE_VOID
 The special type @code{void}.
 
 @findex TYPE_CODE_SET
 @findex gdb.TYPE_CODE_SET
-@item TYPE_CODE_SET
+@item gdb.TYPE_CODE_SET
 A Pascal set type.
 
 @findex TYPE_CODE_RANGE
 @findex gdb.TYPE_CODE_RANGE
-@item TYPE_CODE_RANGE
+@item gdb.TYPE_CODE_RANGE
 A range type, that is, an integer type with bounds.
 
 @findex TYPE_CODE_STRING
 @findex gdb.TYPE_CODE_STRING
-@item TYPE_CODE_STRING
+@item gdb.TYPE_CODE_STRING
 A string type.  Note that this is only used for certain languages with
 language-defined string types; C strings are not represented this way.
 
 @findex TYPE_CODE_BITSTRING
 @findex gdb.TYPE_CODE_BITSTRING
-@item TYPE_CODE_BITSTRING
+@item gdb.TYPE_CODE_BITSTRING
 A string of bits.
 
 @findex TYPE_CODE_ERROR
 @findex gdb.TYPE_CODE_ERROR
-@item TYPE_CODE_ERROR
+@item gdb.TYPE_CODE_ERROR
 An unknown or erroneous type.
 
 @findex TYPE_CODE_METHOD
 @findex gdb.TYPE_CODE_METHOD
-@item TYPE_CODE_METHOD
+@item gdb.TYPE_CODE_METHOD
 A method type, as found in C@t{++} or Java.
 
 @findex TYPE_CODE_METHODPTR
 @findex gdb.TYPE_CODE_METHODPTR
-@item TYPE_CODE_METHODPTR
+@item gdb.TYPE_CODE_METHODPTR
 A pointer-to-member-function.
 
 @findex TYPE_CODE_MEMBERPTR
 @findex gdb.TYPE_CODE_MEMBERPTR
-@item TYPE_CODE_MEMBERPTR
+@item gdb.TYPE_CODE_MEMBERPTR
 A pointer-to-member.
 
 @findex TYPE_CODE_REF
 @findex gdb.TYPE_CODE_REF
-@item TYPE_CODE_REF
+@item gdb.TYPE_CODE_REF
 A reference type.
 
 @findex TYPE_CODE_CHAR
 @findex gdb.TYPE_CODE_CHAR
-@item TYPE_CODE_CHAR
+@item gdb.TYPE_CODE_CHAR
 A character type.
 
 @findex TYPE_CODE_BOOL
 @findex gdb.TYPE_CODE_BOOL
-@item TYPE_CODE_BOOL
+@item gdb.TYPE_CODE_BOOL
 A boolean type.
 
 @findex TYPE_CODE_COMPLEX
 @findex gdb.TYPE_CODE_COMPLEX
-@item TYPE_CODE_COMPLEX
+@item gdb.TYPE_CODE_COMPLEX
 A complex float type.
 
 @findex TYPE_CODE_TYPEDEF
 @findex gdb.TYPE_CODE_TYPEDEF
-@item TYPE_CODE_TYPEDEF
+@item gdb.TYPE_CODE_TYPEDEF
 A typedef to some other type.
 
 @findex TYPE_CODE_NAMESPACE
 @findex gdb.TYPE_CODE_NAMESPACE
-@item TYPE_CODE_NAMESPACE
+@item gdb.TYPE_CODE_NAMESPACE
 A C@t{++} namespace.
 
 @findex TYPE_CODE_DECFLOAT
 @findex gdb.TYPE_CODE_DECFLOAT
-@item TYPE_CODE_DECFLOAT
+@item gdb.TYPE_CODE_DECFLOAT
 A decimal floating point type.
 
 @findex TYPE_CODE_INTERNAL_FUNCTION
 @findex gdb.TYPE_CODE_INTERNAL_FUNCTION
-@item TYPE_CODE_INTERNAL_FUNCTION
+@item gdb.TYPE_CODE_INTERNAL_FUNCTION
 A function internal to @value{GDBN}.  This is the type used to represent
 convenience functions.
 @end table
@@ -21525,7 +21845,7 @@ An example output is provided (@pxref{Pretty Printing}).
 A pretty-printer is just an object that holds a value and implements a
 specific interface, defined here.
 
-@defop Operation {pretty printer} children (self)
+@defun pretty_printer.children (self)
 @value{GDBN} will call this method on a pretty-printer to compute the
 children of the pretty-printer's value.
 
@@ -21537,9 +21857,9 @@ object which is convertible to a @value{GDBN} value.
 
 This method is optional.  If it does not exist, @value{GDBN} will act
 as though the value has no children.
-@end defop
+@end defun
 
-@defop Operation {pretty printer} display_hint (self)
+@defun pretty_printer.display_hint (self)
 The CLI may call this method and use its result to change the
 formatting of a value.  The result will also be supplied to an MI
 consumer as a @samp{displayhint} attribute of the variable being
@@ -21569,9 +21889,9 @@ string-printing function to format the string.  For the CLI this means
 adding quotation marks, possibly escaping some characters, respecting
 @code{set print elements}, and the like.
 @end table
-@end defop
+@end defun
 
-@defop Operation {pretty printer} to_string (self)
+@defun pretty_printer.to_string (self)
 @value{GDBN} will call this method to display the string
 representation of the value passed to the object's constructor.
 
@@ -21599,13 +21919,13 @@ Finally, if this method returns @code{None} then no further operations
 are peformed in this method and nothing is printed.
 
 If the result is not one of these types, an exception is raised.
-@end defop
+@end defun
 
 @value{GDBN} provides a function which can be used to look up the
 default pretty-printer for a @code{gdb.Value}:
 
 @findex gdb.default_visualizer
-@defun default_visualizer value
+@defun gdb.default_visualizer (value)
 This function takes a @code{gdb.Value} object as an argument.  If a
 pretty-printer for this value exists, then it is returned.  If no such
 printer exists, then this returns @code{None}.
@@ -21839,56 +22159,68 @@ via objects of the @code{gdb.Inferior} class.
 The following inferior-related functions are available in the @code{gdb}
 module:
 
-@defun inferiors
+@defun gdb.inferiors ()
 Return a tuple containing all inferior objects.
 @end defun
 
+@defun gdb.selected_inferior ()
+Return an object representing the current inferior.
+@end defun
+
 A @code{gdb.Inferior} object has the following attributes:
 
 @table @code
-@defivar Inferior num
+@defvar Inferior.num
 ID of inferior, as assigned by GDB.
-@end defivar
+@end defvar
 
-@defivar Inferior pid
+@defvar Inferior.pid
 Process ID of the inferior, as assigned by the underlying operating
 system.
-@end defivar
+@end defvar
 
-@defivar Inferior was_attached
+@defvar Inferior.was_attached
 Boolean signaling whether the inferior was created using `attach', or
 started by @value{GDBN} itself.
-@end defivar
+@end defvar
 @end table
 
 A @code{gdb.Inferior} object has the following methods:
 
 @table @code
-@defmethod Inferior threads
+@defun Inferior.is_valid ()
+Returns @code{True} if the @code{gdb.Inferior} object is valid,
+@code{False} if not.  A @code{gdb.Inferior} object will become invalid
+if the inferior no longer exists within @value{GDBN}.  All other
+@code{gdb.Inferior} methods will throw an exception if it is invalid
+at the time the method is called.
+@end defun
+
+@defun Inferior.threads ()
 This method returns a tuple holding all the threads which are valid
 when it is called.  If there are no valid threads, the method will
 return an empty tuple.
-@end defmethod
+@end defun
 
 @findex gdb.read_memory
-@defmethod Inferior read_memory address length
+@defun Inferior.read_memory (address, length)
 Read @var{length} bytes of memory from the inferior, starting at
 @var{address}.  Returns a buffer object, which behaves much like an array
 or a string.  It can be modified and given to the @code{gdb.write_memory}
 function.
-@end defmethod
+@end defun
 
 @findex gdb.write_memory
-@defmethod Inferior write_memory address buffer @r{[}length@r{]}
+@defun Inferior.write_memory (address, buffer @r{[}, length@r{]})
 Write the contents of @var{buffer} to the inferior, starting at
 @var{address}.  The @var{buffer} parameter must be a Python object
 which supports the buffer protocol, i.e., a string, an array or the
 object returned from @code{gdb.read_memory}.  If given, @var{length}
 determines the number of bytes from @var{buffer} to be written.
-@end defmethod
+@end defun
 
 @findex gdb.search_memory
-@defmethod Inferior search_memory address length pattern
+@defun Inferior.search_memory (address, length, pattern)
 Search a region of the inferior memory starting at @var{address} with
 the given @var{length} using the search pattern supplied in
 @var{pattern}.  The @var{pattern} parameter must be a Python object
@@ -21896,7 +22228,7 @@ which supports the buffer protocol, i.e., a string, an array or the
 object returned from @code{gdb.read_memory}.  Returns a Python @code{Long}
 containing the address where the pattern was found, or @code{None} if
 the pattern could not be found.
-@end defmethod
+@end defun
 @end table
 
 @node Events In Python
@@ -21917,15 +22249,15 @@ with an @dfn{event registry}.  An event registry is an object in the
 provides methods to register and unregister event handlers:
 
 @table @code
-@defmethod EventRegistry connect object
+@defun EventRegistry.connect (object)
 Add the given callable @var{object} to the registry.  This object will be
 called when an event corresponding to this registry occurs.
-@end defmethod
+@end defun
 
-@defmethod EventRegistry disconnect object
+@defun EventRegistry.disconnect (object)
 Remove the given @var{object} from the registry.  Once removed, the object
 will no longer receive notifications of events.
-@end defmethod
+@end defun
 @end table
 
 Here is an example:
@@ -21961,10 +22293,10 @@ Examples of these events are @code{gdb.BreakpointEvent} and
 @code{gdb.ContinueEvent}.
 
 @table @code
-@defivar ThreadEvent inferior_thread
+@defvar ThreadEvent.inferior_thread
 In non-stop mode this attribute will be set to the specific thread which was
 involved in the emitted event. Otherwise, it will be set to @code{None}.
-@end defivar
+@end defvar
 @end table
 
 Emits @code{gdb.ContinueEvent} which extends @code{gdb.ThreadEvent}.
@@ -21974,11 +22306,17 @@ inherited attribute refer to @code{gdb.ThreadEvent} above.
 
 @item events.exited
 Emits @code{events.ExitedEvent} which indicates that the inferior has exited.
-@code{events.ExitedEvent} has one attribute:
+@code{events.ExitedEvent} has two attributes:
 @table @code
-@defivar ExitedEvent exit_code
-An integer representing the exit code which the inferior has returned.
-@end defivar
+@defvar ExitedEvent.exit_code
+An integer representing the exit code, if available, which the inferior 
+has returned.  (The exit code could be unavailable if, for example,
+@value{GDBN} detaches from the inferior.) If the exit code is unavailable,
+the attribute does not exist.
+@end defvar
+@defvar ExitedEvent inferior
+A reference to the inferior which triggered the @code{exited} event.
+@end defvar
 @end table
 
 @item events.stop
@@ -21995,23 +22333,40 @@ This event indicates that the inferior or one of its threads has received as
 signal.  @code{gdb.SignalEvent} has the following attributes:
 
 @table @code
-@defivar SignalEvent stop_signal
+@defvar SignalEvent.stop_signal
 A string representing the signal received by the inferior.  A list of possible
 signal values can be obtained by running the command @code{info signals} in
 the @value{GDBN} command prompt.
-@end defivar
+@end defvar
 @end table
 
 Also emits  @code{gdb.BreakpointEvent} which extends @code{gdb.StopEvent}.
 
-@code{gdb.BreakpointEvent} event indicates that a breakpoint has been hit, and
-has the following attributes:
+@code{gdb.BreakpointEvent} event indicates that one or more breakpoints have
+been hit, and has the following attributes:
 
 @table @code
-@defivar BreakpointEvent breakpoint
-A reference to the breakpoint that was hit of type @code{gdb.Breakpoint}.
+@defvar BreakpointEvent.breakpoints
+A sequence containing references to all the breakpoints (type 
+@code{gdb.Breakpoint}) that were hit.
 @xref{Breakpoints In Python}, for details of the @code{gdb.Breakpoint} object.
-@end defivar
+@end defvar
+@defvar BreakpointEvent.breakpoint
+A reference to the first breakpoint that was hit.
+This function is maintained for backward compatibility and is now deprecated 
+in favor of the @code{gdb.BreakpointEvent.breakpoints} attribute.
+@end defvar
+@end table
+
+@item events.new_objfile
+Emits @code{gdb.NewObjFileEvent} which indicates that a new object file has
+been loaded by @value{GDBN}.  @code{gdb.NewObjFileEvent} has one attribute:
+
+@table @code
+@defvar NewObjFileEvent.new_objfile
+A reference to the object file (@code{gdb.Objfile}) which has been loaded.
+@xref{Objfiles In Python}, for details of the @code{gdb.Objfile} object.
+@end defvar
 @end table
 
 @end table
@@ -22028,7 +22383,7 @@ The following thread-related functions are available in the @code{gdb}
 module:
 
 @findex gdb.selected_thread
-@defun selected_thread
+@defun gdb.selected_thread ()
 This function returns the thread object for the selected thread.  If there
 is no selected thread, this will return @code{None}.
 @end defun
@@ -22036,7 +22391,7 @@ is no selected thread, this will return @code{None}.
 A @code{gdb.InferiorThread} object has the following attributes:
 
 @table @code
-@defivar InferiorThread name
+@defvar InferiorThread.name
 The name of the thread.  If the user specified a name using
 @code{thread name}, then this returns that name.  Otherwise, if an
 OS-supplied name is available, then it is returned.  Otherwise, this
@@ -22045,40 +22400,48 @@ returns @code{None}.
 This attribute can be assigned to.  The new value must be a string
 object, which sets the new name, or @code{None}, which removes any
 user-specified thread name.
-@end defivar
+@end defvar
 
-@defivar InferiorThread num
+@defvar InferiorThread.num
 ID of the thread, as assigned by GDB.
-@end defivar
+@end defvar
 
-@defivar InferiorThread ptid
+@defvar InferiorThread.ptid
 ID of the thread, as assigned by the operating system.  This attribute is a
 tuple containing three integers.  The first is the Process ID (PID); the second
 is the Lightweight Process ID (LWPID), and the third is the Thread ID (TID).
 Either the LWPID or TID may be 0, which indicates that the operating system
 does not  use that identifier.
-@end defivar
+@end defvar
 @end table
 
 A @code{gdb.InferiorThread} object has the following methods:
 
 @table @code
-@defmethod InferiorThread switch
+@defun InferiorThread.is_valid ()
+Returns @code{True} if the @code{gdb.InferiorThread} object is valid,
+@code{False} if not.  A @code{gdb.InferiorThread} object will become
+invalid if the thread exits, or the inferior that the thread belongs
+is deleted.  All other @code{gdb.InferiorThread} methods will throw an
+exception if it is invalid at the time the method is called.
+@end defun
+
+@defun InferiorThread.switch ()
 This changes @value{GDBN}'s currently selected thread to the one represented
 by this object.
-@end defmethod
+@end defun
 
-@defmethod InferiorThread is_stopped
+@defun InferiorThread.is_stopped ()
 Return a Boolean indicating whether the thread is stopped.
-@end defmethod
+@end defun
 
-@defmethod InferiorThread is_running
+@defun InferiorThread.is_running ()
 Return a Boolean indicating whether the thread is running.
-@end defmethod
+@end defun
 
-@defmethod InferiorThread is_exited
+@defun InferiorThread.is_exited ()
 Return a Boolean indicating whether the thread is exited.
-@end defmethod
+@end defun
 @end table
 
 @node Commands In Python
@@ -22090,7 +22453,7 @@ You can implement new @value{GDBN} CLI commands in Python.  A CLI
 command is implemented using an instance of the @code{gdb.Command}
 class, most commonly using a subclass.
 
-@defmethod Command __init__ name @var{command_class} @r{[}@var{completer_class}@r{]} @r{[}@var{prefix}@r{]}
+@defun Command.__init__ (name, @var{command_class} @r{[}, var{completer_class} @r{[}, var{prefix}@r{]]})
 The object initializer for @code{Command} registers the new command
 with @value{GDBN}.  This initializer is normally invoked from the
 subclass' own @code{__init__} method.
@@ -22121,17 +22484,17 @@ The help text for the new command is taken from the Python
 documentation string for the command's class, if there is one.  If no
 documentation string is provided, the default value ``This command is
 not documented.'' is used.
-@end defmethod
+@end defun
 
 @cindex don't repeat Python command
-@defmethod Command dont_repeat
+@defun Command.dont_repeat ()
 By default, a @value{GDBN} command is repeated when the user enters a
 blank line at the command prompt.  A command can suppress this
 behavior by invoking the @code{dont_repeat} method.  This is similar
 to the user command @code{dont-repeat}, see @ref{Define, dont-repeat}.
-@end defmethod
+@end defun
 
-@defmethod Command invoke argument from_tty
+@defun Command.invoke (argument, from_tty)
 This method is called by @value{GDBN} when this command is invoked.
 
 @var{argument} is a string.  It is the argument to the command, after
@@ -22157,10 +22520,10 @@ print gdb.string_to_argv ("1 2\ \\\"3 '4 \"5' \"6 '7\"")
 ['1', '2 "3', '4 "5', "6 '7"]
 @end smallexample
 
-@end defmethod
+@end defun
 
 @cindex completion of Python commands
-@defmethod Command complete text word
+@defun Command.complete (text, word)
 This method is called by @value{GDBN} when the user attempts
 completion on this command.  All forms of completion are handled by
 this method, that is, the @key{TAB} and @key{M-?} key bindings
@@ -22191,7 +22554,7 @@ function is invoked, and its result is used.
 All other results are treated as though there were no available
 completions.
 @end itemize
-@end defmethod
+@end defun
 
 When a new command is registered, it must be declared as a member of
 some general class of commands.  This is used to classify top-level
@@ -22203,13 +22566,13 @@ defined in the @code{gdb} module:
 @table @code
 @findex COMMAND_NONE
 @findex gdb.COMMAND_NONE
-@item COMMAND_NONE
+@item gdb.COMMAND_NONE
 The command does not belong to any particular class.  A command in
 this category will not be displayed in any of the help categories.
 
 @findex COMMAND_RUNNING
 @findex gdb.COMMAND_RUNNING
-@item COMMAND_RUNNING
+@item gdb.COMMAND_RUNNING
 The command is related to running the inferior.  For example,
 @code{start}, @code{step}, and @code{continue} are in this category.
 Type @kbd{help running} at the @value{GDBN} prompt to see a list of
@@ -22217,7 +22580,7 @@ commands in this category.
 
 @findex COMMAND_DATA
 @findex gdb.COMMAND_DATA
-@item COMMAND_DATA
+@item gdb.COMMAND_DATA
 The command is related to data or variables.  For example,
 @code{call}, @code{find}, and @code{print} are in this category.  Type
 @kbd{help data} at the @value{GDBN} prompt to see a list of commands
@@ -22225,7 +22588,7 @@ in this category.
 
 @findex COMMAND_STACK
 @findex gdb.COMMAND_STACK
-@item COMMAND_STACK
+@item gdb.COMMAND_STACK
 The command has to do with manipulation of the stack.  For example,
 @code{backtrace}, @code{frame}, and @code{return} are in this
 category.  Type @kbd{help stack} at the @value{GDBN} prompt to see a
@@ -22233,7 +22596,7 @@ list of commands in this category.
 
 @findex COMMAND_FILES
 @findex gdb.COMMAND_FILES
-@item COMMAND_FILES
+@item gdb.COMMAND_FILES
 This class is used for file-related commands.  For example,
 @code{file}, @code{list} and @code{section} are in this category.
 Type @kbd{help files} at the @value{GDBN} prompt to see a list of
@@ -22241,7 +22604,7 @@ commands in this category.
 
 @findex COMMAND_SUPPORT
 @findex gdb.COMMAND_SUPPORT
-@item COMMAND_SUPPORT
+@item gdb.COMMAND_SUPPORT
 This should be used for ``support facilities'', generally meaning
 things that are useful to the user when interacting with @value{GDBN},
 but not related to the state of the inferior.  For example,
@@ -22251,7 +22614,7 @@ commands in this category.
 
 @findex COMMAND_STATUS
 @findex gdb.COMMAND_STATUS
-@item COMMAND_STATUS
+@item gdb.COMMAND_STATUS
 The command is an @samp{info}-related command, that is, related to the
 state of @value{GDBN} itself.  For example, @code{info}, @code{macro},
 and @code{show} are in this category.  Type @kbd{help status} at the
@@ -22259,7 +22622,7 @@ and @code{show} are in this category.  Type @kbd{help status} at the
 
 @findex COMMAND_BREAKPOINTS
 @findex gdb.COMMAND_BREAKPOINTS
-@item COMMAND_BREAKPOINTS
+@item gdb.COMMAND_BREAKPOINTS
 The command has to do with breakpoints.  For example, @code{break},
 @code{clear}, and @code{delete} are in this category.  Type @kbd{help
 breakpoints} at the @value{GDBN} prompt to see a list of commands in
@@ -22267,7 +22630,7 @@ this category.
 
 @findex COMMAND_TRACEPOINTS
 @findex gdb.COMMAND_TRACEPOINTS
-@item COMMAND_TRACEPOINTS
+@item gdb.COMMAND_TRACEPOINTS
 The command has to do with tracepoints.  For example, @code{trace},
 @code{actions}, and @code{tfind} are in this category.  Type
 @kbd{help tracepoints} at the @value{GDBN} prompt to see a list of
@@ -22275,7 +22638,7 @@ commands in this category.
 
 @findex COMMAND_OBSCURE
 @findex gdb.COMMAND_OBSCURE
-@item COMMAND_OBSCURE
+@item gdb.COMMAND_OBSCURE
 The command is only used in unusual circumstances, or is not of
 general interest to users.  For example, @code{checkpoint},
 @code{fork}, and @code{stop} are in this category.  Type @kbd{help
@@ -22284,7 +22647,7 @@ category.
 
 @findex COMMAND_MAINTENANCE
 @findex gdb.COMMAND_MAINTENANCE
-@item COMMAND_MAINTENANCE
+@item gdb.COMMAND_MAINTENANCE
 The command is only useful to @value{GDBN} maintainers.  The
 @code{maintenance} and @code{flushregs} commands are in this category.
 Type @kbd{help internals} at the @value{GDBN} prompt to see a list of
@@ -22299,29 +22662,29 @@ constants are all defined in the @code{gdb} module:
 @table @code
 @findex COMPLETE_NONE
 @findex gdb.COMPLETE_NONE
-@item COMPLETE_NONE
+@item gdb.COMPLETE_NONE
 This constant means that no completion should be done.
 
 @findex COMPLETE_FILENAME
 @findex gdb.COMPLETE_FILENAME
-@item COMPLETE_FILENAME
+@item gdb.COMPLETE_FILENAME
 This constant means that filename completion should be performed.
 
 @findex COMPLETE_LOCATION
 @findex gdb.COMPLETE_LOCATION
-@item COMPLETE_LOCATION
+@item gdb.COMPLETE_LOCATION
 This constant means that location completion should be done.
 @xref{Specify Location}.
 
 @findex COMPLETE_COMMAND
 @findex gdb.COMPLETE_COMMAND
-@item COMPLETE_COMMAND
+@item gdb.COMPLETE_COMMAND
 This constant means that completion should examine @value{GDBN}
 command names.
 
 @findex COMPLETE_SYMBOL
 @findex gdb.COMPLETE_SYMBOL
-@item COMPLETE_SYMBOL
+@item gdb.COMPLETE_SYMBOL
 This constant means that completion should be done using symbol names
 as the source.
 @end table
@@ -22367,7 +22730,7 @@ There are many parameters that already exist and can be set in
 behavior in @value{GDBN}.  Similarly, you can define parameters that
 can be used to influence behavior in custom Python scripts and commands.
 
-@defmethod Parameter __init__ name @var{command-class} @var{parameter-class} @r{[}@var{enum-sequence}@r{]}
+@defun Parameter.__init__ (name, @var{command-class}, @var{parameter-class} @r{[}, @var{enum-sequence}@r{]})
 The object initializer for @code{Parameter} registers the new
 parameter with @value{GDBN}.  This initializer is normally invoked
 from the subclass' own @code{__init__} method.
@@ -22402,28 +22765,44 @@ of a fourth argument will cause an exception to be thrown.
 The help text for the new parameter is taken from the Python
 documentation string for the parameter's class, if there is one.  If
 there is no documentation string, a default value is used.
-@end defmethod
+@end defun
 
-@defivar Parameter set_doc
+@defvar Parameter.set_doc
 If this attribute exists, and is a string, then its value is used as
 the help text for this parameter's @code{set} command.  The value is
 examined when @code{Parameter.__init__} is invoked; subsequent changes
 have no effect.
-@end defivar
+@end defvar
 
-@defivar Parameter show_doc
+@defvar Parameter.show_doc
 If this attribute exists, and is a string, then its value is used as
 the help text for this parameter's @code{show} command.  The value is
 examined when @code{Parameter.__init__} is invoked; subsequent changes
 have no effect.
-@end defivar
+@end defvar
 
-@defivar Parameter value
+@defvar Parameter.value
 The @code{value} attribute holds the underlying value of the
 parameter.  It can be read and assigned to just as any other
 attribute.  @value{GDBN} does validation when assignments are made.
-@end defivar
+@end defvar
 
+There are two methods that should be implemented in any
+@code{Parameter} class.  These are:
+
+@defun Parameter.get_set_string (self)
+@value{GDBN} will call this method when a @var{parameter}'s value has
+been changed via the @code{set} API (for example, @kbd{set foo off}).
+The @code{value} attribute has already been populated with the new
+value and may be used in output.  This method must return a string.
+@end defun
+
+@defun Parameter.get_show_string (self, svalue)
+@value{GDBN} will call this method when a @var{parameter}'s
+@code{show} API has been invoked (for example, @kbd{show foo}).  The
+argument @code{svalue} receives the string representation of the
+current value.  This method must return a string.
+@end defun
 
 When a new parameter is defined, its type must be specified.  The
 available types are represented by constants defined in the @code{gdb}
@@ -22432,32 +22811,32 @@ module:
 @table @code
 @findex PARAM_BOOLEAN
 @findex gdb.PARAM_BOOLEAN
-@item PARAM_BOOLEAN
+@item gdb.PARAM_BOOLEAN
 The value is a plain boolean.  The Python boolean values, @code{True}
 and @code{False} are the only valid values.
 
 @findex PARAM_AUTO_BOOLEAN
 @findex gdb.PARAM_AUTO_BOOLEAN
-@item PARAM_AUTO_BOOLEAN
+@item gdb.PARAM_AUTO_BOOLEAN
 The value has three possible states: true, false, and @samp{auto}.  In
 Python, true and false are represented using boolean constants, and
 @samp{auto} is represented using @code{None}.
 
 @findex PARAM_UINTEGER
 @findex gdb.PARAM_UINTEGER
-@item PARAM_UINTEGER
+@item gdb.PARAM_UINTEGER
 The value is an unsigned integer.  The value of 0 should be
 interpreted to mean ``unlimited''.
 
 @findex PARAM_INTEGER
 @findex gdb.PARAM_INTEGER
-@item PARAM_INTEGER
+@item gdb.PARAM_INTEGER
 The value is a signed integer.  The value of 0 should be interpreted
 to mean ``unlimited''.
 
 @findex PARAM_STRING
 @findex gdb.PARAM_STRING
-@item PARAM_STRING
+@item gdb.PARAM_STRING
 The value is a string.  When the user modifies the string, any escape
 sequences, such as @samp{\t}, @samp{\f}, and octal escapes, are
 translated into corresponding characters and encoded into the current
@@ -22465,30 +22844,30 @@ host charset.
 
 @findex PARAM_STRING_NOESCAPE
 @findex gdb.PARAM_STRING_NOESCAPE
-@item PARAM_STRING_NOESCAPE
+@item gdb.PARAM_STRING_NOESCAPE
 The value is a string.  When the user modifies the string, escapes are
 passed through untranslated.
 
 @findex PARAM_OPTIONAL_FILENAME
 @findex gdb.PARAM_OPTIONAL_FILENAME
-@item PARAM_OPTIONAL_FILENAME
+@item gdb.PARAM_OPTIONAL_FILENAME
 The value is a either a filename (a string), or @code{None}.
 
 @findex PARAM_FILENAME
 @findex gdb.PARAM_FILENAME
-@item PARAM_FILENAME
+@item gdb.PARAM_FILENAME
 The value is a filename.  This is just like
 @code{PARAM_STRING_NOESCAPE}, but uses file names for completion.
 
 @findex PARAM_ZINTEGER
 @findex gdb.PARAM_ZINTEGER
-@item PARAM_ZINTEGER
+@item gdb.PARAM_ZINTEGER
 The value is an integer.  This is like @code{PARAM_INTEGER}, except 0
 is interpreted as itself.
 
 @findex PARAM_ENUM
 @findex gdb.PARAM_ENUM
-@item PARAM_ENUM
+@item gdb.PARAM_ENUM
 The value is a string, which must be one of a collection string
 constants provided when the parameter is created.
 @end table
@@ -22505,7 +22884,7 @@ You can implement new convenience functions (@pxref{Convenience Vars})
 in Python.  A convenience function is an instance of a subclass of the
 class @code{gdb.Function}.
 
-@defmethod Function __init__ name
+@defun Function.__init__ (name)
 The initializer for @code{Function} registers the new function with
 @value{GDBN}.  The argument @var{name} is the name of the function,
 a string.  The function will be visible to the user as a convenience
@@ -22514,9 +22893,9 @@ the given @var{name}.
 
 The documentation for the new function is taken from the documentation
 string for the new class.
-@end defmethod
+@end defun
 
-@defmethod Function invoke @var{*args}
+@defun Function.invoke (@var{*args})
 When a convenience function is evaluated, its arguments are converted
 to instances of @code{gdb.Value}, and then the function's
 @code{invoke} method is called.  Note that @value{GDBN} does not
@@ -22528,7 +22907,7 @@ function can have default values for parameters without ill effect.
 The return value of this method is used as its value in the enclosing
 expression.  If an ordinary Python value is returned, it is converted
 to a @code{gdb.Value} following the usual rules.
-@end defmethod
+@end defun
 
 The following code snippet shows how a trivial convenience function can
 be implemented in Python:
@@ -22569,31 +22948,31 @@ The following progspace-related functions are available in the
 @code{gdb} module:
 
 @findex gdb.current_progspace
-@defun current_progspace
+@defun gdb.current_progspace ()
 This function returns the program space of the currently selected inferior.
 @xref{Inferiors and Programs}.
 @end defun
 
 @findex gdb.progspaces
-@defun progspaces
+@defun gdb.progspaces ()
 Return a sequence of all the progspaces currently known to @value{GDBN}.
 @end defun
 
 Each progspace is represented by an instance of the @code{gdb.Progspace}
 class.
 
-@defivar Progspace filename
+@defvar Progspace.filename
 The file name of the progspace as a string.
-@end defivar
+@end defvar
 
-@defivar Progspace pretty_printers
+@defvar Progspace.pretty_printers
 The @code{pretty_printers} attribute is a list of functions.  It is
 used to look up pretty-printers.  A @code{Value} is passed to each
 function in order; if the function returns @code{None}, then the
 search continues.  Otherwise, the return value should be an object
 which is used to format the value.  @xref{Pretty Printing API}, for more
 information.
-@end defivar
+@end defvar
 
 @node Objfiles In Python
 @subsubsection Objfiles In Python
@@ -22611,7 +22990,7 @@ The following objfile-related functions are available in the
 @code{gdb} module:
 
 @findex gdb.current_objfile
-@defun current_objfile
+@defun gdb.current_objfile ()
 When auto-loading a Python script (@pxref{Auto-loading}), @value{GDBN}
 sets the ``current objfile'' to the corresponding objfile.  This
 function returns the current objfile.  If there is no current objfile,
@@ -22619,7 +22998,7 @@ this function returns @code{None}.
 @end defun
 
 @findex gdb.objfiles
-@defun objfiles
+@defun gdb.objfiles ()
 Return a sequence of all the objfiles current known to @value{GDBN}.
 @xref{Objfiles In Python}.
 @end defun
@@ -22627,18 +23006,28 @@ Return a sequence of all the objfiles current known to @value{GDBN}.
 Each objfile is represented by an instance of the @code{gdb.Objfile}
 class.
 
-@defivar Objfile filename
+@defvar Objfile.filename
 The file name of the objfile as a string.
-@end defivar
+@end defvar
 
-@defivar Objfile pretty_printers
+@defvar Objfile.pretty_printers
 The @code{pretty_printers} attribute is a list of functions.  It is
 used to look up pretty-printers.  A @code{Value} is passed to each
 function in order; if the function returns @code{None}, then the
 search continues.  Otherwise, the return value should be an object
 which is used to format the value.  @xref{Pretty Printing API}, for more
 information.
-@end defivar
+@end defvar
+
+A @code{gdb.Objfile} object has the following methods:
+
+@defun Objfile.is_valid ()
+Returns @code{True} if the @code{gdb.Objfile} object is valid,
+@code{False} if not.  A @code{gdb.Objfile} object can become invalid
+if the object file it refers to is not loaded in @value{GDBN} any
+longer.  All other @code{gdb.Objfile} methods will throw an exception
+if it is invalid at the time the method is called.
+@end defun
 
 @node Frames In Python
 @subsubsection Accessing inferior stack frames from Python.
@@ -22662,16 +23051,16 @@ True
 The following frame-related functions are available in the @code{gdb} module:
 
 @findex gdb.selected_frame
-@defun selected_frame
+@defun gdb.selected_frame ()
 Return the selected frame object.  (@pxref{Selection,,Selecting a Frame}).
 @end defun
 
 @findex gdb.newest_frame
-@defun newest_frame
+@defun gdb.newest_frame ()
 Return the newest frame object for the selected thread.
 @end defun
 
-@defun frame_stop_reason_string reason
+@defun gdb.frame_stop_reason_string (reason)
 Return a string explaining the reason why @value{GDBN} stopped unwinding
 frames, as expressed by the given @var{reason} code (an integer, see the
 @code{unwind_stop_reason} method further down in this section).
@@ -22680,19 +23069,19 @@ frames, as expressed by the given @var{reason} code (an integer, see the
 A @code{gdb.Frame} object has the following methods:
 
 @table @code
-@defmethod Frame is_valid
+@defun Frame.is_valid ()
 Returns true if the @code{gdb.Frame} object is valid, false if not.
 A frame object can become invalid if the frame it refers to doesn't
 exist anymore in the inferior.  All @code{gdb.Frame} methods will throw
 an exception if it is invalid at the time the method is called.
-@end defmethod
+@end defun
 
-@defmethod Frame name
+@defun Frame.name ()
 Returns the function name of the frame, or @code{None} if it can't be
 obtained.
-@end defmethod
+@end defun
 
-@defmethod Frame type
+@defun Frame.type ()
 Returns the type of the frame.  The value can be one of:
 @table @code
 @item gdb.NORMAL_FRAME
@@ -22717,54 +23106,54 @@ A fake stack frame representing a cross-architecture call.
 This is like @code{gdb.NORMAL_FRAME}, but it is only used for the
 newest frame.
 @end table
-@end defmethod
+@end defun
 
-@defmethod Frame unwind_stop_reason
+@defun Frame.unwind_stop_reason ()
 Return an integer representing the reason why it's not possible to find
 more frames toward the outermost frame.  Use
 @code{gdb.frame_stop_reason_string} to convert the value returned by this
 function to a string.
-@end defmethod
+@end defun
 
-@defmethod Frame pc
+@defun Frame.pc ()
 Returns the frame's resume address.
-@end defmethod
+@end defun
 
-@defmethod Frame block
+@defun Frame.block ()
 Return the frame's code block.  @xref{Blocks In Python}.
-@end defmethod
+@end defun
 
-@defmethod Frame function
+@defun Frame.function ()
 Return the symbol for the function corresponding to this frame.
 @xref{Symbols In Python}.
-@end defmethod
+@end defun
 
-@defmethod Frame older
+@defun Frame.older ()
 Return the frame that called this frame.
-@end defmethod
+@end defun
 
-@defmethod Frame newer
+@defun Frame.newer ()
 Return the frame called by this frame.
-@end defmethod
+@end defun
 
-@defmethod Frame find_sal
+@defun Frame.find_sal ()
 Return the frame's symtab and line object.
 @xref{Symbol Tables In Python}.
-@end defmethod
+@end defun
 
-@defmethod Frame read_var variable @r{[}block@r{]}
+@defun Frame.read_var (variable @r{[}, block@r{]})
 Return the value of @var{variable} in this frame.  If the optional
 argument @var{block} is provided, search for the variable from that
 block; otherwise start at the frame's current block (which is
 determined by the frame's current program counter).  @var{variable}
 must be a string or a @code{gdb.Symbol} object.  @var{block} must be a
 @code{gdb.Block} object.
-@end defmethod
+@end defun
 
-@defmethod Frame select
+@defun Frame.select ()
 Set this frame to be the selected frame.  @xref{Stack, ,Examining the
 Stack}.
-@end defmethod
+@end defun
 @end table
 
 @node Blocks In Python
@@ -22785,33 +23174,47 @@ The following block-related functions are available in the @code{gdb}
 module:
 
 @findex gdb.block_for_pc
-@defun block_for_pc pc
+@defun gdb.block_for_pc (pc)
 Return the @code{gdb.Block} containing the given @var{pc} value.  If the
 block cannot be found for the @var{pc} value specified, the function
 will return @code{None}.
 @end defun
 
+A @code{gdb.Block} object has the following methods:
+
+@table @code
+@defun Block.is_valid ()
+Returns @code{True} if the @code{gdb.Block} object is valid,
+@code{False} if not.  A block object can become invalid if the block it
+refers to doesn't exist anymore in the inferior.  All other
+@code{gdb.Block} methods will throw an exception if it is invalid at
+the time the method is called.  This method is also made available to
+the Python iterator object that @code{gdb.Block} provides in an iteration
+context and via the Python @code{iter} built-in function.
+@end defun
+@end table
+
 A @code{gdb.Block} object has the following attributes:
 
 @table @code
-@defivar Block start
+@defvar Block.start
 The start address of the block.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Block end
+@defvar Block.end
 The end address of the block.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Block function
+@defvar Block.function
 The name of the block represented as a @code{gdb.Symbol}.  If the
 block is not named, then this attribute holds @code{None}.  This
 attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Block superblock
+@defvar Block.superblock
 The block containing this block.  If this parent block does not exist,
 this attribute holds @code{None}.  This attribute is not writable.
-@end defivar
+@end defvar
 @end table
 
 @node Symbols In Python
@@ -22829,7 +23232,7 @@ The following symbol-related functions are available in the @code{gdb}
 module:
 
 @findex gdb.lookup_symbol
-@defun lookup_symbol name [block] [domain]
+@defun gdb.lookup_symbol (name @r{[}, block @r{[}, domain@r{]]})
 This function searches for a symbol by name.  The search scope can be
 restricted to the parameters defined in the optional domain and block
 arguments.
@@ -22837,57 +23240,98 @@ arguments.
 @var{name} is the name of the symbol.  It must be a string.  The
 optional @var{block} argument restricts the search to symbols visible
 in that @var{block}.  The @var{block} argument must be a
-@code{gdb.Block} object.  The optional @var{domain} argument restricts
+@code{gdb.Block} object.  If omitted, the block for the current frame
+is used.  The optional @var{domain} argument restricts
 the search to the domain type.  The @var{domain} argument must be a
 domain constant defined in the @code{gdb} module and described later
 in this chapter.
+
+The result is a tuple of two elements.
+The first element is a @code{gdb.Symbol} object or @code{None} if the symbol
+is not found.
+If the symbol is found, the second element is @code{True} if the symbol
+is a field of a method's object (e.g., @code{this} in C@t{++}),
+otherwise it is @code{False}.
+If the symbol is not found, the second element is @code{False}.
+@end defun
+
+@findex gdb.lookup_global_symbol
+@defun gdb.lookup_global_symbol (name @r{[}, domain@r{]})
+This function searches for a global symbol by name.
+The search scope can be restricted to by the domain argument.
+
+@var{name} is the name of the symbol.  It must be a string.
+The optional @var{domain} argument restricts the search to the domain type.
+The @var{domain} argument must be a domain constant defined in the @code{gdb}
+module and described later in this chapter.
+
+The result is a @code{gdb.Symbol} object or @code{None} if the symbol
+is not found.
 @end defun
 
 A @code{gdb.Symbol} object has the following attributes:
 
 @table @code
-@defivar Symbol symtab
+@defvar Symbol.type
+The type of the symbol or @code{None} if no type is recorded.
+This attribute is represented as a @code{gdb.Type} object.
+@xref{Types In Python}.  This attribute is not writable.
+@end defvar
+
+@defvar Symbol.symtab
 The symbol table in which the symbol appears.  This attribute is
 represented as a @code{gdb.Symtab} object.  @xref{Symbol Tables In
 Python}.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Symbol name
+@defvar Symbol.name
 The name of the symbol as a string.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Symbol linkage_name
+@defvar Symbol.linkage_name
 The name of the symbol, as used by the linker (i.e., may be mangled).
 This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Symbol print_name
+@defvar Symbol.print_name
 The name of the symbol in a form suitable for output.  This is either
 @code{name} or @code{linkage_name}, depending on whether the user
 asked @value{GDBN} to display demangled or mangled names.
-@end defivar
+@end defvar
 
-@defivar Symbol addr_class
+@defvar Symbol.addr_class
 The address class of the symbol.  This classifies how to find the value
 of a symbol.  Each address class is a constant defined in the
 @code{gdb} module and described later in this chapter.
-@end defivar
+@end defvar
 
-@defivar Symbol is_argument
+@defvar Symbol.is_argument
 @code{True} if the symbol is an argument of a function.
-@end defivar
+@end defvar
 
-@defivar Symbol is_constant
+@defvar Symbol.is_constant
 @code{True} if the symbol is a constant.
-@end defivar
+@end defvar
 
-@defivar Symbol is_function
+@defvar Symbol.is_function
 @code{True} if the symbol is a function or a method.
-@end defivar
+@end defvar
 
-@defivar Symbol is_variable
+@defvar Symbol.is_variable
 @code{True} if the symbol is a variable.
-@end defivar
+@end defvar
+@end table
+
+A @code{gdb.Symbol} object has the following methods:
+
+@table @code
+@defun Symbol.is_valid ()
+Returns @code{True} if the @code{gdb.Symbol} object is valid,
+@code{False} if not.  A @code{gdb.Symbol} object can become invalid if
+the symbol it refers to does not exist in @value{GDBN} any longer.
+All other @code{gdb.Symbol} methods will throw an exception if it is
+invalid at the time the method is called.
+@end defun
 @end table
 
 The available domain categories in @code{gdb.Symbol} are represented
@@ -22896,35 +23340,35 @@ as constants in the @code{gdb} module:
 @table @code
 @findex SYMBOL_UNDEF_DOMAIN
 @findex gdb.SYMBOL_UNDEF_DOMAIN
-@item SYMBOL_UNDEF_DOMAIN
+@item gdb.SYMBOL_UNDEF_DOMAIN
 This is used when a domain has not been discovered or none of the
 following domains apply.  This usually indicates an error either
 in the symbol information or in @value{GDBN}'s handling of symbols.
 @findex SYMBOL_VAR_DOMAIN
 @findex gdb.SYMBOL_VAR_DOMAIN
-@item SYMBOL_VAR_DOMAIN
+@item gdb.SYMBOL_VAR_DOMAIN
 This domain contains variables, function names, typedef names and enum
 type values.
 @findex SYMBOL_STRUCT_DOMAIN
 @findex gdb.SYMBOL_STRUCT_DOMAIN
-@item SYMBOL_STRUCT_DOMAIN
+@item gdb.SYMBOL_STRUCT_DOMAIN
 This domain holds struct, union and enum type names.
 @findex SYMBOL_LABEL_DOMAIN
 @findex gdb.SYMBOL_LABEL_DOMAIN
-@item SYMBOL_LABEL_DOMAIN
+@item gdb.SYMBOL_LABEL_DOMAIN
 This domain contains names of labels (for gotos).
 @findex SYMBOL_VARIABLES_DOMAIN
 @findex gdb.SYMBOL_VARIABLES_DOMAIN
-@item SYMBOL_VARIABLES_DOMAIN
+@item gdb.SYMBOL_VARIABLES_DOMAIN
 This domain holds a subset of the @code{SYMBOLS_VAR_DOMAIN}; it
 contains everything minus functions and types.
 @findex SYMBOL_FUNCTIONS_DOMAIN
 @findex gdb.SYMBOL_FUNCTIONS_DOMAIN
-@item SYMBOL_FUNCTION_DOMAIN
+@item gdb.SYMBOL_FUNCTION_DOMAIN
 This domain contains all functions.
 @findex SYMBOL_TYPES_DOMAIN
 @findex gdb.SYMBOL_TYPES_DOMAIN
-@item SYMBOL_TYPES_DOMAIN
+@item gdb.SYMBOL_TYPES_DOMAIN
 This domain contains all types.
 @end table
 
@@ -22934,68 +23378,68 @@ as constants in the @code{gdb} module:
 @table @code
 @findex SYMBOL_LOC_UNDEF
 @findex gdb.SYMBOL_LOC_UNDEF
-@item SYMBOL_LOC_UNDEF
+@item gdb.SYMBOL_LOC_UNDEF
 If this is returned by address class, it indicates an error either in
 the symbol information or in @value{GDBN}'s handling of symbols.
 @findex SYMBOL_LOC_CONST
 @findex gdb.SYMBOL_LOC_CONST
-@item SYMBOL_LOC_CONST
+@item gdb.SYMBOL_LOC_CONST
 Value is constant int.
 @findex SYMBOL_LOC_STATIC
 @findex gdb.SYMBOL_LOC_STATIC
-@item SYMBOL_LOC_STATIC
+@item gdb.SYMBOL_LOC_STATIC
 Value is at a fixed address.
 @findex SYMBOL_LOC_REGISTER
 @findex gdb.SYMBOL_LOC_REGISTER
-@item SYMBOL_LOC_REGISTER
+@item gdb.SYMBOL_LOC_REGISTER
 Value is in a register.
 @findex SYMBOL_LOC_ARG
 @findex gdb.SYMBOL_LOC_ARG
-@item SYMBOL_LOC_ARG
+@item gdb.SYMBOL_LOC_ARG
 Value is an argument.  This value is at the offset stored within the
 symbol inside the frame's argument list.
 @findex SYMBOL_LOC_REF_ARG
 @findex gdb.SYMBOL_LOC_REF_ARG
-@item SYMBOL_LOC_REF_ARG
+@item gdb.SYMBOL_LOC_REF_ARG
 Value address is stored in the frame's argument list.  Just like
 @code{LOC_ARG} except that the value's address is stored at the
 offset, not the value itself.
 @findex SYMBOL_LOC_REGPARM_ADDR
 @findex gdb.SYMBOL_LOC_REGPARM_ADDR
-@item SYMBOL_LOC_REGPARM_ADDR
+@item gdb.SYMBOL_LOC_REGPARM_ADDR
 Value is a specified register.  Just like @code{LOC_REGISTER} except
 the register holds the address of the argument instead of the argument
 itself.
 @findex SYMBOL_LOC_LOCAL
 @findex gdb.SYMBOL_LOC_LOCAL
-@item SYMBOL_LOC_LOCAL
+@item gdb.SYMBOL_LOC_LOCAL
 Value is a local variable.
 @findex SYMBOL_LOC_TYPEDEF
 @findex gdb.SYMBOL_LOC_TYPEDEF
-@item SYMBOL_LOC_TYPEDEF
+@item gdb.SYMBOL_LOC_TYPEDEF
 Value not used.  Symbols in the domain @code{SYMBOL_STRUCT_DOMAIN} all
 have this class.
 @findex SYMBOL_LOC_BLOCK
 @findex gdb.SYMBOL_LOC_BLOCK
-@item SYMBOL_LOC_BLOCK
+@item gdb.SYMBOL_LOC_BLOCK
 Value is a block.
 @findex SYMBOL_LOC_CONST_BYTES
 @findex gdb.SYMBOL_LOC_CONST_BYTES
-@item SYMBOL_LOC_CONST_BYTES
+@item gdb.SYMBOL_LOC_CONST_BYTES
 Value is a byte-sequence.
 @findex SYMBOL_LOC_UNRESOLVED
 @findex gdb.SYMBOL_LOC_UNRESOLVED
-@item SYMBOL_LOC_UNRESOLVED
+@item gdb.SYMBOL_LOC_UNRESOLVED
 Value is at a fixed address, but the address of the variable has to be
 determined from the minimal symbol table whenever the variable is
 referenced.
 @findex SYMBOL_LOC_OPTIMIZED_OUT
 @findex gdb.SYMBOL_LOC_OPTIMIZED_OUT
-@item SYMBOL_LOC_OPTIMIZED_OUT
+@item gdb.SYMBOL_LOC_OPTIMIZED_OUT
 The value does not actually exist in the program.
 @findex SYMBOL_LOC_COMPUTED
 @findex gdb.SYMBOL_LOC_COMPUTED
-@item SYMBOL_LOC_COMPUTED
+@item gdb.SYMBOL_LOC_COMPUTED
 The value's address is a computed location.
 @end table
 
@@ -23018,41 +23462,62 @@ For more information on @value{GDBN}'s symbol table management, see
 A @code{gdb.Symtab_and_line} object has the following attributes:
 
 @table @code
-@defivar Symtab_and_line symtab
+@defvar Symtab_and_line.symtab
 The symbol table object (@code{gdb.Symtab}) for this frame.
 This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Symtab_and_line pc
+@defvar Symtab_and_line.pc
 Indicates the current program counter address.  This attribute is not
 writable.
-@end defivar
+@end defvar
 
-@defivar Symtab_and_line line
+@defvar Symtab_and_line.line
 Indicates the current line number for this object.  This
 attribute is not writable.
-@end defivar
+@end defvar
+@end table
+
+A @code{gdb.Symtab_and_line} object has the following methods:
+
+@table @code
+@defun Symtab_and_line.is_valid ()
+Returns @code{True} if the @code{gdb.Symtab_and_line} object is valid,
+@code{False} if not.  A @code{gdb.Symtab_and_line} object can become
+invalid if the Symbol table and line object it refers to does not
+exist in @value{GDBN} any longer.  All other
+@code{gdb.Symtab_and_line} methods will throw an exception if it is
+invalid at the time the method is called.
+@end defun
 @end table
 
 A @code{gdb.Symtab} object has the following attributes:
 
 @table @code
-@defivar Symtab filename
+@defvar Symtab.filename
 The symbol table's source filename.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Symtab objfile
+@defvar Symtab.objfile
 The symbol table's backing object file.  @xref{Objfiles In Python}.
 This attribute is not writable.
-@end defivar
+@end defvar
 @end table
 
-The following methods are provided:
+A @code{gdb.Symtab} object has the following methods:
 
 @table @code
-@defmethod Symtab fullname
+@defun Symtab.is_valid ()
+Returns @code{True} if the @code{gdb.Symtab} object is valid,
+@code{False} if not.  A @code{gdb.Symtab} object can become invalid if
+the symbol table it refers to does not exist in @value{GDBN} any
+longer.  All other @code{gdb.Symtab} methods will throw an exception
+if it is invalid at the time the method is called.
+@end defun
+
+@defun Symtab.fullname ()
 Return the symbol table's source absolute file name.
-@end defmethod
+@end defun
 @end table
 
 @node Breakpoints In Python
@@ -23064,23 +23529,51 @@ Return the symbol table's source absolute file name.
 Python code can manipulate breakpoints via the @code{gdb.Breakpoint}
 class.
 
-@defmethod Breakpoint __init__ spec @r{[}type@r{]} @r{[}wp_class@r{]} @r{[}internal@r{]}
+@defun Breakpoint.__init__ (spec @r{[}, type @r{[}, wp_class @r{[},internal@r{]]]})
 Create a new breakpoint.  @var{spec} is a string naming the
 location of the breakpoint, or an expression that defines a
 watchpoint.  The contents can be any location recognized by the
 @code{break} command, or in the case of a watchpoint, by the @code{watch}
 command.  The optional @var{type} denotes the breakpoint to create
 from the types defined later in this chapter.  This argument can be
-either: @code{BP_BREAKPOINT} or @code{BP_WATCHPOINT}.  @var{type}
-defaults to @code{BP_BREAKPOINT}.  The optional @var{internal} argument
+either: @code{gdb.BP_BREAKPOINT} or @code{gdb.BP_WATCHPOINT}.  @var{type}
+defaults to @code{gdb.BP_BREAKPOINT}.  The optional @var{internal} argument
 allows the breakpoint to become invisible to the user.  The breakpoint
 will neither be reported when created, nor will it be listed in the
 output from @code{info breakpoints} (but will be listed with the
 @code{maint info breakpoints} command).  The optional @var{wp_class}
 argument defines the class of watchpoint to create, if @var{type} is
-@code{BP_WATCHPOINT}.  If a watchpoint class is not provided, it is
-assumed to be a @var{WP_WRITE} class.
-@end defmethod
+@code{gdb.BP_WATCHPOINT}.  If a watchpoint class is not provided, it is
+assumed to be a @code{gdb.WP_WRITE} class.
+@end defun
+
+@defun Breakpoint.stop (self)
+The @code{gdb.Breakpoint} class can be sub-classed and, in
+particular, you may choose to implement the @code{stop} method.
+If this method is defined as a sub-class of @code{gdb.Breakpoint},
+it will be called when the inferior reaches any location of a
+breakpoint which instantiates that sub-class.  If the method returns
+@code{True}, the inferior will be stopped at the location of the
+breakpoint, otherwise the inferior will continue.
+
+If there are multiple breakpoints at the same location with a
+@code{stop} method, each one will be called regardless of the
+return status of the previous.  This ensures that all @code{stop}
+methods have a chance to execute at that location.  In this scenario
+if one of the methods returns @code{True} but the others return
+@code{False}, the inferior will still be stopped.
+
+Example @code{stop} implementation:
+
+@smallexample
+class MyBreakpoint (gdb.Breakpoint):
+      def stop (self):
+        inf_val = gdb.parse_and_eval("foo")
+        if inf_val == 3:
+          return True
+        return False
+@end smallexample
+@end defun
 
 The available watchpoint types represented by constants are defined in the
 @code{gdb} module:
@@ -23088,83 +23581,83 @@ The available watchpoint types represented by constants are defined in the
 @table @code
 @findex WP_READ
 @findex gdb.WP_READ
-@item WP_READ
+@item gdb.WP_READ
 Read only watchpoint.
 
 @findex WP_WRITE
 @findex gdb.WP_WRITE
-@item WP_WRITE
+@item gdb.WP_WRITE
 Write only watchpoint.
 
 @findex WP_ACCESS
 @findex gdb.WP_ACCESS
-@item WP_ACCESS
+@item gdb.WP_ACCESS
 Read/Write watchpoint.
 @end table
 
-@defmethod Breakpoint is_valid
+@defun Breakpoint.is_valid ()
 Return @code{True} if this @code{Breakpoint} object is valid,
 @code{False} otherwise.  A @code{Breakpoint} object can become invalid
 if the user deletes the breakpoint.  In this case, the object still
 exists, but the underlying breakpoint does not.  In the cases of
 watchpoint scope, the watchpoint remains valid even if execution of the
 inferior leaves the scope of that watchpoint.
-@end defmethod
+@end defun
 
-@defmethod Breakpoint delete
+@defun Breakpoint.delete
 Permanently deletes the @value{GDBN} breakpoint.  This also
 invalidates the Python @code{Breakpoint} object.  Any further access
 to this object's attributes or methods will raise an error.
-@end defmethod
+@end defun
 
-@defivar Breakpoint enabled
+@defvar Breakpoint.enabled
 This attribute is @code{True} if the breakpoint is enabled, and
 @code{False} otherwise.  This attribute is writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint silent
+@defvar Breakpoint.silent
 This attribute is @code{True} if the breakpoint is silent, and
 @code{False} otherwise.  This attribute is writable.
 
 Note that a breakpoint can also be silent if it has commands and the
 first command is @code{silent}.  This is not reported by the
 @code{silent} attribute.
-@end defivar
+@end defvar
 
-@defivar Breakpoint thread
+@defvar Breakpoint.thread
 If the breakpoint is thread-specific, this attribute holds the thread
 id.  If the breakpoint is not thread-specific, this attribute is
 @code{None}.  This attribute is writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint task
+@defvar Breakpoint.task
 If the breakpoint is Ada task-specific, this attribute holds the Ada task
 id.  If the breakpoint is not task-specific (or the underlying
 language is not Ada), this attribute is @code{None}.  This attribute
 is writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint ignore_count
+@defvar Breakpoint.ignore_count
 This attribute holds the ignore count for the breakpoint, an integer.
 This attribute is writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint number
+@defvar Breakpoint.number
 This attribute holds the breakpoint's number --- the identifier used by
 the user to manipulate the breakpoint.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint type
+@defvar Breakpoint.type
 This attribute holds the breakpoint's type --- the identifier used to
 determine the actual breakpoint type or use-case.  This attribute is not
 writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint visible
+@defvar Breakpoint.visible
 This attribute tells whether the breakpoint is visible to the user
 when set, or when the @samp{info breakpoints} command is run.  This
 attribute is not writable.
-@end defivar
+@end defvar
 
 The available types are represented by constants defined in the @code{gdb}
 module:
@@ -23172,61 +23665,61 @@ module:
 @table @code
 @findex BP_BREAKPOINT
 @findex gdb.BP_BREAKPOINT
-@item BP_BREAKPOINT
+@item gdb.BP_BREAKPOINT
 Normal code breakpoint.
 
 @findex BP_WATCHPOINT
 @findex gdb.BP_WATCHPOINT
-@item BP_WATCHPOINT
+@item gdb.BP_WATCHPOINT
 Watchpoint breakpoint.
 
 @findex BP_HARDWARE_WATCHPOINT
 @findex gdb.BP_HARDWARE_WATCHPOINT
-@item BP_HARDWARE_WATCHPOINT
+@item gdb.BP_HARDWARE_WATCHPOINT
 Hardware assisted watchpoint.
 
 @findex BP_READ_WATCHPOINT
 @findex gdb.BP_READ_WATCHPOINT
-@item BP_READ_WATCHPOINT
+@item gdb.BP_READ_WATCHPOINT
 Hardware assisted read watchpoint.
 
 @findex BP_ACCESS_WATCHPOINT
 @findex gdb.BP_ACCESS_WATCHPOINT
-@item BP_ACCESS_WATCHPOINT
+@item gdb.BP_ACCESS_WATCHPOINT
 Hardware assisted access watchpoint.
 @end table
 
-@defivar Breakpoint hit_count
+@defvar Breakpoint.hit_count
 This attribute holds the hit count for the breakpoint, an integer.
 This attribute is writable, but currently it can only be set to zero.
-@end defivar
+@end defvar
 
-@defivar Breakpoint location
+@defvar Breakpoint.location
 This attribute holds the location of the breakpoint, as specified by
 the user.  It is a string.  If the breakpoint does not have a location
 (that is, it is a watchpoint) the attribute's value is @code{None}.  This
 attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint expression
+@defvar Breakpoint.expression
 This attribute holds a breakpoint expression, as specified by
 the user.  It is a string.  If the breakpoint does not have an
 expression (the breakpoint is not a watchpoint) the attribute's value
 is @code{None}.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint condition
+@defvar Breakpoint.condition
 This attribute holds the condition of the breakpoint, as specified by
 the user.  It is a string.  If there is no condition, this attribute's
 value is @code{None}.  This attribute is writable.
-@end defivar
+@end defvar
 
-@defivar Breakpoint commands
+@defvar Breakpoint.commands
 This attribute holds the commands attached to the breakpoint.  If
 there are commands, this attribute's value is a string holding all the
 commands, separated by newlines.  If there are no commands, this
 attribute is @code{None}.  This attribute is not writable.
-@end defivar
+@end defvar
 
 @node Lazy Strings In Python
 @subsubsection Python representation of lazy strings.
@@ -23249,39 +23742,39 @@ wrapping a string is immediately retrieved and encoded on creation.
 
 A @code{gdb.LazyString} object has the following functions:
 
-@defmethod LazyString value
+@defun LazyString.value ()
 Convert the @code{gdb.LazyString} to a @code{gdb.Value}.  This value
 will point to the string in memory, but will lose all the delayed
 retrieval, encoding and handling that @value{GDBN} applies to a
 @code{gdb.LazyString}.
-@end defmethod
+@end defun
 
-@defivar LazyString address
+@defvar LazyString.address
 This attribute holds the address of the string.  This attribute is not
 writable.
-@end defivar
+@end defvar
 
-@defivar LazyString length
+@defvar LazyString.length
 This attribute holds the length of the string in characters.  If the
 length is -1, then the string will be fetched and encoded up to the
 first null of appropriate width.  This attribute is not writable.
-@end defivar
+@end defvar
 
-@defivar LazyString encoding
+@defvar LazyString.encoding
 This attribute holds the encoding that will be applied to the string
 when the string is printed by @value{GDBN}.  If the encoding is not
 set, or contains an empty string,  then @value{GDBN} will select the
 most appropriate encoding when the string is printed.  This attribute
 is not writable.
-@end defivar
+@end defvar
 
-@defivar LazyString type
+@defvar LazyString.type
 This attribute holds the type that is represented by the lazy string's
 type.  For a lazy string this will always be a pointer type.  To
 resolve this to the lazy string's character type, use the type's
 @code{target} method.  @xref{Types In Python}.  This attribute is not
 writable.
-@end defivar
+@end defvar
 
 @node Auto-loading
 @subsection Auto-loading
@@ -23301,7 +23794,8 @@ command, or because the inferior has loaded a shared library),
 The auto-loading feature is useful for supplying application-specific
 debugging commands and scripts.
 
-Auto-loading can be enabled or disabled.
+Auto-loading can be enabled or disabled,
+and the list of auto-loaded scripts can be printed.
 
 @table @code
 @kindex set auto-load-scripts
@@ -23311,6 +23805,30 @@ Enable or disable the auto-loading of Python scripts.
 @kindex show auto-load-scripts
 @item show auto-load-scripts
 Show whether auto-loading of Python scripts is enabled or disabled.
+
+@kindex info auto-load-scripts
+@cindex print list of auto-loaded scripts
+@item info auto-load-scripts [@var{regexp}]
+Print the list of all scripts that @value{GDBN} auto-loaded.
+
+Also printed is the list of scripts that were mentioned in
+the @code{.debug_gdb_scripts} section and were not found
+(@pxref{.debug_gdb_scripts section}).
+This is useful because their names are not printed when @value{GDBN}
+tries to load them and fails.  There may be many of them, and printing
+an error message for each one is problematic.
+
+If @var{regexp} is supplied only scripts with matching names are printed.
+
+Example:
+
+@smallexample
+(gdb) info auto-load-scripts
+Loaded  Script
+Yes     py-section-script.py
+        full name: /tmp/py-section-script.py
+Missing my-foo-pretty-printers.py
+@end smallexample
 @end table
 
 When reading an auto-loaded file, @value{GDBN} sets the
@@ -23443,11 +23961,12 @@ top of the source tree to the source search path.
 @subsection Python modules
 @cindex python modules
 
-@value{GDBN} comes with a module to assist writing Python code.
+@value{GDBN} comes with several modules to assist writing Python code.
 
 @menu
 * gdb.printing::       Building and registering pretty-printers.
 * gdb.types::          Utilities for working with types.
+* gdb.prompt::         Utilities for prompt value substitution.
 @end menu
 
 @node gdb.printing
@@ -23515,6 +24034,62 @@ Return @code{True} if @var{type}, assumed to be a type with fields
 Return a Python @code{dictionary} type produced from @var{enum_type}.
 @end table
 
+@node gdb.prompt
+@subsubsection gdb.prompt
+@cindex gdb.prompt
+
+This module provides a method for prompt value-substitution.
+
+@table @code
+@item substitute_prompt (@var{string})
+Return @var{string} with escape sequences substituted by values.  Some
+escape sequences take arguments.  You can specify arguments inside
+``@{@}'' immediately following the escape sequence.
+
+The escape sequences you can pass to this function are:
+
+@table @code
+@item \\
+Substitute a backslash.
+@item \e
+Substitute an ESC character.
+@item \f
+Substitute the selected frame; an argument names a frame parameter.
+@item \n
+Substitute a newline.
+@item \p
+Substitute a parameter's value; the argument names the parameter.
+@item \r
+Substitute a carriage return.
+@item \t
+Substitute the selected thread; an argument names a thread parameter.
+@item \v
+Substitute the version of GDB.
+@item \w
+Substitute the current working directory.
+@item \[
+Begin a sequence of non-printing characters.  These sequences are
+typically used with the ESC character, and are not counted in the string
+length.  Example: ``\[\e[0;34m\](gdb)\[\e[0m\]'' will return a
+blue-colored ``(gdb)'' prompt where the length is five.
+@item \]
+End a sequence of non-printing characters.
+@end table
+
+For example:
+
+@smallexample
+substitute_prompt (``frame: \f,
+                   print arguments: \p@{print frame-arguments@}'')
+@end smallexample
+
+@exdent will return the string:
+
+@smallexample
+"frame: main, print arguments: scalars"
+@end smallexample
+@end table
+
 @node Interpreters
 @chapter Command Interpreters
 @cindex command interpreters
@@ -24064,7 +24639,7 @@ that can control the execution and describe the state of your program.
 If you specify an absolute file name when prompted for the @kbd{M-x
 gdb} argument, then Emacs sets your current working directory to where
 your program resides.  If you only specify the file name, then Emacs
-sets your current working directory to to the directory associated
+sets your current working directory to the directory associated
 with the previous buffer.  In this case, @value{GDBN} may find your
 program by searching your environment's @code{PATH} variable, but on
 some operating systems it might not find the source.  So, although the
@@ -24222,6 +24797,7 @@ may repeat one or more times.
 * GDB/MI Breakpoint Commands::
 * GDB/MI Program Context::
 * GDB/MI Thread Commands::
+* GDB/MI Ada Tasking Commands::
 * GDB/MI Program Execution::
 * GDB/MI Stack Manipulation::
 * GDB/MI Variable Objects::
@@ -24734,6 +25310,7 @@ follow development on @email{gdb@@sourceware.org} and
 * GDB/MI Async Records::
 * GDB/MI Frame Information::
 * GDB/MI Thread Information::
+* GDB/MI Ada Exception Information::
 @end menu
 
 @node GDB/MI Result Records
@@ -24888,11 +25465,12 @@ was attached to a program.  The @var{id} field contains the
 @value{GDBN} identifier of the thread group.  The @var{pid} field
 contains process identifier, specific to the operating system.
 
-@itemx =thread-group-exited,id="@var{id}"
+@item =thread-group-exited,id="@var{id}"[,exit-code="@var{code}"]
 A thread group is no longer associated with a running program,
 either because the program has exited, or because it was detached
 from.  The @var{id} field contains the @value{GDBN} identifier of the
-thread group.
+thread group.  @var{code} is the exit code of the inferior; it exists
+only when the inferior exited with some code.
 
 @item =thread-created,id="@var{id}",group-id="@var{gid}"
 @itemx =thread-exited,id="@var{id}",group-id="@var{gid}"
@@ -24936,6 +25514,19 @@ thread group in whose context the library was unloaded.  If the field is
 absent, it means the library was unloaded in the context of all present
 thread groups.
 
+@item =breakpoint-created,bkpt=@{...@}
+@itemx =breakpoint-modified,bkpt=@{...@}
+@itemx =breakpoint-deleted,bkpt=@{...@}
+Reports that a breakpoint was created, modified, or deleted,
+respectively.  Only user-visible breakpoints are reported to the MI
+user.
+
+The @var{bkpt} argument is of the same form as returned by the various
+breakpoint commands; @xref{GDB/MI Breakpoint Commands}.
+
+Note that if a breakpoint is emitted in the result record of a
+command, then it will not also be emitted in an async record.
+
 @end table
 
 @node GDB/MI Frame Information
@@ -24999,6 +25590,13 @@ The value of this field is an integer number of the processor core the
 thread was last seen on.  This field is optional.
 @end table
 
+@node GDB/MI Ada Exception Information
+@subsection @sc{gdb/mi} Ada Exception Information
+
+Whenever a @code{*stopped} record is emitted because the program
+stopped after hitting an exception catchpoint (@pxref{Set Catchpoints}),
+@value{GDBN} provides the name of the exception that was raised via
+the @code{exception-name} field.
 
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Simple Examples
@@ -26075,6 +26673,83 @@ args=[@{name="format",value="0x8048e9c \"%*s%c %d %c\\n\""@},
 (gdb)
 @end smallexample
 
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node GDB/MI Ada Tasking Commands
+@section @sc{gdb/mi} Ada Tasking Commands
+
+@subheading The @code{-ada-task-info} Command
+@findex -ada-task-info
+
+@subsubheading Synopsis
+
+@smallexample
+ -ada-task-info [ @var{task-id} ]
+@end smallexample
+
+Reports information about either a specific Ada task, if the
+@var{task-id} parameter is present, or about all Ada tasks.
+
+@subsubheading @value{GDBN} Command
+
+The @samp{info tasks} command prints the same information
+about all Ada tasks (@pxref{Ada Tasks}).
+
+@subsubheading Result
+
+The result is a table of Ada tasks.  The following columns are
+defined for each Ada task:
+
+@table @samp
+@item current
+This field exists only for the current thread.  It has the value @samp{*}.
+
+@item id
+The identifier that @value{GDBN} uses to refer to the Ada task.
+
+@item task-id
+The identifier that the target uses to refer to the Ada task.
+
+@item thread-id
+The identifier of the thread corresponding to the Ada task.
+
+This field should always exist, as Ada tasks are always implemented
+on top of a thread.  But if @value{GDBN} cannot find this corresponding
+thread for any reason, the field is omitted.
+
+@item parent-id
+This field exists only when the task was created by another task.
+In this case, it provides the ID of the parent task.
+
+@item priority
+The base priority of the task.
+
+@item state
+The current state of the task.  For a detailed description of the
+possible states, see @ref{Ada Tasks}.
+
+@item name
+The name of the task.
+
+@end table
+
+@subsubheading Example
+
+@smallexample
+-ada-task-info
+^done,tasks=@{nr_rows="3",nr_cols="8",
+hdr=[@{width="1",alignment="-1",col_name="current",colhdr=""@},
+@{width="3",alignment="1",col_name="id",colhdr="ID"@},
+@{width="9",alignment="1",col_name="task-id",colhdr="TID"@},
+@{width="4",alignment="1",col_name="thread-id",colhdr=""@},
+@{width="4",alignment="1",col_name="parent-id",colhdr="P-ID"@},
+@{width="3",alignment="1",col_name="priority",colhdr="Pri"@},
+@{width="22",alignment="-1",col_name="state",colhdr="State"@},
+@{width="1",alignment="2",col_name="name",colhdr="Name"@}],
+body=[@{current="*",id="1",task-id="   644010",thread-id="1",priority="48",
+state="Child Termination Wait",name="main_task"@}]@}
+(gdb)
+@end smallexample
+
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Program Execution
 @section @sc{gdb/mi} Program Execution
@@ -27055,7 +27730,7 @@ void do_work(...)
 @end smallexample
 
 If a fixed variable object for the @code{state} variable is created in
-this function, and we enter the recursive call, the the variable
+this function, and we enter the recursive call, the variable
 object will report the value of @code{state} in the top-level
 @code{do_work} invocation.  On the other hand, a floating variable
 object will report the value of @code{state} in the current frame.
@@ -29718,21 +30393,26 @@ The current list of features is:
 
 @table @samp
 @item frozen-varobjs
-Indicates presence of the @code{-var-set-frozen} command, as well 
-as possible presense of the @code{frozen} field in the output 
+Indicates support for the @code{-var-set-frozen} command, as well
+as possible presense of the @code{frozen} field in the output
 of @code{-varobj-create}.
 @item pending-breakpoints
-Indicates presence of the @option{-f} option to the @code{-break-insert} command.
+Indicates support for the @option{-f} option to the @code{-break-insert}
+command.
 @item python
-Indicates presence of Python scripting support, Python-based
+Indicates Python scripting support, Python-based
 pretty-printing commands, and possible presence of the
 @samp{display_hint} field in the output of @code{-var-list-children}
 @item thread-info
-Indicates presence of the @code{-thread-info} command.
+Indicates support for the @code{-thread-info} command.
 @item data-read-memory-bytes
-Indicates presense of the @code{-data-read-memory-bytes} and the
+Indicates support for the @code{-data-read-memory-bytes} and the
 @code{-data-write-memory-bytes} commands.
-
+@item breakpoint-notifications
+Indicates that changes to breakpoints and breakpoints created via the
+CLI will be announced via async records.
+@item ada-task-info
+Indicates support for the @code{-ada-task-info} command.
 @end table
 
 @subheading The @code{-list-target-features} Command
@@ -30733,15 +31413,36 @@ things without first using the debugger to find the facts.
 
 @c The readline documentation is distributed with the readline code
 @c and consists of the two following files:
-@c     rluser.texinfo
-@c     inc-hist.texinfo
+@c     rluser.texi
+@c     hsuser.texi
 @c Use -I with makeinfo to point to the appropriate directory,
 @c environment var TEXINPUTS with TeX.
 @ifclear SYSTEM_READLINE
 @include rluser.texi
-@include inc-hist.texinfo
+@include hsuser.texi
 @end ifclear
 
+@node In Memoriam
+@appendix In Memoriam
+
+The @value{GDBN} project mourns the loss of the following long-time
+contributors:
+
+@table @code
+@item Fred Fish
+Fred was a long-standing contributor to @value{GDBN} (1991-2006), and
+to Free Software in general.  Outside of @value{GDBN}, he was known in
+the Amiga world for his series of Fish Disks, and the GeekGadget project.
+
+@item Michael Snyder
+Michael was one of the Global Maintainers of the @value{GDBN} project,
+with contributions recorded as early as 1996, until 2011.  In addition
+to his day to day participation, he was a large driving force behind
+adding Reverse Debugging to @value{GDBN}.
+@end table
+
+Beyond their technical contributions to the project, they were also
+enjoyable members of the Free Software Community.  We will miss them.
 
 @node Formatting Documentation
 @appendix Formatting Documentation
@@ -30901,7 +31602,12 @@ Sets}) require a functioning @code{iconv} implementation.  If you are
 on a GNU system, then this is provided by the GNU C Library.  Some
 other systems also provide a working @code{iconv}.
 
-On systems with @code{iconv}, you can install GNU Libiconv.  If you
+If @value{GDBN} is using the @code{iconv} program which is installed
+in a non-standard place, you will need to tell @value{GDBN} where to find it.
+This is done with @option{--with-iconv-bin} which specifies the
+directory that contains the @code{iconv} program.
+
+On systems without @code{iconv}, you can install GNU Libiconv.  If you
 have previously installed Libiconv, you can use the
 @option{--with-libiconv-prefix} option to configure.
 
@@ -31457,18 +32163,22 @@ Takes an optional file parameter.
 @kindex maint print raw-registers
 @kindex maint print cooked-registers
 @kindex maint print register-groups
+@kindex maint print remote-registers
 @item maint print registers @r{[}@var{file}@r{]}
 @itemx maint print raw-registers @r{[}@var{file}@r{]}
 @itemx maint print cooked-registers @r{[}@var{file}@r{]}
 @itemx maint print register-groups @r{[}@var{file}@r{]}
+@itemx maint print remote-registers @r{[}@var{file}@r{]}
 Print @value{GDBN}'s internal register data structures.
 
 The command @code{maint print raw-registers} includes the contents of
-the raw register cache; the command @code{maint print cooked-registers}
-includes the (cooked) value of all registers, including registers which
-aren't available on the target nor visible to user; and the
-command @code{maint print register-groups} includes the groups that each
-register is a member of.  @xref{Registers,, Registers, gdbint,
+the raw register cache; the command @code{maint print
+cooked-registers} includes the (cooked) value of all registers,
+including registers which aren't available on the target nor visible
+to user; the command @code{maint print register-groups} includes the
+groups that each register is a member of; and the command @code{maint
+print remote-registers} includes the remote target's register numbers
+and offsets in the `G' packets.  @xref{Registers,, Registers, gdbint,
 @value{GDBN} Internals}.
 
 These commands take an optional parameter, a file name to which to
@@ -31834,9 +32544,12 @@ 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
-optional.
+At a minimum, a stub is required to support the @samp{g} and @samp{G}
+commands for register access, and the @samp{m} and @samp{M} commands
+for memory access.  Stubs that only control single-threaded targets
+can implement run control with the @samp{c} (continue), and @samp{s}
+(step) commands.  Stubs that support multi-threading targets should
+support the @samp{vCont} command.  All other commands are optional.
 
 @node Packets
 @section Packets
@@ -31973,6 +32686,9 @@ Reply:
 Continue.  @var{addr} is address to resume.  If @var{addr} is omitted,
 resume at current address.
 
+This packet is deprecated for multi-threading support.  @xref{vCont
+packet}.
+
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
 
@@ -31981,6 +32697,9 @@ Reply:
 Continue with signal @var{sig} (hex signal number).  If
 @samp{;@var{addr}} is omitted, resume at same address.
 
+This packet is deprecated for multi-threading support.  @xref{vCont
+packet}.
+
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
 
@@ -32063,13 +32782,15 @@ for success
 for an error
 @end table
 
-@item H @var{c} @var{thread-id}
+@item H @var{op} @var{thread-id}
 @cindex @samp{H} packet
 Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
-@samp{G}, et.al.).  @var{c} depends on the operation to be performed: it
-should be @samp{c} for step and continue operations, @samp{g} for other
-operations.  The thread designator @var{thread-id} has the format and
-interpretation described in @ref{thread-id syntax}.
+@samp{G}, et.al.).  @var{op} depends on the operation to be performed:
+it should be @samp{c} for step and continue operations (note that this
+is deprecated, supporting the @samp{vCont} command is a better
+option), @samp{g} for other operations.  The thread designator
+@var{thread-id} has the format and interpretation described in
+@ref{thread-id syntax}.
 
 Reply:
 @table @samp
@@ -32209,6 +32930,9 @@ The @samp{R} packet has no reply.
 Single step.  @var{addr} is the address at which to resume.  If
 @var{addr} is omitted, resume at same address.
 
+This packet is deprecated for multi-threading support.  @xref{vCont
+packet}.
+
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
 
@@ -32218,6 +32942,9 @@ Reply:
 Step with signal.  This is analogous to the @samp{C} packet, but
 requests a single-step, rather than a normal resumption of execution.
 
+This packet is deprecated for multi-threading support.  @xref{vCont
+packet}.
+
 Reply:
 @xref{Stop Reply Packets}, for the reply specifications.
 
@@ -32274,6 +33001,7 @@ for success in non-stop mode (@pxref{Remote Non-Stop})
 
 @item vCont@r{[};@var{action}@r{[}:@var{thread-id}@r{]]}@dots{}
 @cindex @samp{vCont} packet
+@anchor{vCont packet}
 Resume the inferior, specifying different actions for each thread.
 If an action is specified with no @var{thread-id}, then it is applied to any
 threads that don't have a specific action specified; if no default action is
@@ -32852,7 +33580,7 @@ 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,
+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
@@ -33259,6 +33987,10 @@ These are the currently defined stub features and their properties:
 @tab @samp{-}
 @tab Yes
 
+@item @samp{qXfer:fdpic:read}
+@tab No
+@tab @samp{-}
+@tab Yes
 
 @item @samp{QNonStop}
 @tab No
@@ -33305,6 +34037,11 @@ These are the currently defined stub features and their properties:
 @tab @samp{-}
 @tab No
 
+@item @samp{EnableDisableTracepoints}
+@tab No
+@tab @samp{-}
+@tab No
+
 @end multitable
 
 These are the currently defined stub features, in more detail:
@@ -33365,6 +34102,10 @@ The remote stub understands the @samp{qXfer:threads:read} packet
 The remote stub understands the @samp{qXfer:traceframe-info:read}
 packet (@pxref{qXfer traceframe info read}).
 
+@item qXfer:fdpic:read
+The remote stub understands the @samp{qXfer:fdpic:read}
+packet (@pxref{qXfer fdpic loadmap read}).
+
 @item QNonStop
 The remote stub understands the @samp{QNonStop} packet
 (@pxref{QNonStop}).
@@ -33417,6 +34158,11 @@ The remote stub understands the @samp{QAllow} packet.
 @cindex static tracepoints, in remote protocol
 The remote stub supports static tracepoints.
 
+@item EnableDisableTracepoints
+The remote stub supports the @samp{QTEnable} (@pxref{QTEnable}) and
+@samp{QTDisable} (@pxref{QTDisable}) packets that allow tracepoints
+to be enabled and disabled while a trace experiment is running.
+
 @end table
 
 @item qSymbol::
@@ -33497,6 +34243,8 @@ packets.)
 @item qTsV
 @itemx QTStart    
 @itemx QTStop     
+@itemx QTEnable
+@itemx QTDisable
 @itemx QTinit     
 @itemx QTro       
 @itemx qTStatus   
@@ -33613,6 +34361,15 @@ Return a description of the current traceframe's contents.
 This packet is not probed by default; the remote stub must request it,
 by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
 
+@item qXfer:fdpic:read:@var{annex}:@var{offset},@var{length}
+@anchor{qXfer fdpic loadmap read}
+Read contents of @code{loadmap}s on the target system.  The
+annex, either @samp{exec} or @samp{interp}, specifies which @code{loadmap},
+executable @code{loadmap} or interpreter @code{loadmap} to read.
+
+This packet is not probed by default; the remote stub must request it,
+by supplying an appropriate @samp{qSupported} response (@pxref{qSupported}).
+
 @item qXfer:osdata:read::@var{offset},@var{length}
 @anchor{qXfer osdata read}
 Access the target's @dfn{operating system information}.  
@@ -33986,6 +34743,18 @@ instruction reply packet}).
 @item QTStop
 End the tracepoint experiment.  Stop collecting trace frames.
 
+@item QTEnable:@var{n}:@var{addr}
+@anchor{QTEnable}
+Enable tracepoint @var{n} at address @var{addr} in a started tracepoint
+experiment.  If the tracepoint was previously disabled, then collection
+of data from it will resume.
+
+@item QTDisable:@var{n}:@var{addr}
+@anchor{QTDisable}
+Disable tracepoint @var{n} at address @var{addr} in a started tracepoint
+experiment.  No more data will be collected from the tracepoint unless
+@samp{QTEnable:@var{n}:@var{addr}} is subsequently issued.
+
 @item QTinit
 Clear the table of tracepoints, and empty the trace frame buffer.
 
@@ -35958,67 +36727,10 @@ The formal DTD for the traceframe info format is given below:
 
 @include agentexpr.texi
 
-@node Trace File Format
-@appendix Trace File Format
-@cindex trace file format
-
-The trace file comes in three parts: a header, a textual description
-section, and a trace frame section with binary data.
-
-The header has the form @code{\x7fTRACE0\n}.  The first byte is
-@code{0x7f} so as to indicate that the file contains binary data,
-while the @code{0} is a version number that may have different values
-in the future.
-
-The description section consists of multiple lines of @sc{ascii} text
-separated by newline characters (@code{0xa}).  The lines may include a
-variety of optional descriptive or context-setting information, such
-as tracepoint definitions or register set size.  @value{GDBN} will
-ignore any line that it does not recognize.  An empty line marks the end
-of this section.
-
-@c FIXME add some specific types of data
-
-The trace frame section consists of a number of consecutive frames.
-Each frame begins with a two-byte tracepoint number, followed by a
-four-byte size giving the amount of data in the frame.  The data in
-the frame consists of a number of blocks, each introduced by a
-character indicating its type (at least register, memory, and trace
-state variable).  The data in this section is raw binary, not a
-hexadecimal or other encoding; its endianness matches the target's
-endianness.
-
-@c FIXME bi-arch may require endianness/arch info in description section
-
-@table @code
-@item R @var{bytes}
-Register block.  The number and ordering of bytes matches that of a
-@code{g} packet in the remote protocol.  Note that these are the
-actual bytes, in target order and @value{GDBN} register order, not a
-hexadecimal encoding.
-
-@item M @var{address} @var{length} @var{bytes}...
-Memory block.  This is a contiguous block of memory, at the 8-byte
-address @var{address}, with a 2-byte length @var{length}, followed by
-@var{length} bytes.
-
-@item V @var{number} @var{value}
-Trace state variable block.  This records the 8-byte signed value
-@var{value} of trace state variable numbered @var{number}.
-
-@end table
-
-Future enhancements of the trace file format may include additional types
-of blocks.
-
 @node Target Descriptions
 @appendix Target Descriptions
 @cindex target descriptions
 
-@strong{Warning:} target descriptions are still under active development,
-and the contents and format may change between @value{GDBN} releases.
-The format is expected to stabilize in the future.
-
 One of the challenges of using @value{GDBN} to debug embedded systems
 is that there are so many minor variants of each processor
 architecture in use.  It is common practice for vendors to start with
@@ -36353,7 +37065,7 @@ The register's size, in bits.
 @item regnum
 The register's number.  If omitted, a register's number is one greater
 than that of the previous register (either in the current feature or in
-a preceeding feature); the first register in the target description
+a preceding feature); the first register in the target description
 defaults to zero.  This register number is used to read or write
 the register; e.g.@: it is used in the remote @code{p} and @code{P}
 packets, and registers appear in the @code{g} and @code{G} packets
@@ -36475,6 +37187,7 @@ registers using the capitalization used in the description.
 * MIPS Features::
 * M68K Features::
 * PowerPC Features::
+* TIC6x Features::
 @end menu
 
 
@@ -36636,6 +37349,21 @@ contain registers @samp{ev0h} through @samp{ev31h}, @samp{acc}, and
 these to present registers @samp{ev0} through @samp{ev31} to the
 user.
 
+@node TIC6x Features
+@subsection TMS320C6x Features
+@cindex target descriptions, TIC6x features
+@cindex target descriptions, TMS320C6x features
+The @samp{org.gnu.gdb.tic6x.core} feature is required for TMS320C6x
+targets.  It should contain registers @samp{A0} through @samp{A15},
+registers @samp{B0} through @samp{B15}, @samp{CSR} and @samp{PC}.
+
+The @samp{org.gnu.gdb.tic6x.gp} feature is optional.  It should
+contain registers @samp{A16} through @samp{A31} and @samp{B16}
+through @samp{B31}.
+
+The @samp{org.gnu.gdb.tic6x.c6xp} feature is optional.  It should
+contain registers @samp{TSR}, @samp{ILC} and @samp{RILC}.
+
 @node Operating System Information
 @appendix Operating System Information
 @cindex operating system information
@@ -36688,6 +37416,192 @@ should contain a comma-separated list of cores that this process
 is running on.  Target may provide additional columns,
 which @value{GDBN} currently ignores.
 
+@node Trace File Format
+@appendix Trace File Format
+@cindex trace file format
+
+The trace file comes in three parts: a header, a textual description
+section, and a trace frame section with binary data.
+
+The header has the form @code{\x7fTRACE0\n}.  The first byte is
+@code{0x7f} so as to indicate that the file contains binary data,
+while the @code{0} is a version number that may have different values
+in the future.
+
+The description section consists of multiple lines of @sc{ascii} text
+separated by newline characters (@code{0xa}).  The lines may include a
+variety of optional descriptive or context-setting information, such
+as tracepoint definitions or register set size.  @value{GDBN} will
+ignore any line that it does not recognize.  An empty line marks the end
+of this section.
+
+@c FIXME add some specific types of data
+
+The trace frame section consists of a number of consecutive frames.
+Each frame begins with a two-byte tracepoint number, followed by a
+four-byte size giving the amount of data in the frame.  The data in
+the frame consists of a number of blocks, each introduced by a
+character indicating its type (at least register, memory, and trace
+state variable).  The data in this section is raw binary, not a
+hexadecimal or other encoding; its endianness matches the target's
+endianness.
+
+@c FIXME bi-arch may require endianness/arch info in description section
+
+@table @code
+@item R @var{bytes}
+Register block.  The number and ordering of bytes matches that of a
+@code{g} packet in the remote protocol.  Note that these are the
+actual bytes, in target order and @value{GDBN} register order, not a
+hexadecimal encoding.
+
+@item M @var{address} @var{length} @var{bytes}...
+Memory block.  This is a contiguous block of memory, at the 8-byte
+address @var{address}, with a 2-byte length @var{length}, followed by
+@var{length} bytes.
+
+@item V @var{number} @var{value}
+Trace state variable block.  This records the 8-byte signed value
+@var{value} of trace state variable numbered @var{number}.
+
+@end table
+
+Future enhancements of the trace file format may include additional types
+of blocks.
+
+@node Index Section Format
+@appendix @code{.gdb_index} section format
+@cindex .gdb_index section format
+@cindex index section format
+
+This section documents the index section that is created by @code{save
+gdb-index} (@pxref{Index Files}).  The index section is
+DWARF-specific; some knowledge of DWARF is assumed in this
+description.
+
+The mapped index file format is designed to be directly
+@code{mmap}able on any architecture.  In most cases, a datum is
+represented using a little-endian 32-bit integer value, called an
+@code{offset_type}.  Big endian machines must byte-swap the values
+before using them.  Exceptions to this rule are noted.  The data is
+laid out such that alignment is always respected.
+
+A mapped index consists of several areas, laid out in order.
+
+@enumerate
+@item
+The file header.  This is a sequence of values, of @code{offset_type}
+unless otherwise noted:
+
+@enumerate
+@item
+The version number, currently 5.  Versions 1, 2 and 3 are obsolete.
+Version 4 differs by its hashing function.
+
+@item
+The offset, from the start of the file, of the CU list.
+
+@item
+The offset, from the start of the file, of the types CU list.  Note
+that this area can be empty, in which case this offset will be equal
+to the next offset.
+
+@item
+The offset, from the start of the file, of the address area.
+
+@item
+The offset, from the start of the file, of the symbol table.
+
+@item
+The offset, from the start of the file, of the constant pool.
+@end enumerate
+
+@item
+The CU list.  This is a sequence of pairs of 64-bit little-endian
+values, sorted by the CU offset.  The first element in each pair is
+the offset of a CU in the @code{.debug_info} section.  The second
+element in each pair is the length of that CU.  References to a CU
+elsewhere in the map are done using a CU index, which is just the
+0-based index into this table.  Note that if there are type CUs, then
+conceptually CUs and type CUs form a single list for the purposes of
+CU indices.
+
+@item
+The types CU list.  This is a sequence of triplets of 64-bit
+little-endian values.  In a triplet, the first value is the CU offset,
+the second value is the type offset in the CU, and the third value is
+the type signature.  The types CU list is not sorted.
+
+@item
+The address area.  The address area consists of a sequence of address
+entries.  Each address entry has three elements:
+
+@enumerate
+@item
+The low address.  This is a 64-bit little-endian value.
+
+@item
+The high address.  This is a 64-bit little-endian value.  Like
+@code{DW_AT_high_pc}, the value is one byte beyond the end.
+
+@item
+The CU index.  This is an @code{offset_type} value.
+@end enumerate
+
+@item
+The symbol table.  This is an open-addressed hash table.  The size of
+the hash table is always a power of 2.
+
+Each slot in the hash table consists of a pair of @code{offset_type}
+values.  The first value is the offset of the symbol's name in the
+constant pool.  The second value is the offset of the CU vector in the
+constant pool.
+
+If both values are 0, then this slot in the hash table is empty.  This
+is ok because while 0 is a valid constant pool index, it cannot be a
+valid index for both a string and a CU vector.
+
+The hash value for a table entry is computed by applying an
+iterative hash function to the symbol's name.  Starting with an
+initial value of @code{r = 0}, each (unsigned) character @samp{c} in
+the string is incorporated into the hash using the formula depending on the
+index version:
+
+@table @asis
+@item Version 4
+The formula is @code{r = r * 67 + c - 113}.
+
+@item Version 5
+The formula is @code{r = r * 67 + tolower (c) - 113}.
+@end table
+
+The terminating @samp{\0} is not incorporated into the hash.
+
+The step size used in the hash table is computed via
+@code{((hash * 17) & (size - 1)) | 1}, where @samp{hash} is the hash
+value, and @samp{size} is the size of the hash table.  The step size
+is used to find the next candidate slot when handling a hash
+collision.
+
+The names of C@t{++} symbols in the hash table are canonicalized.  We
+don't currently have a simple description of the canonicalization
+algorithm; if you intend to create new index sections, you must read
+the code.
+
+@item
+The constant pool.  This is simply a bunch of bytes.  It is organized
+so that alignment is correct: CU vectors are stored first, followed by
+strings.
+
+A CU vector in the constant pool is a sequence of @code{offset_type}
+values.  The first value is the number of CU indices in the vector.
+Each subsequent value is the index of a CU in the CU list.  This
+element in the hash table is used to indicate which CUs define the
+symbol.
+
+A string in the constant pool is zero-terminated.
+@end enumerate
+
 @include gpl.texi
 
 @node GNU Free Documentation License
This page took 0.103751 seconds and 4 git commands to generate.