* gdb.texinfo: Fix typo, $bpnum is set to last breakpoint number.
[binutils-gdb.git] / gdb / doc / gdb.texinfo
index be4a8c906db56bedd5b37c944c39ebc5d3b877a9..1f4e95ec6281bdbdba9d42ec27e726c41fae19e6 100644 (file)
 @finalout
 @syncodeindex ky cp
 
-@c readline appendices use @vindex
+@c readline appendices use @vindex, @findex and @ftable,
+@c annotate.texi and gdbmi use @findex.
 @syncodeindex vr cp
+@syncodeindex fn cp
 
 @c !!set GDB manual's edition---not the same as GDB version!
 @set EDITION Eighth
@@ -75,7 +77,7 @@ into another language, under the above conditions for modified versions.
 @sp 1
 @subtitle @value{EDITION} Edition, for @value{GDBN} version @value{GDBVN}
 @subtitle @value{DATE}
-@author Richard M. Stallman and Roland H. Pesch
+@author Richard Stallman, Roland Pesch, Stan Shebs, et al.
 @page
 @tex
 {\parskip=0pt
@@ -142,6 +144,7 @@ Copyright (C) 1988-2000 Free Software Foundation, Inc.
 * Sequences::                   Canned sequences of commands
 * Emacs::                       Using @value{GDBN} under @sc{gnu} Emacs
 * Annotations::                 @value{GDBN}'s annotation interface.
+* GDB/MI::                      @value{GDBN}'s Machine Interface.
 
 * GDB Bugs::                    Reporting bugs in @value{GDBN}
 * Formatting Documentation::    How to format and print @value{GDBN} documentation
@@ -203,6 +206,11 @@ Copyright (C) 1988-2000 Free Software Foundation, Inc.
 
 @end ifhtml
 
+@c TeX can handle the contents at the start but makeinfo 3.12 can not
+@iftex
+@contents
+@end iftex
+
 @node Summary
 @unnumbered Summary of @value{GDBN}
 
@@ -291,6 +299,7 @@ omitted from this list, we would like to add your names!
 So that they may not regard their many labors as thankless, we
 particularly thank those who shepherded @value{GDBN} through major
 releases:
+Andrew Cagney (release 5.0);
 Jim Blandy (release 4.18);
 Jason Molenda (release 4.17);
 Stan Shebs (release 4.14);
@@ -1040,9 +1049,7 @@ Use the interpreter @var{interp} for interface with the controlling
 program or device.  This option is meant to be set by programs which
 communicate with @value{GDBN} using it as a back end.  For example,
 @samp{--interpreter=mi} causes @value{GDBN} to use the @dfn{gdbmi
-interface}.
-@c FIXME: There should be an @xref here to the GDB/MI docs, but
-@c gdbmi.texi doesn't have a single node to reference!
+interface} (@pxref{GDB/MI, , The @sc{gdb/mi} Interface}).
 
 @item -write
 @cindex @code{--write}
@@ -1069,7 +1076,7 @@ no-warranty blurb, and exit.
 
 @table @code
 @kindex quit @r{[}@var{expression}@r{]}
