Line 21... |
Line 21... |
developing GNU and promoting software freedom."
|
developing GNU and promoting software freedom."
|
|
|
This file documents the GNU debugger GDB.
|
This file documents the GNU debugger GDB.
|
|
|
This is the Ninth Edition, of `Debugging with GDB: the GNU
|
This is the Ninth Edition, of `Debugging with GDB: the GNU
|
Source-Level Debugger' for GDB (GDB) Version 7.2-or32-1.0rc1.
|
Source-Level Debugger' for GDB (GDB) Version 7.2-or32-1.0rc3.
|
|
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
2010 Free Software Foundation, Inc.
|
2010 Free Software Foundation, Inc.
|
|
|
Line 3714... |
Line 3714... |
formatting commands to create the on-line version of the documentation
|
formatting commands to create the on-line version of the documentation
|
and TeX (or `texi2roff') to typeset the printed version.
|
and TeX (or `texi2roff') to typeset the printed version.
|
|
|
GDB includes an already formatted copy of the on-line Info version
|
GDB includes an already formatted copy of the on-line Info version
|
of this manual in the `gdb' subdirectory. The main Info file is
|
of this manual in the `gdb' subdirectory. The main Info file is
|
`gdb-7.2-or32-1.0rc1/gdb/gdb.info', and it refers to subordinate files
|
`gdb-7.2-or32-1.0rc3/gdb/gdb.info', and it refers to subordinate files
|
matching `gdb.info*' in the same directory. If necessary, you can
|
matching `gdb.info*' in the same directory. If necessary, you can
|
print out these files, or read them with any editor; but they are
|
print out these files, or read them with any editor; but they are
|
easier to read using the `info' subsystem in GNU Emacs or the
|
easier to read using the `info' subsystem in GNU Emacs or the
|
standalone `info' program, available as part of the GNU Texinfo
|
standalone `info' program, available as part of the GNU Texinfo
|
distribution.
|
distribution.
|
|
|
If you want to format these Info files yourself, you need one of the
|
If you want to format these Info files yourself, you need one of the
|
Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
|
Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'.
|
|
|
If you have `makeinfo' installed, and are in the top level GDB
|
If you have `makeinfo' installed, and are in the top level GDB
|
source directory (`gdb-7.2-or32-1.0rc1', in the case of version
|
source directory (`gdb-7.2-or32-1.0rc3', in the case of version
|
7.2-or32-1.0rc1), you can make the Info file by typing:
|
7.2-or32-1.0rc3), you can make the Info file by typing:
|
|
|
cd gdb
|
cd gdb
|
make gdb.info
|
make gdb.info
|
|
|
If you want to typeset and print copies of this manual, you need TeX,
|
If you want to typeset and print copies of this manual, you need TeX,
|
Line 3751... |
Line 3751... |
`texinfo.tex' is distributed with GDB and is located in the
|
`texinfo.tex' is distributed with GDB and is located in the
|
`gdb-VERSION-NUMBER/texinfo' directory.
|
`gdb-VERSION-NUMBER/texinfo' directory.
|
|
|
If you have TeX and a DVI printer program installed, you can typeset
|
If you have TeX and a DVI printer program installed, you can typeset
|
and print this manual. First switch to the `gdb' subdirectory of the
|
and print this manual. First switch to the `gdb' subdirectory of the
|
main source directory (for example, to `gdb-7.2-or32-1.0rc1/gdb') and
|
main source directory (for example, to `gdb-7.2-or32-1.0rc3/gdb') and
|
type:
|
type:
|
|
|
make gdb.dvi
|
make gdb.dvi
|
|
|
Then give `gdb.dvi' to your DVI printing program.
|
Then give `gdb.dvi' to your DVI printing program.
|
|
|
---------- Footnotes ----------
|
---------- Footnotes ----------
|
|
|
(1) In `gdb-7.2-or32-1.0rc1/gdb/refcard.ps' of the version
|
(1) In `gdb-7.2-or32-1.0rc3/gdb/refcard.ps' of the version
|
7.2-or32-1.0rc1 release.
|
7.2-or32-1.0rc3 release.
|
|
|
|
|
File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top
|
File: gdb.info, Node: Installing GDB, Next: Maintenance Commands, Prev: Formatting Documentation, Up: Top
|
|
|
Appendix B Installing GDB
|
Appendix B Installing GDB
|
Line 3860... |
Line 3860... |
|
|
The GDB distribution includes all the source code you need for GDB
|
The GDB distribution includes all the source code you need for GDB
|
in a single directory, whose name is usually composed by appending the
|
in a single directory, whose name is usually composed by appending the
|
version number to `gdb'.
|
version number to `gdb'.
|
|
|
For example, the GDB version 7.2-or32-1.0rc1 distribution is in the
|
For example, the GDB version 7.2-or32-1.0rc3 distribution is in the
|
`gdb-7.2-or32-1.0rc1' directory. That directory contains:
|
`gdb-7.2-or32-1.0rc3' directory. That directory contains:
|
|
|
`gdb-7.2-or32-1.0rc1/configure (and supporting files)'
|
`gdb-7.2-or32-1.0rc3/configure (and supporting files)'
|
script for configuring GDB and all its supporting libraries
|
script for configuring GDB and all its supporting libraries
|
|
|
`gdb-7.2-or32-1.0rc1/gdb'
|
`gdb-7.2-or32-1.0rc3/gdb'
|
the source specific to GDB itself
|
the source specific to GDB itself
|
|
|
`gdb-7.2-or32-1.0rc1/bfd'
|
`gdb-7.2-or32-1.0rc3/bfd'
|
source for the Binary File Descriptor library
|
source for the Binary File Descriptor library
|
|
|
`gdb-7.2-or32-1.0rc1/include'
|
`gdb-7.2-or32-1.0rc3/include'
|
GNU include files
|
GNU include files
|
|
|
`gdb-7.2-or32-1.0rc1/libiberty'
|
`gdb-7.2-or32-1.0rc3/libiberty'
|
source for the `-liberty' free software library
|
source for the `-liberty' free software library
|
|
|
`gdb-7.2-or32-1.0rc1/opcodes'
|
`gdb-7.2-or32-1.0rc3/opcodes'
|
source for the library of opcode tables and disassemblers
|
source for the library of opcode tables and disassemblers
|
|
|
`gdb-7.2-or32-1.0rc1/readline'
|
`gdb-7.2-or32-1.0rc3/readline'
|
source for the GNU command-line interface
|
source for the GNU command-line interface
|
|
|
`gdb-7.2-or32-1.0rc1/glob'
|
`gdb-7.2-or32-1.0rc3/glob'
|
source for the GNU filename pattern-matching subroutine
|
source for the GNU filename pattern-matching subroutine
|
|
|
`gdb-7.2-or32-1.0rc1/mmalloc'
|
`gdb-7.2-or32-1.0rc3/mmalloc'
|
source for the GNU memory-mapped malloc package
|
source for the GNU memory-mapped malloc package
|
|
|
The simplest way to configure and build GDB is to run `configure'
|
The simplest way to configure and build GDB is to run `configure'
|
from the `gdb-VERSION-NUMBER' source directory, which in this example
|
from the `gdb-VERSION-NUMBER' source directory, which in this example
|
is the `gdb-7.2-or32-1.0rc1' directory.
|
is the `gdb-7.2-or32-1.0rc3' directory.
|
|
|
First switch to the `gdb-VERSION-NUMBER' source directory if you are
|
First switch to the `gdb-VERSION-NUMBER' source directory if you are
|
not already in it; then run `configure'. Pass the identifier for the
|
not already in it; then run `configure'. Pass the identifier for the
|
platform on which GDB will run as an argument.
|
platform on which GDB will run as an argument.
|
|
|
For example:
|
For example:
|
|
|
cd gdb-7.2-or32-1.0rc1
|
cd gdb-7.2-or32-1.0rc3
|
./configure HOST
|
./configure HOST
|
make
|
make
|
|
|
where HOST is an identifier such as `sun4' or `decstation', that
|
where HOST is an identifier such as `sun4' or `decstation', that
|
identifies the platform where GDB will run. (You can often leave off
|
identifies the platform where GDB will run. (You can often leave off
|
Line 3922... |
Line 3922... |
|
|
sh configure HOST
|
sh configure HOST
|
|
|
If you run `configure' from a directory that contains source
|
If you run `configure' from a directory that contains source
|
directories for multiple libraries or programs, such as the
|
directories for multiple libraries or programs, such as the
|
`gdb-7.2-or32-1.0rc1' source directory for version 7.2-or32-1.0rc1,
|
`gdb-7.2-or32-1.0rc3' source directory for version 7.2-or32-1.0rc3,
|
`configure' creates configuration files for every directory level
|
`configure' creates configuration files for every directory level
|
underneath (unless you tell it not to, with the `--norecursion' option).
|
underneath (unless you tell it not to, with the `--norecursion' option).
|
|
|
You should run the `configure' script from the top directory in the
|
You should run the `configure' script from the top directory in the
|
source tree, the `gdb-VERSION-NUMBER' directory. If you run
|
source tree, the `gdb-VERSION-NUMBER' directory. If you run
|
Line 3963... |
Line 3963... |
to specify a path to find `configure' itself from your working
|
to specify a path to find `configure' itself from your working
|
directory. If the path to `configure' would be the same as the
|
directory. If the path to `configure' would be the same as the
|
argument to `--srcdir', you can leave out the `--srcdir' option; it is
|
argument to `--srcdir', you can leave out the `--srcdir' option; it is
|
assumed.)
|
assumed.)
|
|
|
For example, with version 7.2-or32-1.0rc1, you can build GDB in a
|
For example, with version 7.2-or32-1.0rc3, you can build GDB in a
|
separate directory for a Sun 4 like this:
|
separate directory for a Sun 4 like this:
|
|
|
cd gdb-7.2-or32-1.0rc1
|
cd gdb-7.2-or32-1.0rc3
|
mkdir ../gdb-sun4
|
mkdir ../gdb-sun4
|
cd ../gdb-sun4
|
cd ../gdb-sun4
|
../gdb-7.2-or32-1.0rc1/configure sun4
|
../gdb-7.2-or32-1.0rc3/configure sun4
|
make
|
make
|
|
|
When `configure' builds a configuration using a remote source
|
When `configure' builds a configuration using a remote source
|
directory, it creates a tree for the binaries with the same structure
|
directory, it creates a tree for the binaries with the same structure
|
(and using the same names) as the tree under the source directory. In
|
(and using the same names) as the tree under the source directory. In
|
the example, you'd find the Sun 4 library `libiberty.a' in the
|
the example, you'd find the Sun 4 library `libiberty.a' in the
|
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
|
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
|
|
|
Make sure that your path to the `configure' script has just one
|
Make sure that your path to the `configure' script has just one
|
instance of `gdb' in it. If your path to `configure' looks like
|
instance of `gdb' in it. If your path to `configure' looks like
|
`../gdb-7.2-or32-1.0rc1/gdb/configure', you are configuring only one
|
`../gdb-7.2-or32-1.0rc3/gdb/configure', you are configuring only one
|
subdirectory of GDB, not the whole package. This leads to build errors
|
subdirectory of GDB, not the whole package. This leads to build errors
|
about missing include files such as `bfd/bfd.h'.
|
about missing include files such as `bfd/bfd.h'.
|
|
|
One popular reason to build several GDB configurations in separate
|
One popular reason to build several GDB configurations in separate
|
directories is to configure GDB for cross-compiling (where GDB runs on
|
directories is to configure GDB for cross-compiling (where GDB runs on
|
Line 3996... |
Line 3996... |
in a configured directory--whatever directory you were in when you
|
in a configured directory--whatever directory you were in when you
|
called `configure' (or one of its subdirectories).
|
called `configure' (or one of its subdirectories).
|
|
|
The `Makefile' that `configure' generates in each source directory
|
The `Makefile' that `configure' generates in each source directory
|
also runs recursively. If you type `make' in a source directory such
|
also runs recursively. If you type `make' in a source directory such
|
as `gdb-7.2-or32-1.0rc1' (or in a separate configured directory
|
as `gdb-7.2-or32-1.0rc3' (or in a separate configured directory
|
configured with `--srcdir=DIRNAME/gdb-7.2-or32-1.0rc1'), you will build
|
configured with `--srcdir=DIRNAME/gdb-7.2-or32-1.0rc3'), you will build
|
all the required libraries, and then build GDB.
|
all the required libraries, and then build GDB.
|
|
|
When you have multiple hosts or targets configured in separate
|
When you have multiple hosts or targets configured in separate
|
directories, you can run `make' on them in parallel (for example, if
|
directories, you can run `make' on them in parallel (for example, if
|
they are NFS-mounted on each of the hosts); they will not interfere
|
they are NFS-mounted on each of the hosts); they will not interfere
|
Line 4042... |
Line 4042... |
m68k-sun-sunos4.1.1
|
m68k-sun-sunos4.1.1
|
% sh config.sub i986v
|
% sh config.sub i986v
|
Invalid configuration `i986v': machine `i986v' not recognized
|
Invalid configuration `i986v': machine `i986v' not recognized
|
|
|
`config.sub' is also distributed in the GDB source directory
|
`config.sub' is also distributed in the GDB source directory
|
(`gdb-7.2-or32-1.0rc1', for version 7.2-or32-1.0rc1).
|
(`gdb-7.2-or32-1.0rc3', for version 7.2-or32-1.0rc3).
|
|
|
|
|
File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB
|
File: gdb.info, Node: Configure Options, Next: System-wide configuration, Prev: Config Names, Up: Installing GDB
|
|
|
B.5 `configure' Options
|
B.5 `configure' Options
|