This file documents the GNU debugger @value{GDBN}.
@c !!set edition, date, version
-This is Edition 4.09, April 1993,
+This is Edition 4.09, August 1993,
of @cite{Debugging with @value{GDBN}: the GNU Source-Level Debugger}
for GDB Version @value{GDBVN}.
-Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright (C) 1988, '89, '90, '91, '92, '93 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@sp 1
@c !!set edition, date, version
@subtitle Edition 4.09, for @value{GDBN} version @value{GDBVN}
-@subtitle April 1993
-@author by Richard M. Stallman and Roland H. Pesch
+@subtitle August 1993
+@author Richard M. Stallman and Roland H. Pesch
@page
@tex
{\parskip=0pt
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
+Copyright @copyright{} 1988, '89, '90, '91, '92, '93 Free Software
+Foundation, Inc.
+@sp 2
+Published by the Free Software Foundation @*
+675 Massachusetts Avenue, @*
+Cambridge, MA 02139 USA @*
+Printed copies are available for $20 each. @*
+ISBN 1-882114-11-6 @*
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
significantly to the structure, stability, and capabilities of the
entire debugger.
-Richard Stallman, assisted at various times by Pete TerMaat, Chris
+Richard Stallman, assisted at various times by Peter TerMaat, Chris
Hanson, and Richard Mlynarik, handled releases through 2.8.
@ifclear CONLY
than @samp{-}, though we illustrate the more usual convention.)
@table @code
-@item -symbols=@var{file}
+@item -symbols @var{file}
@itemx -s @var{file}
Read symbol table from file @var{file}.
-@item -exec=@var{file}
+@item -exec @var{file}
@itemx -e @var{file}
Use file @var{file} as the executable file to execute when
@ifset BARETARGET
dump.
@end ifclear
-@item -se=@var{file}
+@item -se @var{file}
Read symbol table from file @var{file} and use it as the executable
file.
@ifclear BARETARGET
-@item -core=@var{file}
+@item -core @var{file}
@itemx -c @var{file}
Use file @var{file} as a core dump to examine.
case @samp{-c} specifies that file as a core dump to read).
@end ifclear
-@item -command=@var{file}
+@item -command @var{file}
@itemx -x @var{file}
Execute @value{GDBN} commands from file @var{file}. @xref{Command
Files,, Command files}.
-@item -directory=@var{directory}
+@item -directory @var{directory}
@itemx -d @var{directory}
Add @var{directory} to the path to search for source files.
(which is ordinarily issued whenever a program running under @value{GDBN} control
terminates) is not issued when running in batch mode.
-@item -cd=@var{directory}
+@item -cd @var{directory}
Run @value{GDBN} using @var{directory} as its working directory,
instead of the current directory.
Set the line speed (baud rate or bits per second) of any serial
interface used by @value{GDBN} for remote debugging.
-@item -tty=@var{device}
+@item -tty @var{device}
Run using @var{device} for your program's standard input and output.
@c FIXME: kingdon thinks there is more to -tty. Investigate.
@end ifset
When you issue the @code{run} command, your program begins to execute
immediately. @xref{Stopping, ,Stopping and continuing}, for discussion
of how to arrange for your program to stop. Once your program has
-stopped, you may calls functions in your program, using the @code{print}
+stopped, you may call functions in your program, using the @code{print}
or @code{call} commands. @xref{Data, ,Examining Data}.
If the modification time of your symbol file has changed since the
where this may happen.
Watchpoints currently execute two orders of magnitude more slowly than
-other breakpoints, but this can well be worth it to catch errors where
+other breakpoints, but this can be well worth it to catch errors where
you have no clue what part of your program is the culprit. Some
processors provide special hardware to support watchpoint evaluation; future
releases of @value{GDBN} will use such hardware if it is available.
end
@end example
-@cindex lost output
-@c Do we need to mention this at all? I am sort of tempted to mention
-@c it in case people are used to seeing this section of the manual. But
-@c for new users it is an annoyance--it documents something which isn't
-@c there. -kingdon, 6 Jul 93
-Previous versions of @value{GDBN} (4.9 and earlier) would flush pending
-input when executing breakpoint commands, if your program used raw mode
-for the terminal. This is no longer true.
-
@ignore
@c I don't think this is true any longer, now that only readline
@c switches to or from raw mode. In any event, it is a (relatively
a breakpoint.
@end ifset
@ifclear BARETARGET
-a breakpoint or to a signal. (If due to a signal, you may want to use
+a breakpoint or a signal. (If due to a signal, you may want to use
@code{handle}, or use @samp{signal 0} to resume execution.
@xref{Signals, ,Signals}.)
@end ifclear
@table @code
-@item continue @r{[}@var{count}@r{]}
-@itemx c @r{[}@var{count}@r{]}
-@itemx fg @r{[}@var{count}@r{]}
+@item continue @r{[}@var{ignore-count}@r{]}
+@itemx c @r{[}@var{ignore-count}@r{]}
+@itemx fg @r{[}@var{ignore-count}@r{]}
@kindex continue
@kindex c
@kindex fg
-Resume program execution, at the address where your program last
-stopped; any breakpoints set at that address are bypassed. The optional
-argument @var{count} means to set the ignore count of a breakpoint which
-you are stopped at to @var{count} @minus{} 1, just like the @code{ignore}
-command (@pxref{Conditions, ,Break conditions}). This means that the
-program does not stop at that breakpoint until the @var{count}th time
-it is hit.
-
-The argument @var{count} is meaningful only when your program
+Resume program execution, at the address where your program last stopped;
+any breakpoints set at that address are bypassed. The optional argument
+@var{ignore-count} allows you to specify a further number of times to
+ignore a breakpoint at this location; its effect is like that of
+@code{ignore} (@pxref{Conditions, ,Break conditions}).
+
+The argument @var{ignore-count} is meaningful only when your program
stopped due to a breakpoint. At other times, the argument to
@code{continue} is ignored.
@item until
@kindex until
-@item u
+@itemx u
@kindex u
Continue running until a source line past the current line, in the
current stack frame, is reached. This command is used to avoid single
argument.
@item until @var{location}
-@item u @var{location}
+@itemx u @var{location}
Continue running your program until either the specified location is
reached, or the current stack frame returns. @var{location} is any of
the forms of argument acceptable to @code{break} (@pxref{Set Breaks,
they are assigned by @value{GDBN} to give you a way of designating stack
frames in @value{GDBN} commands.
+@c below produces an acceptable overful hbox. --mew 13aug1993
@cindex frameless execution
Some compilers provide a way to compile functions so that they operate
without stack frames. (For example, the @code{@value{GCC}} option
@table @code
@item set print address
-@item set print address on
+@itemx set print address on
@kindex set print address
@value{GDBN} will print memory addresses showing the location of stack
traces, structure values, pointer values, breakpoints, and so forth,
@cindex @code{$}
@cindex @code{$$}
@cindex history number
-The values printed are given @dfn{history numbers} for you to refer to them
-by. These are successive integers starting with one. @code{print} shows you
-the history number assigned to a value by printing @samp{$@var{num} = }
-before the value; here @var{num} is the history number.
+The values printed are given @dfn{history numbers} by which you can
+refer to them. These are successive integers starting with one.
+@code{print} shows you the history number assigned to a value by
+printing @samp{$@var{num} = } before the value; here @var{num} is the
+history number.
To refer to any previous value, use @samp{$} followed by the value's
history number. The way @code{print} labels its output is designed to
would save in @code{$foo} the value contained in the object pointed to by
@code{object_ptr}.
-Using a convenience variable for the first time creates it; but its value
-is @code{void} until you assign a new value. You can alter the value with
-another assignment at any time.
+Using a convenience variable for the first time creates it, but its
+value is @code{void} until you assign a new value. You can alter the
+value with another assignment at any time.
Convenience variables have no fixed types. You can assign a convenience
variable any type of value, including structures and arrays, even if
Output messages when the @value{GDBN} range checker detects a range error,
but attempt to evaluate the expression anyway. Evaluating the
expression may still be impossible for other reasons, such as accessing
-memory that the process does not own (a typical example from many UNIX
+memory that the process does not own (a typical example from many Unix
systems).
@item show range
@item m
represents an identifier that belongs to a set. Generally used in the
same function with the metavariable @var{s}. The type of @var{s} should
-be @code{SET OF @var{mtype}} (where @var{mtype} is the type of @var{m}.
+be @code{SET OF @var{mtype}} (where @var{mtype} is the type of @var{m}).
@item n
represents a variable or constant of integral or floating-point type.
is always stored.
Note the contrast with @samp{print &@var{symbol}}, which does not work
-at all for a register variables, and for a stack local variable prints
+at all for a register variable, and for a stack local variable prints
the exact address of the current instantiation of the variable.
@item whatis @var{exp}
@table @code
@item signal @var{signalnum}
@kindex signal
-Resume execution where your program stopped, but give it immediately the
+Resume execution where your program stopped, but immediately give it the
signal number @var{signalnum}.
Alternatively, if @var{signalnum} is zero, continue execution without
@itemx share @var{regex}
@kindex sharedlibrary
@kindex share
-This is an obsolescent command; you can use it to explicitly
-load shared object library symbols for files matching a UNIX regular
-expression, but as with files loaded automatically, it will only load
-shared libraries required by your program for a core file or after
-typing @code{run}. If @var{regex} is omitted all shared libraries
-required by your program are loaded.
+This is an obsolescent command; you can use it to explicitly load shared
+object library symbols for files matching a Unix regular expression, but
+as with files loaded automatically, it will only load shared libraries
+required by your program for a core file or after typing @code{run}. If
+@var{regex} is omitted all shared libraries required by your program are
+loaded.
@end table
@end ifclear
@item m68k-stub.c
@kindex m68k-stub.c
-@kindex Motorola 680x0
-@kindex 680x0
+@cindex Motorola 680x0
+@cindex 680x0
For Motorola 680x0 architectures.
@item i386-stub.c
@kindex i386-stub.c
-@kindex Intel
-@kindex 386
+@cindex Intel
+@cindex 386
For Intel 386 and compatible architectures.
@end table
@enumerate
@item
Make sure you have the supporting low-level routines
-(@pxref{Bootstrapping}):
+(@pxref{Bootstrapping,,What you must do for the stub}):
@display
@code{getDebugChar}, @code{putDebugChar},
@code{flush_i_cache}, @code{memset}, @code{exceptionHandler}.
@value{GDBN} enables developers to spawn and debug tasks running on networked
VxWorks targets from a Unix host. Already-running tasks spawned from
the VxWorks shell can also be debugged. @value{GDBN} uses code that runs on
-both the UNIX host and on the VxWorks target. The program
-@code{gdb} is installed and executed on the UNIX host. (It may be
+both the Unix host and on the VxWorks target. The program
+@code{gdb} is installed and executed on the Unix host. (It may be
installed with the name @code{vxgdb}, to distinguish it from a
@value{GDBN} for debugging programs on the host itself.)
Once you have included the RDB interface in your VxWorks system image
and set your Unix execution search path to find @value{GDBN}, you are ready
-to run @value{GDBN}. From your UNIX host, run @code{gdb} (or
+to run @value{GDBN}. From your Unix host, run @code{gdb} (or
@code{vxgdb}, depending on your installation).
@value{GDBN} comes up showing the prompt:
@cindex download to VxWorks
If you have connected to the VxWorks target and you want to debug an
object that has not yet been loaded, you can use the @value{GDBN}
-@code{load} command to download a file from UNIX to VxWorks
+@code{load} command to download a file from Unix to VxWorks
incrementally. The object file given as an argument to the @code{load}
command is actually opened twice: first by the VxWorks target in order
to download the code, then by @value{GDBN} in order to read the symbol
@cindex MIPS remote floating point
@cindex floating point, MIPS remote
If your target board does not support the MIPS floating point
-coprocessor, use the command @samp{set mipsfpu off} (you may wish to put
-this in your @value{GDBINIT} file). This will tell @value{GDBN} how to
-find the return value of functions which return floating point values,
-and tell it to call functions on the board without saving the floating
-point registers.
+coprocessor, you should use the command @samp{set mipsfpu off} (you may
+wish to put this in your @value{GDBINIT} file). This tells @value{GDBN}
+how to find the return value of functions which return floating point
+values. It also allows @value{GDBN} to avoid saving the floating point
+registers when calling functions on the board.
@end ifset
@ifset SIMS