-@kindex q
+@kindex q @r{(@code{quit})}
 @item quit @r{[}@var{expression}@r{]}
 @itemx q
 To exit @value{GDBN}, use the @code{quit} command (abbreviated
@@ -1154,7 +1161,7 @@ names start with @code{s}.  You can test abbreviations by using them as
 arguments to the @code{help} command.
 
 @cindex repeating commands
-@kindex RET
+@kindex RET @r{(repeat last command)}
 A blank line as input to @value{GDBN} (typing just @key{RET}) means to
 repeat the previous command.  Certain commands (for example, @code{run})
 will not repeat this way; these are commands whose unintentional
@@ -1171,7 +1178,7 @@ output, in a way similar to the common utility @code{more}
 @key{RET} too many in this situation, @value{GDBN} disables command
 repetition after any command that generates this sort of display.
 
-@kindex #
+@kindex # @r{(a comment)}
 @cindex comment
 Any text from a @kbd{#} to the end of the line is a comment; it does
 nothing.  This is useful mainly in command files (@pxref{Command
@@ -1305,7 +1312,7 @@ You can always ask @value{GDBN} itself for information on its commands,
 using the command @code{help}.
 
 @table @code
-@kindex h
+@kindex h @r{(@code{help})}
 @item help
 @itemx h
 You can use @code{help} (abbreviated @code{h}) with no arguments to
@@ -1421,7 +1428,7 @@ all the sub-commands.  @xref{Index}.
 @c @group
 @table @code
 @kindex info
-@kindex i
+@kindex i @r{(@code{info})}
 @item info
 This command (abbreviated @code{i}) is for describing the state of your
 program.  For example, you can list the arguments given to your program
@@ -1557,6 +1564,7 @@ format; if your @sc{gnu} C compiler has this option, do not use it.
 
 @table @code
 @kindex run
+@kindex r @r{(@code{run})}
 @item run
 @itemx r
 Use the @code{run} command to start your program under @value{GDBN}.
@@ -1646,8 +1654,8 @@ the program, not by the shell.
 @code{run} with no arguments uses the same arguments used by the previous
 @code{run}, or those set by the @code{set args} command.
 
-@kindex set args
 @table @code
+@kindex set args
 @item set args
 Specify the arguments to be used the next time your program is run.  If
 @code{set args} has no arguments, @code{run} executes your program
@@ -1954,7 +1962,7 @@ control, one thread in particular is always the focus of debugging.
 This thread is called the @dfn{current thread}.  Debugging commands show
 program information from the perspective of the current thread.
 
-@kindex New @var{systag}
+@cindex @code{New} @var{systag} message
 @cindex thread identifier (system)
 @c FIXME-implementors!! It would be more helpful if the [New...] message
 @c included GDB's numeric thread handle, so you could just go to that
@@ -2025,8 +2033,8 @@ For debugging purposes, @value{GDBN} associates its own thread
 number---a small integer assigned in thread-creation order---with each
 thread in your program.
 
-@kindex New @var{systag}
-@cindex thread identifier (system)
+@cindex @code{New} @var{systag} message, on HP-UX
+@cindex thread identifier (system), on HP-UX
 @c FIXME-implementors!! It would be more helpful if the [New...] message
 @c included GDB's numeric thread handle, so you could just go to that
 @c thread without first checking `info threads'.
@@ -2311,12 +2319,12 @@ all breakpoint in that range are operated on.
 @c FIXME 2 is there stuff on this already? break at fun start, already init?
 
 @kindex break
-@kindex b
-@kindex $bpnum
+@kindex b @r{(@code{break})}
+@vindex $bpnum@r{, convenience variable}
 @cindex latest breakpoint
 Breakpoints are set with the @code{break} command (abbreviated
 @code{b}).  The debugger convenience variable @samp{$bpnum} records the
-number of the breakpoints you've set most recently; see @ref{Convenience
+number of the breakpoint you've set most recently; see @ref{Convenience
 Vars,, Convenience variables}, for a discussion of what you can do with
 convenience variables.
 
@@ -2822,7 +2830,7 @@ Delete any breakpoints set at or within the code of the specified line.
 
 @cindex delete breakpoints
 @kindex delete
-@kindex d
+@kindex d @r{(@code{delete})}
 @item delete @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
 Delete the breakpoints, watchpoints, or catchpoints of the breakpoint
 ranges specified as arguments.  If no argument is specified, delete all
@@ -2870,7 +2878,7 @@ watchpoints, and catchpoints:
 @table @code
 @kindex disable breakpoints
 @kindex disable
-@kindex dis
+@kindex dis @r{(@code{disable})}
 @item disable @r{[}breakpoints@r{]} @r{[}@var{range}@dots{}@r{]}
 Disable the specified breakpoints---or all breakpoints, if none are
 listed.  A disabled breakpoint has no effect but is not forgotten.  All
@@ -3218,8 +3226,8 @@ it stops due to a signal, you may want to use @code{handle}, or use
 
 @table @code
 @kindex continue
-@kindex c
-@kindex fg
+@kindex c @r{(@code{continue})}
+@kindex fg @r{(resume foreground execution)}
 @item continue @r{[}@var{ignore-count}@r{]}
 @itemx c @r{[}@var{ignore-count}@r{]}
 @itemx fg @r{[}@var{ignore-count}@r{]}
@@ -3253,7 +3261,7 @@ interesting, until you see the problem happen.
 
 @table @code
 @kindex step
-@kindex s
+@kindex s @r{(@code{step})}
 @item step
 Continue running your program until control reaches a different source
 line, then stop it and return control to @value{GDBN}.  This command is
@@ -3292,7 +3300,7 @@ breakpoint is reached, or a signal not related to stepping occurs before
 @var{count} steps, stepping stops right away.
 
 @kindex next
-@kindex n
+@kindex n @r{(@code{next})}
 @item next @r{[}@var{count}@r{]}
 Continue to the next source line in the current (innermost) stack frame.
 This is similar to @code{step}, but function calls that appear within
@@ -3324,7 +3332,7 @@ Contrast this with the @code{return} command (@pxref{Returning,
 ,Returning from a function}).
 
 @kindex until
-@kindex u
+@kindex u @r{(@code{until})}
 @item until
 @itemx u
 Continue running until a source line past the current line, in the
@@ -3378,7 +3386,7 @@ the forms of argument acceptable to @code{break} (@pxref{Set Breaks,
 and hence is quicker than @code{until} without an argument.
 
 @kindex stepi
-@kindex si
+@kindex si @r{(@code{stepi})}
 @item stepi
 @itemx stepi @var{arg}
 @itemx si
@@ -3393,7 +3401,7 @@ An argument is a repeat count, as in @code{step}.
 
 @need 750
 @kindex nexti
-@kindex ni
+@kindex ni @r{(@code{nexti})}
 @item nexti
 @itemx nexti @var{arg}
 @itemx ni
@@ -3680,6 +3688,7 @@ no provision for frameless functions elsewhere in the stack.
 
 @table @code
 @kindex frame@r{, command}
+@cindex current stack frame
 @item frame @var{args}
 The @code{frame} command allows you to move from one stack frame to another,
 and to print the stack frame you select.  @var{args} may be either the
@@ -3687,6 +3696,7 @@ address of the frame or the stack frame number.  Without an argument,
 @code{frame} prints the current stack frame.
 
 @kindex select-frame
+@cindex selecting frame silently
 @item select-frame
 The @code{select-frame} command allows you to move from one stack frame
 to another without printing the frame.  This is the silent version of
@@ -3706,7 +3716,7 @@ stack.
 
 @table @code
 @kindex backtrace
-@kindex bt
+@kindex bt @r{(@code{backtrace})}
 @item backtrace
 @itemx bt
 Print a backtrace of the entire stack: one line per frame for all
@@ -3726,7 +3736,7 @@ Similar, but print only the outermost @var{n} frames.
 
 @kindex where
 @kindex info stack
-@kindex info s
+@kindex info s @r{(@code{info stack})}
 The names @code{where} and @code{info stack} (abbreviated @code{info s})
 are additional aliases for @code{backtrace}.
 
@@ -3766,7 +3776,7 @@ of the stack frame just selected.
 
 @table @code
 @kindex frame@r{, selecting}
-@kindex f
+@kindex f @r{(@code{frame})}
 @item frame @var{n}
 @itemx f @var{n}
 Select frame number @var{n}.  Recall that frame zero is the innermost
@@ -3801,7 +3811,7 @@ advances toward the outermost frame, to higher frame numbers, to frames
 that have existed longer.  @var{n} defaults to one.
 
 @kindex down
-@kindex do
+@kindex do @r{(@code{down})}
 @item down @var{n}
 Move @var{n} frames down the stack.  For positive numbers @var{n}, this
 advances toward the innermost frame, to lower frame numbers, to frames
@@ -3858,7 +3868,7 @@ argument, this command is used to select a stack frame.
 @xref{Selection, ,Selecting a frame}.
 
 @kindex info frame
-@kindex info f
+@kindex info f @r{(@code{info frame})}
 @item info frame
 @itemx info f
 This command prints a verbose description of the selected stack frame,
@@ -3944,7 +3954,7 @@ prefer to use Emacs facilities to view source; see @ref{Emacs, ,Using
 @section Printing source lines
 
 @kindex list
-@kindex l
+@kindex l @r{(@code{list})}
 To print lines from a source file, use the @code{list} command
 (abbreviated @code{l}).  By default, ten lines are printed.
 There are several ways to specify what part of the file you want to print.
@@ -4127,8 +4137,8 @@ path; this moves it forward, so @value{GDBN} searches it sooner.
 
 @kindex cdir
 @kindex cwd
-@kindex $cdir
-@kindex $cwd
+@vindex $cdir@r{, convenience variable}
+@vindex $cwdr@r{, convenience variable}
 @cindex compilation directory
 @cindex current directory
 @cindex working directory
@@ -4205,7 +4215,7 @@ Line 926 of "builtin.c" starts at pc 0x63e4 and ends at 0x6404.
 @end smallexample
 
 @cindex @code{$_} and @code{info line}
-@kindex x@r{, and }@code{info line}
+@kindex x@r{(examine), and} info line
 After @code{info line}, the default address for the @code{x} command
 is changed to the starting address of the line, so that @samp{x/i} is
 sufficient to begin examining the machine code (@pxref{Memory,
@@ -4429,7 +4439,7 @@ using the colon-colon notation:
 @cindex colon-colon, context for variables/functions
 @iftex
 @c info cannot cope with a :: index entry, but why deprive hard copy readers?
-@kindex ::
+@cindex @code{::}, context for variables/functions
 @end iftex
 @example
 @var{file}::@var{variable}
@@ -4500,7 +4510,7 @@ information.
 @section Artificial arrays
 
 @cindex artificial array
-@kindex @@
+@kindex @@@r{, referencing memory as an array}
 It is often useful to print out several successive objects of the
 same type in memory; a section of an array, or an array of
 dynamically determined size for which only a pointer exists in the
@@ -4645,7 +4655,7 @@ any of several formats, independently of your program's data types.
 
 @cindex examining memory
 @table @code
-@kindex x
+@kindex x @r{(examine memory)}
 @item x/@var{nfu} @var{addr}
 @itemx x @var{addr}
 @itemx x
@@ -5336,7 +5346,7 @@ Some convenience variables are created automatically by @value{GDBN} and given
 values likely to be useful.
 
 @table @code
-@kindex $_
+@vindex $_@r{, convenience variable}
 @item $_
 The variable @code{$_} is automatically set by the @code{x} command to
 the last address examined (@pxref{Memory, ,Examining memory}).  Other
@@ -5346,14 +5356,14 @@ and @code{info breakpoint}.  The type of @code{$_} is @code{void *}
 except when set by the @code{x} command, in which case it is a pointer
 to the type of @code{$__}.
 
-@kindex $__
+@vindex $__@r{, convenience variable}
 @item $__
 The variable @code{$__} is automatically set by the @code{x} command
 to the value found in the last address examined.  Its type is chosen
 to match the format in which the data was printed.
 
 @item $_exitcode
-@kindex $_exitcode
+@vindex $_exitcode@r{, convenience variable}
 The variable @code{$_exitcode} is automatically set to the exit code when
 the program being debugged terminates.
 @end table
@@ -5868,8 +5878,8 @@ Since C and C++ are so closely related, many features of @value{GDBN} apply
 to both languages.  Whenever this is the case, we discuss those languages
 together.
 
-@cindex C++
-@kindex g++
+@cindex C@t{++}
+@cindex @code{g++}, @sc{gnu} C@t{++} compiler
 @cindex @sc{gnu} C++
 The C++ debugging facilities are jointly implemented by the C++
 compiler and @value{GDBN}.  Therefore, to debug your C++ code
@@ -6161,7 +6171,7 @@ Member function calls are allowed; you can use expressions like
 count = aml->GetOriginal(x, y)
 @end example
 
-@kindex this
+@vindex this@r{, inside C@t{++} member functions}
 @cindex namespace in C++
 @item
 While a member function is active (in the selected stack frame), your
@@ -6762,14 +6772,14 @@ index bounds, and all built-in functions and procedures.
 @node M2 Scope
 @subsubsection The scope operators @code{::} and @code{.}
 @cindex scope
-@kindex .
+@cindex @code{.}, Modula-2 scope operator
 @cindex colon, doubled as scope operator
 @ifinfo
-@kindex colon-colon@r{, in Modula-2}
+@vindex colon-colon@r{, in Modula-2}
 @c Info cannot handle :: but TeX can.
 @end ifinfo
 @iftex
-@kindex ::
+@vindex ::@r{, in Modula-2}
 @end iftex
 
 There are a few subtle differences between the Modula-2 scope operator
@@ -8012,19 +8022,16 @@ 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{]} @r{[} -mapped @r{]}
-@itemx add-symbol-file @var{filename} @var{address} @var{data_address} @var{bss_address}
-@itemx add-symbol-file @var{filename} @r{-T}@var{section} @var{address}
+@itemx add-symbol-file @var{filename} @r{-s}@var{section} @var{address}
 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 specify up to three addresses, in which
-case they are taken to be the addresses of the text, data, and bss
-segments respectively.  For complicated cases, you can specify an
-arbitrary number of @samp{@r{-T}@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.
+this out for itself.  You can additionally specify an arbitrary number
+of @samp{@r{-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.
 
 The symbol table of the file @var{filename} is added to the symbol table
 originally read with the @code{symbol-file} command.  You can use the
@@ -8421,10 +8428,6 @@ specifies a fixed address.
 
 @cindex choosing target byte order
 @cindex target byte order
-@kindex set endian big
-@kindex set endian little
-@kindex set endian auto
-@kindex show endian
 
 Some types of processors, such as the MIPS, PowerPC, and Hitachi SH,
 offer the ability to run either big-endian or little-endian byte
@@ -8536,30 +8539,30 @@ These working remote stubs are distributed with @value{GDBN}:
 @table @code
 
 @item i386-stub.c
-@kindex i386-stub.c
+@cindex @file{i386-stub.c}
 @cindex Intel
 @cindex i386
 For Intel 386 and compatible architectures.
 
 @item m68k-stub.c
-@kindex m68k-stub.c
+@cindex @file{m68k-stub.c}
 @cindex Motorola 680x0
 @cindex m680x0
 For Motorola 680x0 architectures.
 
 @item sh-stub.c
-@kindex sh-stub.c
+@cindex @file{sh-stub.c}
 @cindex Hitachi
 @cindex SH
 For Hitachi SH architectures.
 
 @item sparc-stub.c
-@kindex sparc-stub.c
+@cindex @file{sparc-stub.c}
 @cindex Sparc
 For @sc{sparc} architectures.
 
 @item sparcl-stub.c
-@kindex sparcl-stub.c
+@cindex @file{sparcl-stub.c}
 @cindex Fujitsu
 @cindex SparcLite
 For Fujitsu @sc{sparclite} architectures.
@@ -8754,7 +8757,7 @@ void (*exceptionHook)() = 0;
 
 @noindent
 but if before calling @code{set_debug_traps}, you set it to point to a
-function in your program; that function is called when
+function in your program, that function is called when
 @code{@value{GDBN}} continues after stopping on a trap (for example, bus
 error).  The function indicated by @code{exceptionHook} is called with
 one parameter: an @code{int} which is the exception number.
@@ -8851,35 +8854,36 @@ transmitted and received data respectfully.
 @cindex protocol, @value{GDBN} remote serial
 @cindex serial protocol, @value{GDBN} remote
 @cindex remote serial protocol
-All @value{GDBN} commands and responses (other than acknowledgments)
-are sent as a @var{packet}.  A @var{packet} is introduced with the
-character @samp{$}, this is followed by an optional two-digit
-@var{sequence-id} and the character @samp{:}, the actual
-@var{packet-data}, and the terminating character @samp{#} followed by a
-two-digit @var{checksum}:
+All @value{GDBN} commands and responses (other than acknowledgments) are
+sent as a @var{packet}.  A @var{packet} is introduced with the character
+@samp{$}, the actual @var{packet-data}, and the terminating character
+@samp{#} followed by a two-digit @var{checksum}:
 
 @example
 @code{$}@var{packet-data}@code{#}@var{checksum}
 @end example
 @noindent
-or, with the optional @var{sequence-id}:
-@example
-@code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum}
-@end example
 
 @cindex checksum, for @value{GDBN} remote
 @noindent
 The two-digit @var{checksum} is computed as the modulo 256 sum of all
-characters between the leading @samp{$} and the trailing @samp{#} (that
-consisting of both the optional @var{sequence-id}@code{:} and the actual
-@var{packet-data}) (an eight bit unsigned checksum).
+characters between the leading @samp{$} and the trailing @samp{#} (an
+eight bit unsigned checksum).
+
+Implementors should note that prior to @value{GDBN} 5.0 the protocol
+specification also included an optional two-digit @var{sequence-id}:
+
+@example
+@code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum}
+@end example
 
 @cindex sequence-id, for @value{GDBN} remote
 @noindent
-The two-digit @var{sequence-id}, when present, is returned with the
-acknowledgment.  Beyond that its meaning is poorly defined.
-@value{GDBN} is not known to output @var{sequence-id}s.
+That @var{sequence-id} was appended to the acknowledgment.  @value{GDBN}
+has never output @var{sequence-id}s.  Stubs that handle packets added
+since @value{GDBN} 5.0 must not accept @var{sequence-id}.
 
+@cindex acknowledgment, for @value{GDBN} remote
 When either the host or the target machine receives a packet, the first
 response expected is an acknowledgment: either @samp{+} (to indicate
 the package was received correctly) or @samp{-} (to request
@@ -8890,13 +8894,6 @@ retransmission):
 -> @code{+}
 @end example
 @noindent
-If the received packet included a @var{sequence-id} than that is
-appended to a positive acknowledgment:
-
-@example
-<- @code{$}@var{sequence-id}@code{:}@var{packet-data}@code{#}@var{checksum}
--> @code{+}@var{sequence-id}
-@end example
 
 The host (@value{GDBN}) sends @var{command}s, and the target (the
 debugging stub incorporated in your program) sends a @var{response}.  In
@@ -8904,12 +8901,16 @@ the case of step and continue @var{command}s, the response is only sent
 when the operation has completed (the target has again stopped).
 
 @var{packet-data} consists of a sequence of characters with the
-exception of @samp{#} and @samp{$} (see @samp{X} packet for an
-exception). @samp{:} can not appear as the third character in a packet.
-Fields within the packet should be separated using @samp{,} and @samp{;}
-(unfortunately some packets chose to use @samp{:}).  Except where
-otherwise noted all numbers are represented in HEX with leading zeros
-suppressed.
+exception of @samp{#} and @samp{$} (see @samp{X} packet for additional
+exceptions).
+
+Fields within the packet should be separated using @samp{,} @samp{;} or
+@samp{:}.  Except where otherwise noted all numbers are represented in
+HEX with leading zeros suppressed.
+
+Implementors should note that prior to @value{GDBN} 5.0, the character
+@samp{:} could not appear as the third character in a packet (as it
+would potentially conflict with the @var{sequence-id}).
 
 Response @var{data} can be run-length encoded to save space.  A @samp{*}
 means that the next character is an @sc{ascii} encoding giving a repeat count
@@ -8930,7 +8931,7 @@ So:
 @noindent
 means the same as "0000".
 
-The error response, returned for some packets includes a two character
+The error response returned for some packets includes a two character
 error number.  That number is not well defined.
 
 For any @var{command} not supported by the stub, an empty response
@@ -8938,19 +8939,23 @@ 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.
+
 Below is a complete list of all currently defined @var{command}s and
 their corresponding response @var{data}:
-
+@page
 @multitable @columnfractions .30 .30 .40
 @item Packet
 @tab Request
 @tab Description
 
-@item extended ops @emph{(optional)}
+@item extended ops
 @tab @code{!}
 @tab
 Use the extended remote protocol.  Sticky---only needs to be set once.
-The extended remote protocol support the @samp{R} packet.
+The extended remote protocol supports the @samp{R} packet.
 @item
 @tab reply @samp{}
 @tab
@@ -8972,9 +8977,12 @@ and continue.
 @tab @code{a}
 @tab Reserved for future use
 
-@item set program arguments @strong{(reserved)} @emph{(optional)}
+@item set program arguments @strong{(reserved)}
 @tab @code{A}@var{arglen}@code{,}@var{argnum}@code{,}@var{arg}@code{,...}
 @tab
+@item
+@tab
+@tab
 Initialized @samp{argv[]} array passed into program. @var{arglen}
 specifies the number of bytes in the hex encoded byte stream @var{arg}.
 See @file{gdbserver} for more details.
@@ -9012,7 +9020,7 @@ current address.
 @tab reply
 @tab see below
 
-@item continue with signal @emph{(optional)}
+@item continue with signal
 @tab @code{C}@var{sig}@code{;}@var{addr}
 @tab
 Continue with signal @var{sig} (hex signal number).  If
@@ -9021,12 +9029,12 @@ Continue with signal @var{sig} (hex signal number).  If
 @tab reply
 @tab see below
 
-@item toggle debug @emph{(deprecated)}
+@item toggle debug @strong{(deprecated)}
 @tab @code{d}
 @tab
 toggle debug flag.
 
-@item detach @emph{(optional)}
+@item detach
 @tab @code{D}
 @tab
 Detach @value{GDBN} from the remote system.  Sent to the remote target before
@@ -9034,7 +9042,7 @@ Detach @value{GDBN} from the remote system.  Sent to the remote target before
 @item
 @tab reply @emph{no response}
 @tab
-@value{GDBN} does not check for any response after sending this packet
+@value{GDBN} does not check for any response after sending this packet.
 
 @item reserved
 @tab @code{e}
@@ -9083,7 +9091,7 @@ See @samp{g} for a description of the @var{XX...} data.
 @tab @code{h}
 @tab Reserved for future use
 
-@item set thread @emph{(optional)}
+@item set thread 
 @tab @code{H}@var{c}@var{t...}
 @tab
 Set thread for subsequent operations (@samp{m}, @samp{M}, @samp{g},
@@ -9112,14 +9120,14 @@ thread used in other operations.  If zero, pick a thread, any thread.
 @c                selected, sets the registers of the register block of
 @c                that thread; otherwise sets current registers.
 
-@item cycle step @strong{(draft)} @emph{(optional)}
+@item cycle step @strong{(draft)}
 @tab @code{i}@var{addr}@code{,}@var{nnn}
 @tab
 Step the remote target by a single clock cycle.  If @code{,}@var{nnn} is
 present, cycle step @var{nnn} cycles.  If @var{addr} is present, cycle
 step starting at that address.
 
-@item signal then cycle step @strong{(reserved)} @emph{(optional)}
+@item signal then cycle step @strong{(reserved)}
 @tab @code{I}
 @tab
 See @samp{i} and @samp{S} for likely syntax and semantics.
@@ -9132,7 +9140,7 @@ See @samp{i} and @samp{S} for likely syntax and semantics.
 @tab @code{J}
 @tab Reserved for future use
 
-@item kill request @emph{(optional)}
+@item kill request
 @tab @code{k}
 @tab
 FIXME: @emph{There is no description of how operate when a specific
@@ -9202,7 +9210,7 @@ See write register.
 @tab return @var{r....}
 @tab The hex encoded value of the register in target byte order.
 
-@item write reg @emph{(optional)}
+@item write reg
 @tab @code{P}@var{n...}@code{=}@var{r...}
 @tab
 Write register @var{n...} with value @var{r...}, which contains two hex
@@ -9214,10 +9222,10 @@ digits for each byte in the register (target byte order).
 @tab reply @code{E}@var{NN}
 @tab for an error
 
-@item general query @emph{(optional)}
+@item general query
 @tab @code{q}@var{query}
 @tab
-Request info about @var{query}.  In general @value{GDBN} @var{query}'s
+Request info about @var{query}.  In general @value{GDBN} queries
 have a leading upper case letter.  Custom vendor queries should use a
 company prefix (in lower case) ex: @samp{qfsf.var}.  @var{query} may
 optionally be followed by a @samp{,} or @samp{;} separated list.  Stubs
@@ -9232,25 +9240,25 @@ must ensure that they match the full @var{query} name.
 @tab reply @samp{}
 @tab Indicating an unrecognized @var{query}.
 
-@item general set @emph{(optional)}
+@item general set
 @tab @code{Q}@var{var}@code{=}@var{val}
 @tab
 Set value of @var{var} to @var{val}.  See @samp{q} for a discussing of
 naming conventions.
 
-@item reset @emph{(deprecated)}
+@item reset @strong{(deprecated)}
 @tab @code{r}
 @tab
 Reset the entire system.
 
-@item remote restart @emph{(optional)}
+@item remote restart
 @tab @code{R}@var{XX}
 @tab
 Restart the remote server.  @var{XX} while needed has no clear
 definition.  FIXME: @emph{An example interaction explaining how this
 packet is used in extended-remote mode is needed}.
 
-@item step @emph{(optional)}
+@item step
 @tab @code{s}@var{addr}
 @tab
 @var{addr} is address to resume.  If @var{addr} is omitted, resume at
@@ -9259,7 +9267,7 @@ same address.
 @tab reply
 @tab see below
 
-@item step with signal @emph{(optional)}
+@item step with signal
 @tab @code{S}@var{sig}@code{;}@var{addr}
 @tab
 Like @samp{C} but step not continue.
@@ -9267,14 +9275,14 @@ Like @samp{C} but step not continue.
 @tab reply
 @tab see below
 
-@item search @emph{(optional)}
+@item search 
 @tab @code{t}@var{addr}@code{:}@var{PP}@code{,}@var{MM}
 @tab
 Search backwards starting at address @var{addr} for a match with pattern
 @var{PP} and mask @var{MM}.  @var{PP} and @var{MM} are 4
 bytes.  @var{addr} must be at least 3 digits.
 
-@item thread alive @emph{(optional)}
+@item thread alive
 @tab @code{T}@var{XX}
 @tab Find out if the thread XX is alive.
 @item
@@ -9312,7 +9320,7 @@ bytes.  @var{addr} must be at least 3 digits.
 @tab @code{x}
 @tab Reserved for future use
 
-@item write mem (binary) @emph{(optional)}
+@item write mem (binary)
 @tab @code{X}@var{addr}@code{,}@var{length}@var{:}@var{XX...}
 @tab
 @var{addr} is address, @var{length} is number of bytes, @var{XX...} is
@@ -9333,12 +9341,12 @@ escaped using @code{0x7d}.
 @tab @code{Y}
 @tab Reserved for future use
 
-@item remove break or watchpoint @strong{(draft)} @emph{(optional)}
+@item remove break or watchpoint @strong{(draft)}
 @tab @code{z}@var{t}@code{,}@var{addr}@code{,}@var{length}
 @tab
 See @samp{Z}.
 
-@item insert break or watchpoint @strong{(draft)} @emph{(optional)}
+@item insert break or watchpoint @strong{(draft)}
 @tab @code{Z}@var{t}@code{,}@var{addr}@code{,}@var{length}
 @tab
 @var{t} is type: @samp{0} - software breakpoint, @samp{1} - hardware
@@ -9446,7 +9454,7 @@ sequence will be the @code{qs}@code{ThreadInfo} query.
 @tab reply @code{m}@var{<id>}
 @tab A single thread id
 @item
-@tab reply @code{m}@var{<id>,}@var{<id>...}
+@tab reply @code{m}@var{<id>},@var{<id>...}
 @tab a comma-separated list of thread ids
 @item
 @tab reply @code{l}
@@ -9461,7 +9469,7 @@ respond to each reply with a request for more thread ids (using the
 (lower-case el, for @code{'last'}).
 
 @item extra thread info
-@tab @code{qfThreadExtraInfo,}@var{<id>}
+@tab @code{q}@code{ThreadExtraInfo}@code{,}@var{id}
 @tab
 @item
 @tab
@@ -9532,6 +9540,9 @@ offset to the @code{Bss} section.}
 @item thread info request
 @tab @code{q}@code{P}@var{mode}@var{threadid}
 @tab
+@item
+@tab
+@tab
 Returns information on @var{threadid}.  Where: @var{mode} is a hex
 encoded 32 bit mode; @var{threadid} is a hex encoded 64 bit thread ID.
 @item
@@ -9542,6 +9553,9 @@ See @code{remote.c:remote_unpack_thread_info_response()}.
 @item remote command
 @tab @code{q}@code{Rcmd,}@var{COMMAND}
 @tab
+@item
+@tab
+@tab
 @var{COMMAND} (hex encoded) is passed to the local interpreter for
 execution.  Invalid commands should be reported using the output string.
 Before the final result packet, the target may also respond with a
@@ -10337,7 +10351,7 @@ and type @kbd{~.} to leave @code{tip} or @code{cu}.
 
 @node Remote Log
 @subsubsection Remote log
-@kindex eb.log
+@cindex @file{eb.log}, a log file for EB29K
 @cindex log file for EB29K
 
 The @code{target amd-eb} command creates a file @file{eb.log} in the
@@ -10596,6 +10610,7 @@ memory}.  The accepted values for @var{mod} are @code{small},
 @item target mon960 @var{dev}
 MON960 monitor for Intel i960.
 
+@kindex target nindy
 @item target nindy @var{devicename}
 An Intel 960 board controlled by a Nindy Monitor.  @var{devicename} is
 the name of the serial device to use for the connection, e.g.
@@ -10621,12 +10636,6 @@ By responding to a prompt on startup;
 By using the @code{target} command at any point during your @value{GDBN}
 session.  @xref{Target Commands, ,Commands for managing targets}.
 
-@kindex target nindy
-@item target nindy @var{devicename}
-An Intel 960 board controlled by a Nindy Monitor.  @var{devicename} is
-the name of the serial device to use for the connection, e.g.
-@file{/dev/ttya}.
-
 @end itemize
 
 @cindex download to Nindy-960
@@ -11002,14 +11011,14 @@ both the Unix host and on the Sparclet target.  The program
 @code{@value{GDBP}} is installed and executed on the Unix host.
 
 @table @code
-@item timeout @var{args}
+@item remotetimeout @var{args}
 @kindex remotetimeout
 @value{GDBN} supports the option @code{remotetimeout}.
 This option is set by the user, and  @var{args} represents the number of
 seconds @value{GDBN} waits for responses.
 @end table
 
-@kindex Compiling
+@cindex compiling, on Sparclet
 When compiling for debugging, include the options @samp{-g} to get debug
 information and @samp{-Ttext} to relocate the program to where you wish to
 load it on the target.  You may also want to add the options @samp{-n} or
@@ -11025,7 +11034,7 @@ You can use @code{objdump} to verify that the addresses are what you intended:
 sparclet-aout-objdump --headers --syms prog
 @end example
 
-@kindex Running
+@cindex running, on Sparclet
 Once you have set
 your Unix execution search path to find @value{GDBN}, you are ready to
 run @value{GDBN}.  From your Unix host, run @code{@value{GDBP}}
@@ -11314,7 +11323,7 @@ you may want to limit the size of this search, using one of these
 commands:
 
 @table @code
-@cindex @code{heuristic-fence-post} (Alpha,MIPS)
+@cindex @code{heuristic-fence-post} (Alpha, MIPS)
 @item set heuristic-fence-post @var{limit}
 Restrict @value{GDBN} to examining at most @var{limit} bytes in its
 search for the beginning of a function.  A value of @var{0} (the
@@ -11491,7 +11500,7 @@ These commands display the state of the @value{GDBN} history parameters.
 @end table
 
 @table @code
-@kindex show commands
+@kindex shows
 @item show commands
 Display the last ten commands in the command history.
 
@@ -11905,16 +11914,30 @@ the last command, as it would from the terminal.
 @cindex @file{.gdbinit}
 @cindex @file{gdb.ini}
 When you start @value{GDBN}, it automatically executes commands from its
-@dfn{init files}.  These are files named @file{.gdbinit} on Unix, or
-@file{gdb.ini} on DOS/Windows.  @value{GDBN} reads the init file (if
-any) in your home directory@footnote{On DOS/Windows systems, the home
-directory is the one pointed to by the @code{HOME} environment
-variable.}, then processes command line options and operands, and then
-reads the init file (if any) in the current working directory.  This is
-so the init file in your home directory can set options (such as
-@code{set complaints}) which affect the processing of the command line
-options and operands.  The init files are not executed if you use the
-@samp{-nx} option; @pxref{Mode Options, ,Choosing modes}.
+@dfn{init files}.  These are files named @file{.gdbinit} on Unix and
+@file{gdb.ini} on DOS/Windows.  During startup, @value{GDBN} does the
+following:
+
+@enumerate
+@item
+Reads the init file (if any) in your home directory@footnote{On
+DOS/Windows systems, the home directory is the one pointed to by the
+@code{HOME} environment variable.}.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads the init file (if any) in the current working directory.
+
+@item
+Reads command files specified by the @samp{-x} option.
+@end enumerate
+
+The init file in your home directory can set options (such as @samp{set
+complaints}) that affect subsequent processing of command line options
+and operands.  Init files are not executed if you use the @samp{-nx}
+option (@pxref{Mode Options, ,Choosing modes}).
 
 @cindex init file name
 On some configurations of @value{GDBN}, the init file is known by a
@@ -11923,18 +11946,18 @@ form of @value{GDBN} may need to coexist with other forms, hence a
 different name for the specialized version's init file).  These are the
 environments with special init file names:
 
-@kindex .vxgdbinit
+@cindex @file{.vxgdbinit}
 @itemize @bullet
 @item
-VxWorks (Wind River Systems real-time OS): @samp{.vxgdbinit}
+VxWorks (Wind River Systems real-time OS): @file{.vxgdbinit}
 
-@kindex .os68gdbinit
+@cindex @file{.os68gdbinit}
 @item
-OS68K (Enea Data Systems real-time OS): @samp{.os68gdbinit}
+OS68K (Enea Data Systems real-time OS): @file{.os68gdbinit}
 
-@kindex .esgdbinit
+@cindex @file{.esgdbinit}
 @item
-ES-1800 (Ericsson Telecom AB M68000 emulator): @samp{.esgdbinit}
+ES-1800 (Ericsson Telecom AB M68000 emulator): @file{.esgdbinit}
 @end itemize
 
 You can also request the execution of a command file with the
@@ -12209,9 +12232,8 @@ environment.  Users of this environment can use a new command,
 each value is printed in its own window.
 @end ignore
 
-@node Annotations
-@chapter @value{GDBN} Annotations
 @include annotate.texi
+@include gdbmi.texinfo
 
 @node GDB Bugs
 @chapter Reporting Bugs in @value{GDBN}
@@ -12454,14 +12476,7 @@ things without first using the debugger to find the facts.
 @c     inc-hist.texinfo
 @c Use -I with makeinfo to point to the appropriate directory,
 @c environment var TEXINPUTS with TeX.
-
-@node Command Line Editing
-@chapter Command Line Editing
 @include rluser.texinfo
-
-
-@node Using History Interactively
-@chapter Using History Interactively
 @include inc-hist.texinfo
 
 
@@ -12864,5 +12879,12 @@ needed for special purposes only.
 % Blame: doc@cygnus.com, 1991.
 @end tex
 
+@c TeX can handle the contents at the start but makeinfo 3.12 can not
+@ifinfo
+@contents
+@end ifinfo
+@ifhtml
 @contents
+@end ifhtml
+
 @bye