(Variables, Symbols): Document the "<incomplete type>" message and
[deliverable/binutils-gdb.git] / gdb / doc / gdb.texinfo
index e8394555d08178258ad60ffb0c562ca542292d7d..45cc16fbf43a611dbd394ae79fd952cfd76bf0d0 100644 (file)
@@ -471,9 +471,19 @@ Romig-Koch, Rob Savoye, Jamie Smith, Mike Stump, Ian Taylor, Angela
 Thomas, Michael Tiemann, Tom Tromey, Ron Unrau, Jim Wilson, and David
 Zuhn have made contributions both large and small.
 
+Andrew Cagney, Fernando Nasser, and Elena Zannoni, while working for
+Cygnus Solutions, implemented the original @sc{gdb/mi} interface.
+
 Jim Blandy added support for preprocessor macros, while working for Red
 Hat.
 
+Andrew Cagney designed @value{GDBN}'s architecture vector.  Many
+people including Andrew Cagney, Stephane Carrez, Randolph Chung, Nick
+Duffek, Richard Henderson, Mark Kettenis, Grace Sainsbury, Kei
+Sakamoto, Yoshinori Sato, Michael Snyder, Andreas Schwab, Jason
+Thorpe, Corinna Vinschen, Ulrich Weigand, and Elena Zannoni, helped
+with the migration of old architectures to this new framework.
+
 @node Sample Session
 @chapter A Sample @value{GDBN} Session
 
@@ -928,25 +938,6 @@ Files,, Command files}.
 @cindex @code{-d}
 Add @var{directory} to the path to search for source files.
 
-@item -m
-@itemx -mapped
-@cindex @code{--mapped}
-@cindex @code{-m}
-@emph{Warning: this option depends on operating system facilities that are not
-supported on all systems.}@*
-If memory-mapped files are available on your system through the @code{mmap}
-system call, you can use this option
-to have @value{GDBN} write the symbols from your
-program into a reusable file in the current directory.  If the program you are debugging is
-called @file{/tmp/fred}, the mapped symbol file is @file{/tmp/fred.syms}.
-Future @value{GDBN} debugging sessions notice the presence of this file,
-and can quickly map in symbol information from it, rather than reading
-the symbol table from the executable program.
-
-The @file{.syms} file is specific to the host machine where @value{GDBN}
-is run.  It holds an exact image of the internal @value{GDBN} symbol
-table.  It cannot be shared across multiple host platforms.
-
 @item -r
 @itemx -readnow
 @cindex @code{--readnow}
@@ -957,16 +948,6 @@ This makes startup slower, but makes future operations faster.
 
 @end table
 
-You typically combine the @code{-mapped} and @code{-readnow} options in
-order to build a @file{.syms} file that contains complete symbol
-information.  (@xref{Files,,Commands to specify files}, for information
-on @file{.syms} files.)  A simple @value{GDBN} invocation to do nothing
-but build a @file{.syms} file for future use is:
-
-@smallexample
-gdb -batch -nx -mapped -readnow programname
-@end smallexample
-
 @node Mode Options
 @subsection Choosing modes
 
@@ -1065,7 +1046,7 @@ normal, level 1 is for use when @value{GDBN} is run as a subprocess of
 @sc{gnu} Emacs, level 3 is the maximum annotation suitable for programs
 that control @value{GDBN}, and level 2 has been deprecated.
 
-The annotation mechanism has largely been superseeded by @sc{gdb/mi}
+The annotation mechanism has largely been superseded by @sc{gdb/mi}
 (@pxref{GDB/MI}).
 
 @item --args
@@ -1178,7 +1159,7 @@ Files}, for more details about @value{GDBN} command files.
 
 @item
 Reads the command history recorded in the @dfn{history file}.
-@xref{History}, for more details about the command history and the
+@xref{Command History}, for more details about the command history and the
 files where @value{GDBN} records it.
 @end enumerate
 
@@ -2085,7 +2066,24 @@ terminal.
 
 When you use the @code{tty} command or redirect input in the @code{run}
 command, only the input @emph{for your program} is affected.  The input
