README for gdb-6.3 release
- Updated 8, November, 2004 by Andrew Cagney
+ Updated 20, November, 2006
This is GDB, the GNU source-level debugger.
GDB requires an ISO C (ANSI C) compiler. If you do not have an ISO
C compiler for your system, you may be able to download and install
the GNU CC compiler. It is available via anonymous FTP from the
-directory `ftp://ftp.gnu.org/pub/gnu/gcc'.
+directory `ftp://ftp.gnu.org/pub/gnu/gcc'. GDB also requires an ISO
+C standard library. The GDB remote server, gdbserver, builds with some
+non-ISO standard libraries - e.g. for Windows CE.
+
+ GDB uses Expat, an XML parsing library, to implement some target-specific
+features. Expat will be linked in if it is available at build time, or
+those features will be disabled. The latest version of Expat should be
+available from `http://expat.sourceforge.net'.
GDB can be used as a cross-debugger, running on a machine of one
type while debugging a program running on a machine of another type.
directories under the working directory in parallel to the source
directories below PATH.
+`--host=HOST'
+ Configure GDB to run on the specified HOST.
+
+ There is no convenient way to generate a list of all available
+ hosts.
+
+`HOST ...'
+ Same as `--host=HOST'. If you omit this, GDB will guess; it's
+ quite accurate.
+
`--norecursion'
Configure only the directory level where `configure' is executed;
do not propagate configuration to subdirectories.
-Wparentheses
-Wpointer-arith
+`--enable-werror'
+ Treat compiler warnings as werrors. Use this only with GCC. It
+ adds the -Werror flag to the compiler, which will fail the
+ compilation if the compiler outputs any warning messages.
+
`--target=TARGET'
Configure GDB for cross-debugging programs running on the specified
TARGET. Without this option, GDB is configured to debug programs
There is no convenient way to generate a list of all available
targets.
-`--host=HOST'
- Configure GDB to run on the specified HOST.
-
- There is no convenient way to generate a list of all available
- hosts.
-
-`HOST ...'
- Same as `--host=HOST'. If you omit this, GDB will guess; it's
- quite accurate.
+`--with-gdb-datadir=PATH'
+ Set the GDB-specific data directory. GDB will look here for
+ certain supporting files or scripts. This defaults to the `gdb'
+ subdirectory of `datadir' (which can be set using `--datadir').
+
+`--with-relocated-sources=DIR'
+ Sets up the default source path substitution rule so that
+ directory names recorded in debug information will be
+ automatically adjusted for any directory under DIR. DIR should
+ be a subdirectory of GDB's configured prefix, the one mentioned
+ in the `--prefix' or `--exec-prefix' options to configure. This
+ option is useful if GDB is supposed to be moved to a different
+ place after it is built.
+
+`--enable-64-bit-bfd'
+ Enable 64-bit support in BFD on 32-bit hosts.
+
+`--disable-gdbmi'
+ Build GDB without the GDB/MI machine interface.
+
+`--enable-tui'
+ Build GDB with the text-mode full-screen user interface (TUI).
+ Requires a curses library (ncurses and cursesX are also
+ supported).
+
+`--enable-gdbtk'
+ Build GDB with the gdbtk GUI interface. Requires TCL/Tk to be
+ installed.
+
+`--with-libunwind'
+ Use the libunwind library for unwinding function call stack. See
+ http://www.nongnu.org/libunwind/index.html fro details.
+ Supported only on some platforms.
+
+`--with-curses'
+ Use the curses library instead of the termcap library, for
+ text-mode terminal operations.
+
+`--enable-profiling' Enable profiling of GDB itself. Necessary if you
+ want to use the "maint set profile" command for profiling GDB.
+ Requires the functions `monstartup' and `_mcleanup' to be present
+ in the standard C library used to build GDB, and also requires a
+ compiler that supports the `-pg' option.
+
+`--with-system-readline'
+ Use the readline library installed on the host, rather than the
+ library supplied as part of GDB tarball.
+
+`--with-expat'
+ Build GDB with the libexpat library. (Done by default if
+ libexpat is installed and found at configure time.) This library
+ is used to read XML files supplied with GDB. If it is
+ unavailable, some features, such as remote protocol memory maps,
+ target descriptions, and shared library lists, that are based on
+ XML files, will not be available in GDB. If your host does not
+ have libexpat installed, you can get the latest version from
+ http://expat.sourceforge.net.
+
+`--with-python[=PATH]'
+ Build GDB with Python scripting support. (Done by default if
+ libpython is present and found at configure time.) Python makes
+ GDB scripting much more powerful than the restricted CLI
+ scripting language. If your host does not have Python installed,
+ you can find it on http://www.python.org/download/. The oldest
+ version of Python supported by GDB is 2.4. The optional argument
+ PATH says where to find the Python headers and libraries; the
+ configure script will look in PATH/include for headers and in
+ PATH/lib for the libraries.
+
+`--without-included-regex'
+ Don't use the regex library included with GDB (as part of the
+ libiberty library). This is the default on hosts with version 2
+ of the GNU C library.
+
+`--with-sysroot=DIR'
+ Use DIR as the default system root directory for libraries whose
+ file names begin with `/lib' or `/usr/lib'. (The value of DIR
+ can be modified at run time by using the "set sysroot" command.)
+ If DIR is under the GDB configured prefix (set with `--prefix' or
+ `--exec-prefix' options), the default system root will be
+ automatically adjusted if and when GDB is moved to a different
+ location.
+
+`--with-system-gdbinit=FILE'
+ Configure GDB to automatically load a system-wide init file.
+ FILE should be an absolute file name. If FILE is in a directory
+ under the configured prefix, and GDB is moved to another location
+ after being built, the location of the system-wide init file will
+ be adjusted accordingly.
`configure' accepts other options, for compatibility with configuring
other GNU tools recursively; but these are the only options that affect
allows remote debugging for Unix applications. gdbserver is only
supported for some native configurations, including Sun 3, Sun 4, and
Linux.
+The file gdb/gdbserver/README includes further notes on gdbserver; in
+particular, it explains how to build gdbserver for cross-debugging
+(where gdbserver runs on the target machine, which is of a different
+architecture than the host machine running GDB).
There are a number of remote interfaces for talking to existing ROM
monitors and other hardware:
- remote-e7000.c Renesas E7000 ICE
- remote-est.c EST emulator
- remote-hms.c Renesas Micro Systems H8/300 monitor
remote-mips.c MIPS remote debugging protocol
- remote-rdp.c ARM with Demon monitor
remote-sds.c PowerPC SDS monitor
remote-sim.c Generalized simulator protocol
- remote-st.c Tandem ST-2000 monitor
- remote-vx.c VxWorks realtime kernel
-
- Remote-vx.c and the vx-share subdirectory contain a remote
-interface for the VxWorks realtime kernel, which communicates over TCP
-using the Sun RPC library. This would be a useful starting point for
-other remote- via-ethernet back ends.
Reporting Bugs in GDB
make site.exp (builds the site specific file)
runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate)
+When using a `make'-based method, you can use the Makefile variable
+`RUNTESTFLAGS' to pass flags to `runtest', e.g.:
+
+ make RUNTESTFLAGS=--directory=gdb.cp check
+
+If you use GNU make, you can use its `-j' option to run the testsuite
+in parallel. This can greatly reduce the amount of time it takes for
+the testsuite to run. In this case, if you set `RUNTESTFLAGS' then,
+by default, the tests will be run serially even under `-j'. You can
+override this and force a parallel run by setting the `make' variable
+`FORCE_PARALLEL' to any non-empty value. Note that the parallel `make
+check' assumes that you want to run the entire testsuite, so it is not
+compatible with some dejagnu options, like `--directory'.
+
The last method gives you slightly more control in case of problems
with building one or more test executables or if you are using the
testsuite `standalone', without it being part of the GDB source tree.