@menu
* File Options:: Choosing files
* Mode Options:: Choosing modes
+* Startup:: What @value{GDBN} does during startup
@end menu
@node File Options
@samp{--interpreter=mi} (or @samp{--interpreter=mi2}) causes
@value{GDBN} to use the @dfn{@sc{gdb/mi} interface} (@pxref{GDB/MI, ,
-The @sc{gdb/mi} Interface}) included since @var{GDBN} version 6.0. The
+The @sc{gdb/mi} Interface}) included since @value{GDBN} version 6.0. The
previous @sc{gdb/mi} interface, included in @value{GDBN} version 5.3 and
selected with @samp{--interpreter=mi1}, is deprecated. Earlier
@sc{gdb/mi} interfaces are no longer supported.
@end table
+@node Startup
+@subsection What @value{GDBN} does during startup
+@cindex @value{GDBN} startup
+
+Here's the description of what @value{GDBN} does during session startup:
+
+@enumerate
+@item
+Sets up the command interpreter as specified by the command line
+(@pxref{Mode Options, interpreter}).
+
+@item
+@cindex init file
+Reads the @dfn{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.} and executes all the commands in
+that file.
+
+@item
+Processes command line options and operands.
+
+@item
+Reads and executes the commands from init file (if any) in the current
+working directory. This is only done if (1) there's an init file in
+your home directory, and (2) if the current directory is different
+from your home directory. Thus, you can have more than one init file,
+one generic in your home directory, and another, specific to the
+program you are debugging, in the directory where you invoke
+@value{GDBN}.
+
+@item
+Reads command files specified by the @samp{-x} option. @xref{Command
+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
+files where @value{GDBN} records it.
+@end enumerate
+
+Init files use the same syntax as @dfn{command files} (@pxref{Command
+Files}) and are processed by @value{GDBN} in the same way. 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
+@cindex @file{.gdbinit}
+@cindex @file{gdb.ini}
+The @value{GDBN} init files are normally called @file{.gdbinit}@footnote{
+The DJGPP port of @value{GDBN} uses the name
+@file{gdb.ini} instead, due to the limitations of file names imposed
+by DOS filesystems.}.
+On some configurations of @value{GDBN}, the init file is known by a
+different name (these are typically environments where a specialized
+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:
+
+@cindex @file{.vxgdbinit}
+@itemize @bullet
+@item
+VxWorks (Wind River Systems real-time OS): @file{.vxgdbinit}
+
+@cindex @file{.os68gdbinit}
+@item
+OS68K (Enea Data Systems real-time OS): @file{.os68gdbinit}
+
+@cindex @file{.esgdbinit}
+@item
+ES-1800 (Ericsson Telecom AB M68000 emulator): @file{.esgdbinit}
+
+@item
+CISCO 68k: @file{.cisco-gdbinit}
+@end itemize
+
+
@node Quitting GDB
@section Quitting @value{GDBN}
@cindex exiting @value{GDBN}
repeat the previous command. Certain commands (for example, @code{run})
will not repeat this way; these are commands whose unintentional
repetition might cause trouble and which you are unlikely to want to
-repeat.
+repeat. User-defined commands can disable this feature; see
+@ref{Define, dont-repeat}.
The @code{list} and @code{x} commands, when you repeat them with
@key{RET}, construct new arguments rather than repeating
To request debugging information, specify the @samp{-g} option when you run
the compiler.
-Most compilers do not include information about preprocessor macros in
-the debugging information if you specify the @option{-g} flag alone,
-because this information is rather large. Version 3.1 of @value{NGCC},
-the @sc{gnu} C compiler, provides macro information if you specify the
-options @option{-gdwarf-2} and @option{-g3}; the former option requests
-debugging information in the Dwarf 2 format, and the latter requests
-``extra information''. In the future, we hope to find more compact ways
-to represent macro information, so that it can be included with
-@option{-g} alone.
-
-Many C compilers are unable to handle the @samp{-g} and @samp{-O}
-options together. Using those compilers, you cannot generate optimized
+Programs that are to be shipped to your customers are compiled with
+optimizations, using the @samp{-O} compiler option. However, many
+compilers are unable to handle the @samp{-g} and @samp{-O} options
+together. Using those compilers, you cannot generate optimized
executables containing debugging information.
-@value{NGCC}, the @sc{gnu} C compiler, supports @samp{-g} with or
+@value{NGCC}, the @sc{gnu} C/C@t{++} compiler, supports @samp{-g} with or
without @samp{-O}, making it possible to debug optimized code. We
recommend that you @emph{always} use @samp{-g} whenever you compile a
program. You may think your program is correct, but there is no sense
@w{@samp{-gg}} for debugging information. @value{GDBN} no longer supports this
format; if your @sc{gnu} C compiler has this option, do not use it.
+@value{GDBN} knows about preprocessor macros and can show you their
+expansion (@pxref{Macros}). Most compilers do not include information
+about preprocessor macros in the debugging information if you specify
+the @option{-g} flag alone, because this information is rather large.
+Version 3.1 and later of @value{NGCC}, the @sc{gnu} C compiler,
+provides macro information if you specify the options
+@option{-gdwarf-2} and @option{-g3}; the former option requests
+debugging information in the Dwarf 2 format, and the latter requests
+``extra information''. In the future, we hope to find more compact
+ways to represent macro information, so that it can be included with
+@option{-g} alone.
+
@need 2000
@node Starting
@section Starting your program
@table @code
@kindex cd
+@cindex change working directory
@item cd @var{directory}
Set the @value{GDBN} working directory to @var{directory}.
from /usr/lib/libc.2
@end smallexample
+On Solaris, you can display more information about user threads with a
+Solaris-specific command:
+
+@table @code
+@item maint info sol-threads
+@kindex maint info sol-threads
+@cindex thread info (Solaris)
+Display info on Solaris user threads.
+@end table
+
@table @code
@kindex thread @var{threadno}
@item thread @var{threadno}
program stops there. @xref{Disabling, ,Disabling breakpoints}.
@kindex hbreak
+@cindex hardware breakpoints
@item hbreak @var{args}
Set a hardware-assisted breakpoint. @var{args} are the same as for the
@code{break} command and the breakpoint is set in the same way, but the
@kindex rbreak
@cindex regular expression
+@cindex breakpoints in functions matching a regexp
+@cindex set breakpoints in many functions
@item rbreak @var{regex}
Set breakpoints on all functions matching the regular expression
@var{regex}. This command sets an unconditional breakpoint on all
@item backtrace -@var{n}
@itemx bt -@var{n}
Similar, but print only the outermost @var{n} frames.
+
+@item backtrace full
+Print the values of the local variables also.
+@itemx bt full
@end table
@kindex where
value, indicating that your program has stopped at the beginning of the
code for line @code{993} of @code{builtin.c}.
+@cindex value optimized out, in backtrace
+@cindex function call arguments, optimized out
+If your program was compiled with optimizations, some compilers will
+optimize away arguments passed to functions if those arguments are
+never used after the call. Such optimizations generate code that
+passes arguments through registers, but doesn't store those arguments
+in the stack frame. @value{GDBN} has no way of displaying such
+arguments in stack frames other than the innermost one. Here's what
+such a backtrace might look like:
+
+@smallexample
+@group
+#0 m4_traceon (obs=0x24eb0, argc=1, argv=0x2b8c8)
+ at builtin.c:993
+#1 0x6e38 in expand_macro (sym=<value optimized out>) at macro.c:242
+#2 0x6840 in expand_token (obs=0x0, t=<value optimized out>, td=0xf7fffb08)
+ at macro.c:71
+(More stack frames follow...)
+@end group
+@end smallexample
+
+@noindent
+The values of arguments that were not saved in their stack frames are
+shown as @samp{<value optimized out>}.
+
+If you need to display the values of such optimized-out arguments,
+either deduce that from other variables whose values depend on the one
+you are interested in, or recompile without optimizations.
+
@cindex backtrace beyond @code{main} function
@cindex program entry point
@cindex startup code, and backtrace
* Registers:: Registers
* Floating Point Hardware:: Floating point hardware
* Vector Unit:: Vector Unit
-* Auxiliary Vector:: Auxiliary data provided by operating system
+* OS Information:: Auxiliary data provided by operating system
* Memory Region Attributes:: Memory region attributes
* Dump/Restore Files:: Copy between memory and a file
* Core File Generation:: Cause a program dump its core
layout vary depending on the hardware.
@end table
-@node Auxiliary Vector
-@section Operating system auxiliary vector
+@node OS Information
+@section Operating system auxiliary information
+@cindex OS information
+
+@value{GDBN} provides interfaces to useful OS facilities that can help
+you debug your program.
+
+@cindex @code{ptrace} system call
+@cindex @code{struct user} contents
+When @value{GDBN} runs on a @dfn{Posix system} (such as GNU or Unix
+machines), it interfaces with the inferior via the @code{ptrace}
+system call. The operating system creates a special sata structure,
+called @code{struct user}, for this interface. You can use the
+command @code{info udot} to display the contents of this data
+structure.
+
+@table @code
+@item info udot
+@kindex info udot
+Display the contents of the @code{struct user} maintained by the OS
+kernel for the program being debugged. @value{GDBN} displays the
+contents of @code{struct user} as a list of hex numbers, similar to
+the @code{examine} command.
+@end table
+
@cindex auxiliary vector
@cindex vector, auxiliary
-
Some operating systems supply an @dfn{auxiliary vector} to programs at
startup. This is akin to the arguments and environment that you
specify for a program, but contains a system-dependent variety of
an unrecognized tag.
@end table
+
@node Memory Region Attributes
@section Memory region attributes
@cindex memory region attributes
@cindex Objective-C
This section provides information about some commands and command
-options that are useful for debugging Objective-C code.
+options that are useful for debugging Objective-C code. See also
+@ref{Symbols, info classes}, and @ref{Symbols, info selectors}, for a
+few more commands specific to Objective-C support.
@menu
* Method Names in Commands::
@node The Print Command with Objective-C
@subsubsection The Print Command With Objective-C
+@cindex Objective-C, print objects
@kindex print-object
@kindex po @r{(@code{print-object})}
@var{regexp}.
@kindex info classes
+@cindex Objective-C, classes and selectors
@item info classes
@itemx info classes @var{regexp}
Display all Objective-C classes in your program, or
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
+@item add-symbol-file-from-memory @var{address}
+Load symbols from the given @var{address} in a dynamically loaded
+object file whose image is mapped directly into the inferior's memory.
+For example, the Linux kernel maps a @code{syscall DSO} into each
+process's address space; this DSO provides kernel-specific code for
+some system calls. The argument can be any expression whose
+evaluation yields the address of the file's shared object file header.
+For this command to work, you must have used @code{symbol-file} or
+@code{exec-file} commands in advance.
+
@kindex add-shared-symbol-files
@kindex assf
@item add-shared-symbol-files @var{library-file}
Display the current autoloading mode.
@end table
+@cindex load shared library
To explicitly load shared library symbols, use the @code{sharedlibrary}
command:
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
-
-On some systems, such as HP-UX systems, @value{GDBN} supports
-autoloading shared library symbols until a limiting threshold size is
-reached. This provides the benefit of allowing autoloading to remain on
-by default, but avoids autoloading excessively large shared libraries,
-up to a threshold that is initially set, but which you can modify if you
-wish.
-Beyond that threshold, symbols from shared libraries must be explicitly
-loaded. To load these symbols, use the command @code{sharedlibrary
-@var{filename}}. The base address of the shared library is determined
-automatically by @value{GDBN} and need not be specified.
+@item nosharedlibrary
+@kindex nosharedlibrary
+@cindex unload symbols from shared libraries
+Unload all shared object library symbols. This discards all symbols
+that have been loaded from all shared libraries. Symbols from shared
+libraries that were loaded by explicit user requests are not
+discarded.
+@end table
-To display or set the threshold, use the commands:
+Sometimes you may wish that @value{GDBN} stops and gives you control
+when any of shared library events happen. Use the @code{set
+stop-on-solib-events} command for this:
@table @code
-@kindex set auto-solib-limit
-@item set auto-solib-limit @var{threshold}
-Set the autoloading size threshold, in an integral number of megabytes.
-If @var{threshold} is nonzero and shared library autoloading is enabled,
-symbols from all shared object libraries will be loaded until the total
-size of the loaded shared library symbols exceeds this threshold.
-Otherwise, symbols must be loaded manually, using the
-@code{sharedlibrary} command. The default threshold is 100 (i.e.@: 100
-Mb).
+@item set stop-on-solib-events
+@kindex set stop-on-solib-events
+This command controls whether @value{GDBN} should give you control
+when the dynamic linker notifies it about some shared library event.
+The most common event of interest is loading or unloading of a new
+shared library.
-@kindex show auto-solib-limit
-@item show auto-solib-limit
-Display the current autoloading size threshold, in megabytes.
+@item show stop-on-solib-events
+@kindex show stop-on-solib-events
+Show whether @value{GDBN} stops and gives you control when shared
+library events happen.
@end table
Shared libraries are also supported in many cross or remote debugging
Different targets are available on different configurations of @value{GDBN};
your configuration may have more or fewer targets.
-Many remote targets require you to download the executable's code
-once you've successfully established a connection. You may wish to
-control the size of the data chunks used by @value{GDBN} to download
-program parts to the remote target.
+Many remote targets require you to download the executable's code once
+you've successfully established a connection. You may wish to control
+various aspects of this process, such as the size of the data chunks
+used by @value{GDBN} to download program parts to the remote target.
@table @code
@kindex set download-write-size
@kindex show download-write-size
@item show download-write-size
+@kindex show download-write-size
Show the current value of the write size.
+
+@item set hash
+@kindex set hash@r{, for remote monitors}
+@cindex hash mark while downloading
+This command controls whether a hash mark @samp{#} is displayed while
+downloading a file to the remote monitor. If on, a hash mark is
+displayed after each S-record is successfully downloaded to the
+monitor.
+
+@item show hash
+@kindex show hash@r{, for remote monitors}
+Show the current status of displaying the hash mark.
+
+@item set debug monitor
+@kindex set debug monitor
+@cindex display remote monitor communications
+Enable or disable display of communications messages between
+@value{GDBN} and the remote monitor.
+
+@item show debug monitor
+@kindex show debug monitor
+Show the current status of displaying communications between
+@value{GDBN} and the remote monitor.
@end table
@table @code
Other remote targets may be available in your
configuration of @value{GDBN}; use @code{help target} to list them.
+Once you've connected to the remote target, @value{GDBN} allows you to
+send arbitrary commands to the remote monitor:
+
+@table @code
+@item remote @var{command}
+@kindex remote@r{, a command}
+@cindex send command to remote monitor
+Send an arbitrary @var{command} string to the remote monitor.
+@end table
+
+
@node KOD
@section Kernel Object Display
@cindex kernel object display
@cindex @code{auxv}, and remote targets
Set the use of the remote protocol's @samp{qPart:auxv:read} (target
auxiliary vector read) request. This request is used to fetch the
-remote target's @dfn{auxiliary vector}, see @ref{Auxiliary Vector}.
-The default setting depends on the remote stub's support of this
-request (@value{GDBN} queries the stub when this request is first
-required). @xref{General Query Packets, qPart}, for more information
-about this request.
+remote target's @dfn{auxiliary vector}, see @ref{OS Information,
+Auxiliary Vector}. The default setting depends on the remote stub's
+support of this request (@value{GDBN} queries the stub when this
+request is first required). @xref{General Query Packets, qPart}, for
+more information about this request.
@item show remote read-aux-vector-packet
Show the current setting of use of the @samp{qPart:auxv:read} request.
@itemx show remote access-watchpoint-packet
@itemx show remote Z-packet
Show the current setting of @samp{Z} packets usage.
+
+@item set remote get-thread-local-storage-address
+@kindex set remote get-thread-local-storage-address
+@cindex thread local storage of remote targets
+This command enables or disables the use of the @samp{qGetTLSAddr}
+(Get Thread Local Storage Address) request packet. The default
+depends on whether the remote stub supports this request.
+@xref{General Query Packets, qGetTLSAddr}, for more details about this
+packet.
+
+@item show remote get-thread-local-storage-address
+@kindex show remote get-thread-local-storage-address
+Show the current setting of @samp{qGetTLSAddr} packet usage.
@end table
@node remote stub
@table @code
@kindex kvm
@item kvm pcb
-Set current context from pcb address.
+Set current context from the @dfn{Process Control Block} (PCB) address.
@item kvm proc
Set current context from proc address. This command isn't available on
how many threads are there in the process; its virtual memory usage;
the signals that are pending, blocked, and ignored; its TTY; its
consumption of system and user time; its stack size; its @samp{nice}
-value; etc. For more information, see the @samp{proc(5)} man page
+value; etc. For more information, see the @samp{proc} man page
(type @kbd{man 5 proc} from your shell prompt).
@item info proc all
Report on the process IDs related to your program: its own process ID,
the ID of its parent, the process group ID, and the session ID.
@end ignore
+
+@item set procfs-trace
+@kindex set procfs-trace
+@cindex @code{procfs} API calls
+This command enables and disables tracing of @code{procfs} API calls.
+
+@item show procfs-trace
+@kindex show procfs-trace
+Show the current state of @code{procfs} API call tracing.
+
+@item set procfs-file @var{file}
+@kindex set procfs-file
+Tell @value{GDBN} to write @code{procfs} API trace to the named
+@var{file}. @value{GDBN} appends the trace info to the previous
+contents of the file. The default is to display the trace on the
+standard output.
+
+@item show procfs-file
+@kindex show procfs-file
+Show the file to which @code{procfs} API trace is written.
+
+@item proc-trace-entry
+@itemx proc-trace-exit
+@itemx proc-untrace-entry
+@itemx proc-untrace-exit
+@kindex proc-trace-entry
+@kindex proc-trace-exit
+@kindex proc-untrace-entry
+@kindex proc-untrace-exit
+These commands enable and disable tracing of entries into and exits
+from the @code{syscall} interface.
+
+@item info pidlist
+@kindex info pidlist
+@cindex process list, QNX Neutrino
+For QNX Neutrino only, this command displays the list of all the
+processes and all the threads within each process.
+
+@item info meminfo
+@kindex info meminfo
+@cindex mapinfo list, QNX Neutrino
+For QNX Neutrino only, this command displays the list of all mapinfos.
@end table
@node DJGPP Native
@cindex native @sc{djgpp} debugging
@cindex MS-DOS-specific commands
-@sc{djgpp} is the port of @sc{gnu} development tools to MS-DOS and
+@cindex DPMI
+@sc{djgpp} is a port of the @sc{gnu} development tools to MS-DOS and
MS-Windows. @sc{djgpp} programs are 32-bit protected-mode programs
that use the @dfn{DPMI} (DOS Protected-Mode Interface) API to run on
top of real-mode DOS systems and their emulations.
@cindex physical address from linear address
@item info dos address-pte @var{addr}
This command displays the Page Table entry for a specified linear
-address. The argument linear address @var{addr} should already have the
-appropriate segment's base address added to it, because this command
-accepts addresses which may belong to @emph{any} segment. For
-example, here's how to display the Page Table entry for the page where
-the variable @code{i} is stored:
+address. The argument @var{addr} is a linear address which should
+already have the appropriate segment's base address added to it,
+because this command accepts addresses which may belong to @emph{any}
+segment. For example, here's how to display the Page Table entry for
+the page where a variable @code{i} is stored:
@smallexample
@exdent @code{(@value{GDBP}) info dos address-pte __djgpp_base_address + (char *)&i}
@noindent
This says that @code{i} is stored at offset @code{0xd30} from the page
-whose physical base address is @code{0x02698000}, and prints all the
+whose physical base address is @code{0x02698000}, and shows all the
attributes of that page.
Note that you must cast the addresses of variables to a @code{char *},
@noindent
(The @code{+ 3} offset is because the transfer buffer's address is the
-3rd member of the @code{_go32_info_block} structure.) The output of
-this command clearly shows that addresses in conventional memory are
-mapped 1:1, i.e.@: the physical and linear addresses are identical.
+3rd member of the @code{_go32_info_block} structure.) The output
+clearly shows that this DPMI server maps the addresses in conventional
+memory 1:1, i.e.@: the physical (@code{0x00029000} + @code{0x110}) and
+linear (@code{0x29110}) addresses are identical.
This command is supported only with some DPMI servers.
@end table
+@cindex DOS serial data link, remote debugging
In addition to native debugging, the DJGPP port supports remote
debugging via a serial data link. The following commands are specific
to remote serial debugging in the DJGPP port of @value{GDBN}.
The related commands @samp{show com1base}, @samp{show com1irq} etc.@:
display the current settings of the base address and the @code{IRQ}
lines used by the COM ports.
+
+@item info serial
+@kindex info serial
+@cindex DOS serial port status
+This command prints the status of the 4 DOS serial ports. For each
+port, it prints whether it's active or not, its I/O base address and
+IRQ number, whether it uses a 16550-style FIFO, its baudrate, and the
+counts of various errors encountered so far.
@end table
This section goes into details specific to particular embedded
configurations.
+@cindex send command to simulator
+Whenever a specific embedded processor has a simulator, @value{GDBN}
+allows to send an arbitrary command to the simulator.
+
+@table @code
+@item sim @var{command}
+@kindex sim@r{, a command}
+Send an arbitrary @var{command} string to the simulator. Consult the
+documentation for the specific simulator in use for information about
+acceptable commands.
+@end table
+
@menu
-* ARM:: ARM
+* ARM:: ARM RDI
* H8/300:: Renesas H8/300
* H8/500:: Renesas H8/500
* M32R/D:: Renesas M32R/D
* AVR:: Atmel AVR
* CRIS:: CRIS
* Super-H:: Renesas Super-H
+* WinCE:: Windows CE child processes
@end menu
@node ARM
@subsection ARM
+@cindex ARM RDI
@table @code
-
@kindex target rdi
@item target rdi @var{dev}
ARM Angel monitor, via RDI library interface to ADP protocol. You may
Show whether ARM-specific debugging messages are enabled.
@end table
+The following commands are available when an ARM target is debugged
+using the RDI interface:
+
+@table @code
+@item rdilogfile @r{[}@var{file}@r{]}
+@kindex rdilogfile
+@cindex ADP (Angel Debugger Protocol) logging
+Set the filename for the ADP (Angel Debugger Protocol) packet log.
+With an argument, sets the log file to the specified @var{file}. With
+no argument, show the current log file name. The default log file is
+@file{rdi.log}.
+
+@item rdilogenable @r{[}@var{arg}@r{]}
+@kindex rdilogenable
+Control logging of ADP packets. With an argument of 1 or @code{"yes"}
+enables logging, with an argument 0 or @code{"no"} disables it. With
+no arguments displays the current setting. When logging is enabled,
+ADP packets exchanged between @value{GDBN} and the RDI target device
+are logged to a file.
+
+@item set rdiromatzero
+@kindex set rdiromatzero
+@cindex ROM at zero address, RDI
+Tell @value{GDBN} whether the target has ROM at address 0. If on,
+vector catching is disabled, so that zero address can be used. If off
+(the default), vector catching is enabled. For this command to take
+effect, it needs to be invoked prior to the @code{target rdi} command.
+
+@item show rdiromatzero
+@kindex show rdiromatzero
+Show the current setting of ROM at zero address.
+
+@item set rdiheartbeat
+@kindex set rdiheartbeat
+@cindex RDI heartbeat
+Enable or disable RDI heartbeat packets. It is not recommended to
+turn on this option, since it confuses ARM and EPI JTAG interface, as
+well as the Angel monitor.
+
+@item show rdiheartbeat
+@kindex show rdiheartbeat
+Show the setting of RDI heartbeat packets.
+@end table
+
@node H8/300
@subsection Renesas H8/300
specify its hostname; @value{GDBN} uses @code{telnet} to connect.
@end table
+The following special commands are available when debugging with the
+Renesas E7000 ICE:
+
+@table @code
+@item e7000 @var{command}
+@kindex e7000
+@cindex send command to E7000 monitor
+This sends the specified @var{command} to the E7000 monitor.
+
+@item ftplogin @var{machine} @var{username} @var{password} @var{dir}
+@kindex ftplogin@r{, E7000}
+This command records information for subsequent interface with the
+E7000 monitor via the FTP protocol: @value{GDBN} will log into the
+named @var{machine} using specified @var{username} and @var{password},
+and then chdir to the named directory @var{dir}.
+
+@item ftpload @var{file}
+@kindex ftpload@r{, E7000}
+This command uses credentials recorded by @code{ftplogin} to fetch and
+load the named @var{file} from the E7000 monitor.
+
+@item drain
+@kindex drain@r{, E7000}
+This command drains any pending text buffers stored on the E7000.
+
+@item set usehardbreakpoints
+@itemx show usehardbreakpoints
+@kindex set usehardbreakpoints@r{, E7000}
+@kindex show usehardbreakpoints@r{, E7000}
+@cindex hardware breakpoints, and E7000
+These commands set and show the use of hardware breakpoints for all
+breakpoints. @xref{Set Breaks, hardware-assisted breakpoint}, for
+more information about using hardware breakpoints selectively.
+@end table
+
@node Renesas Special
@subsubsection Special @value{GDBN} commands for Renesas micros
@end table
@node M32R/D
-@subsection Renesas M32R/D
+@subsection Renesas M32R/D and M32R/SDI
@table @code
-
@kindex target m32r
@item target m32r @var{dev}
Renesas M32R/D ROM monitor.
@kindex target m32rsdi
@item target m32rsdi @var{dev}
Renesas M32R SDI server, connected via parallel port to the board.
+@end table
+
+The following @value{GDBN} commands are specific to the M32R monitor:
+@table @code
+@item set download-path @var{path}
+@kindex set download-path
+@cindex find downloadable @sc{srec} files (M32R)
+Set the default path for finding donwloadable @sc{srec} files.
+
+@item show download-path
+@kindex show download-path
+Show the default path for downloadable @sc{srec} files.
+
+@item set board-address @var{addr}
+@kindex set board-address
+@cindex M32-EVA target board address
+Set the IP address for the M32R-EVA target board.
+
+@item show board-address
+@kindex show board-address
+Show the current IP address of the target board.
+
+@item set server-address @var{addr}
+@kindex set server-address
+@cindex download server address (M32R)
+Set the IP address for the download server, which is the @value{GDBN}'s
+host machine.
+
+@item show server-address
+@kindex show server-address
+Display the IP address of the download server.
+
+@item upload @r{[}@var{file}@r{]}
+@kindex upload@r{, M32R}
+Upload the specified @sc{srec} @var{file} via the monitor's Ethernet
+upload capability. If no @var{file} argument is given, the current
+executable file is uploaded.
+
+@item tload @r{[}@var{file}@r{]}
+@kindex tload@r{, M32R}
+Test the @code{upload} command.
+@end table
+
+The following commands are available for M32R/SDI:
+
+@table @code
+@item sdireset
+@kindex sdireset
+@cindex reset SDI connection, M32R
+This command resets the SDI connection.
+
+@item sdistatus
+@kindex sdistatus
+This command shows the SDI connection status.
+
+@item debug_chaos
+@kindex debug_chaos
+@cindex M32R/Chaos debugging
+Instructs the remote that M32R/Chaos debugging is to be used.
+
+@item use_debug_dma
+@kindex use_debug_dma
+Instructs the remote to use the DEBUG_DMA method of accessing memory.
+
+@item use_mon_code
+@kindex use_mon_code
+Instructs the remote to use the MON_CODE method of accessing memory.
+
+@item use_ib_break
+@kindex use_ib_break
+Instructs the remote to set breakpoints by IB break.
+
+@item use_dbt_break
+@kindex use_dbt_break
+Instructs the remote to set breakpoints by DBT.
@end table
@node M68K
is waiting for your program to stop. In that case, @value{GDBN} waits
forever because it has no way of knowing how long the program is going
to run before stopping.
+
+@item set syn-garbage-limit @var{num}
+@kindex set syn-garbage-limit@r{, MIPS remote}
+@cindex synchronize with remote MIPS target
+Limit the maximum number of characters @value{GDBN} should ignore when
+it tries to synchronize with the remote target. The default is 10
+characters. Setting the limit to -1 means there's no limit.
+
+@item show syn-garbage-limit
+@kindex show syn-garbage-limit@r{, MIPS remote}
+Show the current limit on the number of characters to ignore when
+trying to synchronize with the remote system.
+
+@item set monitor-prompt @var{prompt}
+@kindex set monitor-prompt@r{, MIPS remote}
+@cindex remote monitor prompt
+Tell @value{GDBN} to expect the specified @var{prompt} string from the
+remote monitor. The default depends on the target:
+@table @asis
+@item pmon target
+@samp{PMON}
+@item ddb target
+@samp{NEC010}
+@item lsi target
+@samp{PMON>}
+@end table
+
+@item show monitor-prompt
+@kindex show monitor-prompt@r{, MIPS remote}
+Show the current strings @value{GDBN} expects as the prompt from the
+remote monitor.
+
+@item set monitor-warnings
+@kindex set monitor-warnings@r{, MIPS remote}
+Enable or disable monitor warnings about hardware breakpoints. This
+has effect only for the @code{lsi} target. When on, @value{GDBN} will
+display warning messages whose codes are returned by the @code{lsi}
+PMON monitor for breakpoint commands.
+
+@item show monitor-warnings
+@kindex show monitor-warnings@r{, MIPS remote}
+Show the current setting of printing monitor warnings.
+
+@item pmon @var{command}
+@kindex pmon@r{, MIPS remote}
+@cindex send PMON command
+This command allows sending an arbitrary @var{command} string to the
+monitor. The monitor must be in debug mode for this to work.
@end table
@node OpenRISC 1000
@subsection PowerPC
@table @code
-
@kindex target dink32
@item target dink32 @var{dev}
DINK32 ROM monitor.
@kindex target sds
@item target sds @var{dev}
SDS monitor, running on a PowerPC board (such as Motorola's ADS).
+@end table
+
+@cindex SDS protocol
+The following commands specifi to the SDS protocol are supported
+by@value{GDBN}:
+
+@table @code
+@item set sdstimeout @var{nsec}
+@kindex set sdstimeout
+Set the timeout for SDS protocol reads to be @var{nsec} seconds. The
+default is 2 seconds.
+@item show sdstimeout
+@kindex show sdstimeout
+Show the current value of the SDS timeout.
+
+@item sds @var{command}
+@kindex sds@r{, a command}
+Send the specified @var{command} string to the SDS monitor.
@end table
+
@node PA
@subsection HP PA Embedded
Show the values of all Super-H registers.
@end table
+@node WinCE
+@subsection Windows CE
+@cindex Windows CE
+
+The following commands are available for Windows CE:
+
+@table @code
+@item set remotedirectory @var{dir}
+@kindex set remotedirectory
+Tell @value{GDBN} to upload files from the named directory @var{dir}.
+The default is @file{/gdb}, i.e.@: the root directory on the current
+drive.
+
+@item show remotedirectory
+@kindex show remotedirectory
+Show the current value of the upload directory.
+
+@item set remoteupload @var{method}
+@kindex set remoteupload
+Set the method used to upload files to remote device. Valid values
+for @var{method} are @samp{always}, @samp{newer}, and @samp{never}.
+The default is @samp{newer}.
+
+@item show remoteupload
+@kindex show remoteupload
+Show the current setting of the upload method.
+
+@item set remoteaddhost
+@kindex set remoteaddhost
+Tell @value{GDBN} whether to add this host to the remote stub's
+arguments when you debug over a network.
+
+@item show remoteaddhost
+@kindex show remoteaddhost
+Show whether to add this host to remote stub's arguments when
+debugging over a network.
+@end table
+
@node Architectures
@section Architectures
@cindex history size
@kindex set history size
+@cindex @env{HISTSIZE}, environment variable
@item set history size @var{size}
Set the number of commands which @value{GDBN} keeps in its history list.
This defaults to the value of the environment variable
@kindex show debug
@item show debug arch
Displays the current state of displaying gdbarch debugging info.
+@item set debug aix-thread
+@cindex AIX threads
+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 event
@cindex event debugging info
Turns on or off display of @value{GDBN} event debugging info. The
info.
@item set debug expression
@cindex expression debugging info
-Turns on or off display of @value{GDBN} expression debugging info. The
-default is off.
+Turns on or off display of debugging info about @value{GDBN}
+expression parsing. The default is off.
@item show debug expression
-Displays the current state of displaying @value{GDBN} expression
-debugging info.
+Displays the current state of displaying debugging info about
+@value{GDBN} expression parsing.
@item set debug frame
@cindex frame debugging info
Turns on or off display of @value{GDBN} frame debugging info. The
@item set debug lin-lwp
@cindex @sc{gnu}/Linux LWP debug messages
@cindex Linux lightweight processes
-Turns on or off debugging messages from the LWP debug support.
+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 observer
@item show debug serial
Displays the current state of displaying @value{GDBN} serial debugging
info.
+@item set debug solib-frv
+@cindex FR-V shared-library debugging
+Turns on or off debugging messages for FR-V shared-library code.
+@item show debug solib-frv
+Display the current state of FR-V shared-library code debugging
+messages.
@item set debug target
@cindex target debugging info
Turns on or off display of @value{GDBN} target debugging info. This info
@item show debug target
Displays the current state of displaying @value{GDBN} target debugging
info.
-@item set debug varobj
+@item set debugvarobj
@cindex variable object debugging info
Turns on or off display of @value{GDBN} variable object debugging
info. The default is off.
-@item show debug varobj
+@item show debugvarobj
Displays the current state of displaying @value{GDBN} variable object
debugging info.
@end table
documentation of a command. Redefining the command with @code{define}
does not change the documentation.
+@kindex dont-repeat
+@cindex don't repeat command
+@item dont-repeat
+Used inside a user-defined command, this tells @value{GDBN} that this
+command should not be repeated when the user hits @key{RET}
+(@pxref{Command Syntax, repeat last command}).
+
@kindex help user-defined
@item help user-defined
List all user-defined commands, with the first line of the documentation
@section Command files
@cindex command files
-A command file for @value{GDBN} is a file of lines that are @value{GDBN}
-commands. Comments (lines starting with @kbd{#}) may also be included.
-An empty line in a command file does nothing; it does not mean to repeat
-the last command, as it would from the terminal.
-
-@cindex init file
-@cindex @file{.gdbinit}
-@cindex @file{gdb.ini}
-When you start @value{GDBN}, it automatically executes commands from its
-@dfn{init files}, normally called @file{.gdbinit}@footnote{The DJGPP
-port of @value{GDBN} uses the name @file{gdb.ini} instead, due to the
-limitations of file names imposed by DOS filesystems.}.
-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
-different name (these are typically environments where a specialized
-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:
-
-@cindex @file{.vxgdbinit}
-@itemize @bullet
-@item
-VxWorks (Wind River Systems real-time OS): @file{.vxgdbinit}
-
-@cindex @file{.os68gdbinit}
-@item
-OS68K (Enea Data Systems real-time OS): @file{.os68gdbinit}
-
-@cindex @file{.esgdbinit}
-@item
-ES-1800 (Ericsson Telecom AB M68000 emulator): @file{.esgdbinit}
-@end itemize
+A command file for @value{GDBN} is a text file made of lines that are
+@value{GDBN} commands. Comments (lines starting with @kbd{#}) may
+also be included. An empty line in a command file does nothing; it
+does not mean to repeat the last command, as it would from the
+terminal.
-You can also request the execution of a command file with the
-@code{source} command:
+You can request the execution of a command file with the @code{source}
+command:
@table @code
@kindex source
@value{GDBN} also accepts command input from standard input. In this
mode, normal output goes to standard output and error output goes to
standard error. Errors in a command file supplied on standard input do
-not terminate execution of the command file --- execution continues with
+not terminate execution of the command file---execution continues with
the next command.
@smallexample
lines. Positive counts increase the height, while negative counts
decrease it.
+@item tabset
+@kindex tabset @var{nchars}
+Set the width of tab stops to be @var{nchars} characters.
+
@end table
@node TUI Configuration
@unnumberedsec Function and Purpose
@cindex @sc{gdb/mi}, its purpose
-@sc{gdb/mi} is a line based machine oriented text interface to @value{GDBN}. It is
-specifically intended to support the development of systems which use
-the debugger as just one small component of a larger system.
+@sc{gdb/mi} is a line based machine oriented text interface to
+@value{GDBN} and is activated by specifying using the
+@option{--interpreter} command line option (@pxref{Mode Options}). It
+is specifically intended to support the development of systems which
+use the debugger as just one small component of a larger system.
This chapter is a specification of the @sc{gdb/mi} interface. It is written
in the form of a reference manual.
@kindex maint dump-me
@item maint dump-me
+@cindex @code{SIGQUIT} signal, dump core of @value{GDBN}
Cause a fatal signal in the debugger and force it to dump its core.
+This is supported only on systems which support aborting a program
+with the @code{SIGQUIT} signal.
@kindex maint internal-error
@kindex maint internal-warning
@kindex maint print dummy-frames
@item maint print dummy-frames
-
Prints the contents of @value{GDBN}'s internal dummy-frame stack.
@smallexample
@table @asis
@item @code{qPart}:@code{auxv}:@code{read}::@var{offset},@var{length}
-Access the target's @dfn{auxiliary vector}. @xref{Auxiliary Vector},
-and see @ref{Remote configuration, read-aux-vector-packet}.
-Note @var{annex} must be empty.
+Access the target's @dfn{auxiliary vector}. @xref{OS Information,
+auxiliary vector}, and see @ref{Remote configuration,
+read-aux-vector-packet}. Note @var{annex} must be empty.
@end table
Reply:
An empty reply indicates that @code{qGetTLSAddr} is not supported by the stub.
@end table
+Use of this request packet is controlled by the @code{set remote
+get-thread-local-storage-address} command (@pxref{Remote
+configuration, set remote get-thread-local-storage-address}).
+
@end table
@node Register Packet Format
is stopped on users request.
@node The isatty call
-@subsection The isatty(3) call
+@subsection The @samp{isatty} function call
@cindex isatty call, file-i/o protocol
A special case in this protocol is the library call @code{isatty} which
needed.
@node The system call
-@subsection The system(3) call
+@subsection The @samp{system} function call
@cindex system call, file-i/o protocol
The other special case in this protocol is the @code{system} call which