-for @value{GDBN} still comes from your terminal.
+for @value{GDBN} still comes from your terminal.  @code{tty} is an alias
+for @code{set inferior-tty}.
+
+@cindex inferior tty
+@cindex set inferior controlling terminal
+You can use the @code{show inferior-tty} command to tell @value{GDBN} to
+display the name of the terminal that will be used for future runs of your
+program.
+
+@table @code
+@item set inferior-tty /dev/ttyb
+@kindex set inferior-tty
+Set the tty for the program being debugged to /dev/ttyb.
+
+@item show inferior-tty
+@kindex show inferior-tty
+Show the current tty for the program being debugged.
+@end table
 
 @node Attach
 @section Debugging an already-running process
@@ -2376,6 +2374,7 @@ As with the @samp{[New @dots{}]} message, the form of the text after
 threads.
 
 @kindex thread apply
+@cindex apply command to several threads
 @item thread apply [@var{threadno}] [@var{all}]  @var{args}
 The @code{thread apply} command allows you to apply a command to one or
 more threads.  Specify the numbers of the threads that you want affected
@@ -2902,7 +2901,6 @@ cannot set a hardware watchpoint, it sets a software watchpoint, which
 executes more slowly and reports the change in value at the next
 @emph{statement}, not the instruction, after the change occurs.
 
-@vindex can-use-hw-watchpoints
 @cindex use only software watchpoints
 You can force @value{GDBN} to use only software watchpoints with the
 @kbd{set can-use-hw-watchpoints 0} command.  With this variable set to
@@ -4147,8 +4145,8 @@ Inside your program, stack frames are identified by their addresses.  A
 stack frame consists of many bytes, each of which has its own address; each
 kind of computer has a convention for choosing one byte whose
 address serves as the address of the frame.  Usually this address is kept
-in a register called the @dfn{frame pointer register} while execution is
-going on in that frame.
+in a register called the @dfn{frame pointer register}
+(@pxref{Registers, $fp}) while execution is going on in that frame.
 
 @cindex frame number
 @value{GDBN} assigns numbers to all existing stack frames, starting with
@@ -4290,7 +4288,11 @@ you are interested in, or recompile without optimizations.
 @cindex startup code, and backtrace
 Most programs have a standard user entry point---a place where system
 libraries and startup code transition into user code.  For C this is
-@code{main}.  When @value{GDBN} finds the entry function in a backtrace
+@code{main}@footnote{
+Note that embedded programs (the so-called ``free-standing''
+environment) are not required to have a @code{main} function as the
+entry point.  They could even have multiple entry points.}.
+When @value{GDBN} finds the entry function in a backtrace
 it will terminate the backtrace, to avoid tracing into highly
 system-specific (and generally uninteresting) code.
 
@@ -4368,9 +4370,6 @@ pointer and a program counter.
 
 On the 29k architecture, it needs three addresses: a register stack
 pointer, a program counter, and a memory stack pointer.
-@c note to future updaters: this is conditioned on a flag
-@c SETUP_ARBITRARY_FRAME in the tm-*.h files.  The above is up to date
-@c as of 27 Jan 1994.
 
 @kindex up
 @item up @var{n}
@@ -4912,6 +4911,12 @@ End of assembler dump.
 Some architectures have more than one commonly-used set of instruction
 mnemonics or other syntax.
 
+For programs that were dynamically linked and use shared libraries,
+instructions that call functions or branch to locations in the shared
+libraries might show a seemingly bogus location---it's actually a
+location of the relocation table.  On some architectures, @value{GDBN}
+might be able to resolve these to actual function names.
+
 @table @code
 @kindex set disassembly-flavor
 @cindex Intel disassembly flavor
@@ -5174,6 +5179,11 @@ for Debugging Your Program or @sc{gnu} CC, gcc.info, Using @sc{gnu} CC}.
 @xref{C, , Debugging C++}, for more info about debug info formats
 that are best suited to C@t{++} programs.
 
+If you ask to print an object whose contents are unknown to
+@value{GDBN}, e.g., because its data type is not completely specified
+by the debug information, @value{GDBN} will say @samp{<incomplete
+type>}.  @xref{Symbols, incomplete type}, for more about this.
+
 @node Arrays
 @section Artificial arrays
 
@@ -5300,7 +5310,10 @@ The command @code{info symbol 0x54320} yields similar results.
 @xref{Symbols, info symbol}.
 
 @item c
-Regard as an integer and print it as a character constant.
+Regard as an integer and print it as a character constant.  This
+prints both the numerical value and its character representation.  The
+character representation is replaced with the octal escape @samp{\nnn}
+for characters outside the 7-bit @sc{ascii} range.
 
 @item f
 Regard the bits of the value as a floating point number and print
@@ -5350,10 +5363,12 @@ how much memory (counting by units @var{u}) to display.
 @c 4.1.2.
 
 @item @var{f}, the display format
-The display format is one of the formats used by @code{print},
-@samp{s} (null-terminated string), or @samp{i} (machine instruction).
-The default is @samp{x} (hexadecimal) initially.
-The default changes each time you use either @code{x} or @code{print}.
+The display format is one of the formats used by @code{print}
+(@samp{x}, @samp{d}, @samp{u}, @samp{o}, @samp{t}, @samp{a}, @samp{c},
+@samp{f}), and in addition @samp{s} (for null-terminated strings) and
+@samp{i} (for machine instructions).  The default is @samp{x}
+(hexadecimal) initially.  The default changes each time you use either
+@code{x} or @code{print}.
 
 @item @var{u}, the unit size
 The unit size is any of
@@ -6126,6 +6141,11 @@ the selected stack frame.  @var{regname} may be any register name valid on
 the machine you are using, with or without the initial @samp{$}.
 @end table
 
+@cindex stack pointer register
+@cindex program counter register
+@cindex process status register
+@cindex frame pointer register
+@cindex standard registers
 @value{GDBN} has four ``standard'' register names that are available (in
 expressions) on most machines---whenever they do not conflict with an
 architecture's canonical mnemonics for registers.  The register names
@@ -9993,6 +10013,30 @@ type = struct complex @{
 As with @code{whatis}, using @code{ptype} without an argument refers to
 the type of @code{$}, the last value in the value history.
 
+@cindex incomplete type
+Sometimes, programs use opaque data types or incomplete specifications
+of complex data structure.  If the debug information included in the
+program does not allow @value{GDBN} to display a full declaration of
+the data type, it will say @samp{<incomplete type>}.  For example,
+given these declarations:
+
+@smallexample
+    struct foo;
+    struct foo *fooptr;
+@end smallexample
+
+@noindent
+but no definition for @code{struct foo} itself, @value{GDBN} will say:
+
+@smallexample
+  (gdb) ptype foo
+  $1 = <incomplete type>
+@end smallexample
+
+@noindent
+``Incomplete type'' is C terminology for data types that are not
+completely specified.
+
 @kindex info types
 @item info types @var{regexp}
 @itemx info types
@@ -10604,9 +10648,10 @@ way to do this is at start-up time, using the arguments to
 Out of @value{GDBN}}).
 
 Occasionally it is necessary to change to a different file during a
-@value{GDBN} session.  Or you may run @value{GDBN} and forget to specify
-a file you want to use.  In these situations the @value{GDBN} commands
-to specify new files are useful.
+@value{GDBN} session.  Or you may run @value{GDBN} and forget to
+specify a file you want to use.  Or you are debugging a remote target
+via @code{gdbserver} (@pxref{Server, file}).  In these situations the
+@value{GDBN} commands to specify new files are useful.
 
 @table @code
 @cindex executable file
@@ -10621,14 +10666,16 @@ directories to search, just as the shell does when looking for a program
 to run.  You can change the value of this variable, for both @value{GDBN}
 and your program, using the @code{path} command.
 
-On systems with memory-mapped files, an auxiliary file named
-@file{@var{filename}.syms} may hold symbol table information for
-@var{filename}.  If so, @value{GDBN} maps in the symbol table from
-@file{@var{filename}.syms}, starting up more quickly.  See the
-descriptions of the file options @samp{-mapped} and @samp{-readnow}
-(available on the command line, see @ref{File Options, , -readnow},
-and with the commands @code{file}, @code{symbol-file}, or
-@code{add-symbol-file}, described below), for more information.
+@cindex unlinked object files
+@cindex patching object files
+You can load unlinked object @file{.o} files into @value{GDBN} using
+the @code{file} command.  You will not be able to ``run'' an object
+file, but you can disassemble functions and inspect variables.  Also,
+if the underlying BFD functionality supports it, you could use
+@kbd{gdb -write} to patch object files using this technique.  Note
+that @value{GDBN} can neither interpret nor modify relocations in this
+case, so branches and some initialized variables will appear to go to
+the wrong place.  But this feature is still handy from time to time.
 
 @item file
 @code{file} with no argument makes @value{GDBN} discard any information it
@@ -10689,38 +10736,13 @@ in stabs format.
 @kindex readnow
 @cindex reading symbols immediately
 @cindex symbols, reading immediately
-@kindex mapped
-@cindex memory-mapped symbol file
-@cindex saving symbol table
-@item symbol-file @var{filename} @r{[} -readnow @r{]} @r{[} -mapped @r{]}
-@itemx file @var{filename} @r{[} -readnow @r{]} @r{[} -mapped @r{]}
+@item symbol-file @var{filename} @r{[} -readnow @r{]}
+@itemx file @var{filename} @r{[} -readnow @r{]}
 You can override the @value{GDBN} two-stage strategy for reading symbol
 tables by using the @samp{-readnow} option with any of the commands that
 load symbol table information, if you want to be sure @value{GDBN} has the
 entire symbol table available.
 
-If memory-mapped files are available on your system through the
-@code{mmap} system call, you can use another option, @samp{-mapped}, to
-cause @value{GDBN} to write the symbols for your program into a reusable
-file.  Future @value{GDBN} debugging sessions map in symbol information
-from this auxiliary symbol file (if the program has not changed), rather
-than spending time reading the symbol table from the executable
-program.  Using the @samp{-mapped} option has the same effect as
-starting @value{GDBN} with the @samp{-mapped} command-line option.
-
-You can use both options together, to make sure the auxiliary symbol
-file has all the symbol information for your program.
-
-The auxiliary symbol file for a program called @var{myprog} is called
-@samp{@var{myprog}.syms}.  Once this file exists (so long as it is newer
-than the corresponding executable), @value{GDBN} always attempts to use
-it when you debug @var{myprog}; no special options or commands are
-needed.
-
-The @file{.syms} file is specific to the host machine where you run
-@value{GDBN}.  It holds an exact image of the internal @value{GDBN}
-symbol table.  It cannot be shared across multiple host platforms.
-
 @c FIXME: for now no mention of directories, since this seems to be in
 @c flux.  13mar1992 status is that in theory GDB would look either in
 @c current dir or in same dir as myprog; but issues like competing
@@ -10749,7 +10771,7 @@ the program is running.  To do this, use the @code{kill} command
 @kindex add-symbol-file
 @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} @r{[} -readnow @r{]}
 @itemx add-symbol-file @var{filename} @r{-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
@@ -10803,10 +10825,6 @@ way.
 
 @code{add-symbol-file} does not repeat if you press @key{RET} after using it.
 
-You can use the @samp{-mapped} and @samp{-readnow} options just as with
-the @code{symbol-file} command, to change how @value{GDBN} manages the symbol
-table information for @var{filename}.
-
 @kindex add-symbol-file-from-memory
 @cindex @code{syscall DSO}
 @cindex load symbols from memory
@@ -11030,12 +11048,14 @@ host system; they need to be the same as the target libraries, although the
 copies on the target can be stripped as long as the copies on the host are
 not.
 
-You need to tell @value{GDBN} where the target libraries are, so that it can
-load the correct copies---otherwise, it may try to load the host's libraries.
-@value{GDBN} has two variables to specify the search directories for target
-libraries.
+@cindex where to look for shared libraries
+For remote debugging, you need to tell @value{GDBN} where the target
+libraries are, so that it can load the correct copies---otherwise, it
+may try to load the host's libraries.  @value{GDBN} has two variables
+to specify the search directories for target libraries.
 
 @table @code
+@cindex prefix for shared library file names
 @kindex set solib-absolute-prefix
 @item set solib-absolute-prefix @var{path}
 If this variable is set, @var{path} will be used as a prefix for any
@@ -11045,6 +11065,8 @@ paths to the shared library in the target program's memory.  If you use
 out in the same way that they are on the target, with e.g.@: a
 @file{/usr/lib} hierarchy under @var{path}.
 
+@cindex default value of @samp{solib-absolute-prefix}
+@cindex @samp{--with-sysroot}
 You can set the default value of @samp{solib-absolute-prefix} by using the
 configure-time @samp{--with-sysroot} option.
 
@@ -11927,8 +11949,12 @@ For TCP connections, you must start up @code{gdbserver} prior to using
 the @code{target remote} command.  Otherwise you may get an error whose
 text depends on the host system, but which usually looks something like
 @samp{Connection refused}.  You don't need to use the @code{load}
-command in @value{GDBN} when using gdbserver, since the program is
-already on the target.
+command in @value{GDBN} when using @code{gdbserver}, since the program is
+already on the target.  However, if you want to load the symbols (as
+you normally would), do that with the @code{file} command, and issue
+it @emph{before} connecting to the server; otherwise, you will get an
+error message saying @code{"Program is already running"}, since the
+program is considered running after the connection.
 
 @end table
 
@@ -14665,21 +14691,30 @@ following CRIS-specific commands:
 @table @code
 @item set cris-version @var{ver}
 @cindex CRIS version
-Set the current CRIS version to @var{ver}.  The CRIS version affects
-register names and sizes.  This command is useful in case
-autodetection of the CRIS version fails.
+Set the current CRIS version to @var{ver}, either @samp{10} or @samp{32}.
+The CRIS version affects register names and sizes.  This command is useful in
+case autodetection of the CRIS version fails.
 
 @item show cris-version
 Show the current CRIS version.
 
 @item set cris-dwarf2-cfi
 @cindex DWARF-2 CFI and CRIS
-Set the usage of DWARF-2 CFI for CRIS debugging.  The default is off
-if using @code{gcc-cris} whose version is below @code{R59}, otherwise
-on.
+Set the usage of DWARF-2 CFI for CRIS debugging.  The default is @samp{on}.
+Change to @samp{off} when using @code{gcc-cris} whose version is below 
+@code{R59}.
 
 @item show cris-dwarf2-cfi
 Show the current state of using DWARF-2 CFI.
+
+@item set cris-mode @var{mode}
+@cindex CRIS mode
+Set the current CRIS mode to @var{mode}.  It should only be changed when
+debugging in guru mode, in which case it should be set to 
+@samp{guru} (the default is @samp{normal}).
+
+@item show cris-mode
+Show the current CRIS mode.
 @end table
 
 @node Super-H
@@ -14964,7 +14999,7 @@ described here.
 @menu
 * Prompt::                      Prompt
 * Editing::                     Command editing
-* History::                     Command history
+* Command History::             Command history
 * Screen Size::                 Screen size
 * Numbers::                     Numbers
 * ABI::                         Configuring the current ABI
@@ -15032,7 +15067,7 @@ Show whether command line editing is enabled.
 interface.  Users unfamiliar with @sc{gnu} Emacs or @code{vi} are
 encouraged to read that chapter.
 
-@node History
+@node Command History
 @section Command history
 @cindex command history
 
@@ -15045,6 +15080,17 @@ history facility.
 package, to provide the history facility.  @xref{Using History
 Interactively}, for the detailed description of the History library.
 
+To issue a command to @value{GDBN} without affecting certain aspects of
+the state which is seen by users, prefix it with @samp{server }.  This
+means that this command will not affect the command history, nor will it
+affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
+pressed on a line by itself.
+
+@cindex @code{server}, command prefix
+The server prefix does not affect the recording of values into the value
+history; to print a value without recording it into the value history,
+use the @code{output} command instead of the @code{print} command.
+
 Here is the description of @value{GDBN} commands related to command
 history.
 
@@ -15191,18 +15237,18 @@ Show the current pagination mode.
 You can always enter numbers in octal, decimal, or hexadecimal in
 @value{GDBN} by the usual conventions: octal numbers begin with
 @samp{0}, decimal numbers end with @samp{.}, and hexadecimal numbers
-begin with @samp{0x}.  Numbers that begin with none of these are, by
-default, entered in base 10; likewise, the default display for
-numbers---when no particular format is specified---is base 10.  You can
-change the default base for both input and output with the @code{set
-radix} command.
+begin with @samp{0x}.  Numbers that neither begin with @samp{0} or
+@samp{0x}, nor end with a @samp{.} are, by default, entered in base
+10; likewise, the default display for numbers---when no particular
+format is specified---is base 10.  You can change the default base for
+both input and output with the commands described below.
 
 @table @code
 @kindex set input-radix
 @item set input-radix @var{base}
 Set the default base for numeric input.  Supported choices
 for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
-specified either unambiguously or using the current default radix; for
+specified either unambiguously or using the current input radix; for
 example, any of
 
 @smallexample
@@ -15213,13 +15259,17 @@ set input-radix 0xa
 
 @noindent
 sets the input base to decimal.  On the other hand, @samp{set input-radix 10}
-leaves the input radix unchanged, no matter what it was.
+leaves the input radix unchanged, no matter what it was, since
+@samp{10}, being without any leading or trailing signs of its base, is
+interpreted in the current radix.  Thus, if the current radix is 16,
+@samp{10} is interpreted in hex, i.e.@: as 16 decimal, which doesn't
+change the radix.
 
 @kindex set output-radix
 @item set output-radix @var{base}
 Set the default base for numeric display.  Supported choices
 for @var{base} are decimal 8, 10, or 16.  @var{base} must itself be
-specified either unambiguously or using the current default radix.
+specified either unambiguously or using the current input radix.
 
 @kindex show input-radix
 @item show input-radix
@@ -16953,9 +17003,40 @@ consequence of @sc{gdb/mi} (e.g., a breakpoint modified) or a result of
 target activity (e.g., target stopped).
 
 The following is a preliminary list of possible out-of-band records.
+In particular, the @var{exec-async-output} records.
+
+@table @code
+@item *stopped,reason="@var{reason}"
+@end table
+
+@var{reason} can be one of the following:
 
 @table @code
-@item "*" "stop"
+@item breakpoint-hit
+A breakpoint was reached.
+@item watchpoint-trigger
+A watchpoint was triggered.
+@item read-watchpoint-trigger
+A read watchpoint was triggered.
+@item access-watchpoint-trigger 
+An access watchpoint was triggered.
+@item function-finished
+An -exec-finish or similar CLI command was accomplished.
+@item location-reached
+An -exec-until or similar CLI command was accomplished.
+@item watchpoint-scope
+A watchpoint has gone out of scope.
+@item end-stepping-range
+An -exec-next, -exec-next-instruction, -exec-step, -exec-step-instruction or 
+similar CLI command was accomplished.
+@item exited-signalled 
+The inferior exited because of a signal.
+@item exited 
+The inferior exited.
+@item exited-normally 
+The inferior exited normally.
+@item signal-received 
+A signal was received by the inferior.
 @end table
 
 
@@ -16989,19 +17070,14 @@ For each command in the block, the following is described:
  -command @var{args}@dots{}
 @end smallexample
 
-@subsubheading @value{GDBN} Command
-
-The corresponding @value{GDBN} CLI command.
-
 @subsubheading Result
 
-@subsubheading Out-of-band
+@subsubheading @value{GDBN} Command
 
-@subsubheading Notes
+The corresponding @value{GDBN} CLI command(s), if any.
 
 @subsubheading Example
 
-
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Breakpoint Table Commands
 @section @sc{gdb/mi} Breakpoint table commands
@@ -19076,6 +19152,57 @@ The corresponding @value{GDBN} command is @samp{interpreter-exec}.
 (@value{GDBP})
 @end smallexample
 
+@subheading The @code{-inferior-tty-set} Command
+@findex -inferior-tty-set
+
+@subheading Synopsis
+
+@smallexample
+-inferior-tty-set /dev/pts/1
+@end smallexample
+
+Set terminal for future runs of the program being debugged.
+
+@subheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{set inferior-tty /dev/pts/1}.
+
+@subheading Example
+
+@smallexample
+(@value{GDBP})
+-inferior-tty-set /dev/pts/1
+^done
+(@value{GDBP})
+@end smallexample
+
+@subheading The @code{-inferior-tty-show} Command
+@findex -inferior-tty-show
+
+@subheading Synopsis
+
+@smallexample
+-inferior-tty-show
+@end smallexample
+
+Show terminal for future runs of program being debugged.
+
+@subheading @value{GDBN} Command
+
+The corresponding @value{GDBN} command is @samp{show inferior-tty}.
+
+@subheading Example
+
+@smallexample
+(@value{GDBP})
+-inferior-tty-set /dev/pts/1
+^done
+(@value{GDBP})
+-inferior-tty-show
+^done,inferior_tty_terminal="/dev/pts/1"
+(@value{GDBP})
+@end smallexample
+
 @ignore
 @c %%%%%%%%%%%%%%%%%%%%%%%%%%%% SECTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 @node GDB/MI Kod Commands
@@ -19139,7 +19266,7 @@ Signal handling commands are not implemented.
  -stack-info-frame
 @end smallexample
 
-Get info on the current frame.
+Get info on the selected frame.
 
 @subsubheading @value{GDBN} Command
 
@@ -19147,7 +19274,15 @@ The corresponding @value{GDBN} command is @samp{info frame} or @samp{frame}
 (without arguments).
 
 @subsubheading Example
-N.A.
+
+@smallexample
+(@value{GDBP})
+-stack-info-frame
+^done,frame=@{level="1",addr="0x0001076c",func="callee3",
+file="../../../devo/gdb/testsuite/gdb.mi/basics.c",
+fullname="/home/foo/bar/devo/gdb/testsuite/gdb.mi/basics.c",line="17"@}
+(@value{GDBP})
+@end smallexample
 
 @subheading The @code{-stack-info-depth} Command
 @findex -stack-info-depth
@@ -19378,14 +19513,14 @@ Show a single frame:
  -stack-list-locals @var{print-values}
 @end smallexample
 
-Display the local variable names for the current frame.  With an
-argument of 0 or @code{--no-values}, prints only the names of the variables.
-With argument of 1 or @code{--all-values}, prints also their values.  With
-argument of 2 or @code{--simple-values}, prints the name, type and value for
-simple data types and the name and type for arrays, structures and
-unions.  In this last case, the idea is that the user can see the
-value of simple data types immediately and he can create variable
-objects for other data types if he wishes to explore their values in
+Display the local variable names for the selected frame.  If
+@var{print-values} is 0 or @code{--no-values}, print only the names of
+the variables; if it is 1 or @code{--all-values}, print also their
+values; and if it is 2 or @code{--simple-values}, print the name,
+type and value for simple data types and the name and type for arrays,
+structures and unions.  In this last case, a frontend can immediately
+display the value of simple data types and create variable objects for
+other data types when the the user wishes to explore their values in
 more detail.
 
 @subsubheading @value{GDBN} Command
@@ -19418,7 +19553,7 @@ more detail.
  -stack-select-frame @var{framenum}
 @end smallexample
 
-Change the current frame.  Select a different frame @var{framenum} on
+Change the selected frame.  Select a different frame @var{framenum} on
 the stack.
 
 @subsubheading @value{GDBN} Command
@@ -20350,23 +20485,27 @@ Returns the number of children of a variable object @var{name}:
 @smallexample
  -var-list-children [@var{print-values}] @var{name}
 @end smallexample
+@anchor{-var-list-children} 
 
-Returns a list of the children of the specified variable object.  With
-just the variable object name as an argument or with an optional
-preceding argument of 0 or @code{--no-values}, prints only the names of the
-variables.  With an optional preceding argument of 1 or @code{--all-values},
-also prints their values.
+Return a list of the children of the specified variable object and
+create variable objects for them, if they do not already exist.  With
+a single argument or if @var{print-values} has a value for of 0 or
+@code{--no-values}, print only the names of the variables; if
+@var{print-values} is 1 or @code{--all-values}, also print their
+values; and if it is 2 or @code{--simple-values} print the name and
+value for simple data types and just the name for arrays, structures
+and unions.
 
 @subsubheading Example
 
 @smallexample
 (@value{GDBP})
  -var-list-children n
- numchild=@var{n},children=[@{name=@var{name},
^done,numchild=@var{n},children=[@{name=@var{name},
  numchild=@var{n},type=@var{type}@},@r{(repeats N times)}]
 (@value{GDBP})
  -var-list-children --all-values n
- numchild=@var{n},children=[@{name=@var{name},
^done,numchild=@var{n},children=[@{name=@var{name},
  numchild=@var{n},value=@var{value},type=@var{type}@},@r{(repeats N times)}]
 @end smallexample
 
@@ -20477,13 +20616,28 @@ subsequent @code{-var-update} list.
 @subsubheading Synopsis
 
 @smallexample
- -var-update @{@var{name} | "*"@}
+ -var-update [@var{print-values}] @{@var{name} | "*"@}
 @end smallexample
 
 Update the value of the variable object @var{name} by evaluating its
 expression after fetching all the new values from memory or registers.
-A @samp{*} causes all existing variable objects to be updated.
+A @samp{*} causes all existing variable objects to be updated.  The
+option @var{print-values} determines whether names and values, or just
+names are printed in the manner described for
+@code{@pxref{-var-list-children}}.
+
+@subsubheading Example
 
+@smallexample
+(@value{GDBP})
+-var-assign var1 3
+^done,value="3"
+(@value{GDBP})
+-var-update --all-values var1
+^done,changelist=[@{name="var1",value="3",in_scope="true",
+type_changed="false"@}]
+(@value{GDBP})
+@end smallexample
 
 @node Annotations
 @chapter @value{GDBN} Annotations
@@ -20502,7 +20656,6 @@ This is Edition @value{EDITION}, @value{DATE}.
 
 @menu
 * Annotations Overview::  What annotations are; the general syntax.
-* Server Prefix::       Issuing a command without affecting user state.
 * Prompting::           Annotations marking @value{GDBN}'s need for input.
 * Errors::              Annotations for error messages.
 * Invalidation::        Some annotations describe things now invalid.
@@ -20543,7 +20696,7 @@ Interface, annotate, GDB's Obsolete Annotations}).
 @table @code
 @kindex set annotate
 @item set annotate @var{level}
-The @value{GDB} command @code{set annotate} sets the level of
+The @value{GDBN} command @code{set annotate} sets the level of
 annotations to the specified @var{level}.
 
 @item show annotate
@@ -20581,20 +20734,6 @@ Here @samp{quit} is input to @value{GDBN}; the rest is output from
 denotes a @samp{control-z} character) are annotations; the rest is
 output from @value{GDBN}.
 
-@node Server Prefix
-@section The Server Prefix
-@cindex server prefix for annotations
-
-To issue a command to @value{GDBN} without affecting certain aspects of
-the state which is seen by users, prefix it with @samp{server }.  This
-means that this command will not affect the command history, nor will it
-affect @value{GDBN}'s notion of which command to repeat if @key{RET} is
-pressed on a line by itself.
-
-The server prefix does not affect the recording of values into the value
-history; to print a value without recording it into the value history,
-use the @code{output} command instead of the @code{print} command.
-
 @node Prompting
 @section Annotation for @value{GDBN} Input
 
@@ -21960,8 +22099,10 @@ before @value{GDBN} disconnects via the @code{detach} command.
 
 Reply:
 @table @samp
-@item @emph{no response}
-@value{GDBN} does not check for any response after sending this packet.
+@item OK
+for success
+@item E@var{NN}
+for an error
 @end table
 
 @item @code{e} --- reserved
This page took 0.045929 seconds and 4 git commands to generate.