home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 7
/
FreshFishVol7.bin
/
bbs
/
gnu
/
gdb-4.12-src.lha
/
GNU
/
src
/
amiga
/
gdb-4.12
/
gdb
/
gdb.info-8
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-02-03
|
46KB
|
875 lines
This is Info file ./gdb.info, produced by Makeinfo-1.52 from the input
file gdb.texinfo.
START-INFO-DIR-ENTRY
* Gdb:: The GNU debugger.
END-INFO-DIR-ENTRY
This file documents the GNU debugger GDB.
This is Edition 4.12, January 1994, of `Debugging with GDB: the GNU
Source-Level Debugger' for GDB Version 4.12.
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 are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the entire resulting derived work is distributed under the terms
of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions.
File: gdb.info, Node: Installing GDB, Next: Index, Prev: Formatting Documentation, Up: Top
Installing GDB
**************
GDB comes with a `configure' script that automates the process of
preparing GDB for installation; you can then use `make' to build the
`gdb' program.
The GDB distribution includes all the source code you need for GDB in
a single directory, whose name is usually composed by appending the
version number to `gdb'.
For example, the GDB version 4.12 distribution is in the `gdb-4.12'
directory. That directory contains:
`gdb-4.12/configure (and supporting files)'
script for configuring GDB and all its supporting libraries.
`gdb-4.12/gdb'
the source specific to GDB itself
`gdb-4.12/bfd'
source for the Binary File Descriptor library
`gdb-4.12/include'
GNU include files
`gdb-4.12/libiberty'
source for the `-liberty' free software library
`gdb-4.12/opcodes'
source for the library of opcode tables and disassemblers
`gdb-4.12/readline'
source for the GNU command-line interface
`gdb-4.12/glob'
source for the GNU filename pattern-matching subroutine
`gdb-4.12/mmalloc'
source for the GNU memory-mapped malloc package
The simplest way to configure and build GDB is to run `configure'
from the `gdb-VERSION-NUMBER' source directory, which in this example
is the `gdb-4.12' directory.
First switch to the `gdb-VERSION-NUMBER' source directory if you are
not already in it; then run `configure'. Pass the identifier for the
platform on which GDB will run as an argument.
For example:
cd gdb-4.12
./configure HOST
make
where HOST is an identifier such as `sun4' or `decstation', that
identifies the platform where GDB will run. (You can often leave off
HOST; `configure' tries to guess the correct value by examining your
system.)
Running `configure HOST' and then running `make' builds the `bfd',
`readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
The configured source files, and the binaries, are left in the
corresponding source directories.
`configure' is a Bourne-shell (`/bin/sh') script; if your system
does not recognize this automatically when you run a different shell,
you may need to run `sh' on it explicitly:
sh configure HOST
If you run `configure' from a directory that contains source
directories for multiple libraries or programs, such as the `gdb-4.12'
source directory for version 4.12, `configure' creates configuration
files for every directory level underneath (unless you tell it not to,
with the `--norecursion' option).
You can run the `configure' script from any of the subordinate
directories in the GDB distribution if you only want to configure that
subdirectory, but be sure to specify a path to it.
For example, with version 4.12, type the following to configure only
the `bfd' subdirectory:
cd gdb-4.12/bfd
../configure HOST
You can install `gdb' anywhere; it has no hardwired paths. However,
you should make sure that the shell on your path (named by the `SHELL'
environment variable) is publicly readable. Remember that GDB uses the
shell to start your program--some systems refuse to let GDB debug child
processes whose programs are not readable.
* Menu:
* Separate Objdir:: Compiling GDB in another directory
* Config Names:: Specifying names for hosts and targets
* configure Options:: Summary of options for configure
File: gdb.info, Node: Separate Objdir, Next: Config Names, Up: Installing GDB
Compiling GDB in another directory
==================================
If you want to run GDB versions for several host or target machines,
you need a different `gdb' compiled for each combination of host and
target. `configure' is designed to make this easy by allowing you to
generate each configuration in a separate subdirectory, rather than in
the source directory. If your `make' program handles the `VPATH'
feature (GNU `make' does), running `make' in each of these directories
builds the `gdb' program specified there.
To build `gdb' in a separate directory, run `configure' with the
`--srcdir' option to specify where to find the source. (You also need
to specify a path to find `configure' itself from your working
directory. If the path to `configure' would be the same as the
argument to `--srcdir', you can leave out the `--srcdir' option; it is
assumed.)
For example, with version 4.12, you can build GDB in a separate
directory for a Sun 4 like this:
cd gdb-4.12
mkdir ../gdb-sun4
cd ../gdb-sun4
../gdb-4.12/configure sun4
make
When `configure' builds a configuration using a remote source
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
the example, you'd find the Sun 4 library `libiberty.a' in the
directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
One popular reason to build several GDB configurations in separate
directories is to configure GDB for cross-compiling (where GDB runs on
one machine--the host--while debugging programs that run on another
machine--the target). You specify a cross-debugging target by giving
the `--target=TARGET' option to `configure'.
When you run `make' to build a program or library, you must run it
in a configured directory--whatever directory you were in when you
called `configure' (or one of its subdirectories).
The `Makefile' that `configure' generates in each source directory
also runs recursively. If you type `make' in a source directory such
as `gdb-4.12' (or in a separate configured directory configured with
`--srcdir=PATH/gdb-4.12'), you will build all the required libraries,
and then build GDB.
When you have multiple hosts or targets configured in separate
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
with each other.
File: gdb.info, Node: Config Names, Next: configure Options, Prev: Separate Objdir, Up: Installing GDB
Specifying names for hosts and targets
======================================
The specifications used for hosts and targets in the `configure'
script are based on a three-part naming scheme, but some short
predefined aliases are also supported. The full naming scheme encodes
three pieces of information in the following pattern:
ARCHITECTURE-VENDOR-OS
For example, you can use the alias `sun4' as a HOST argument, or as
the value for TARGET in a `--target=TARGET' option. The equivalent
full name is `sparc-sun-sunos4'.
The `configure' script accompanying GDB does not provide any query
facility to list all supported host and target names or aliases.
`configure' calls the Bourne shell script `config.sub' to map
abbreviations to full names; you can read the script, if you wish, or
you can use it to test your guesses on abbreviations--for example:
% sh config.sub sun4
sparc-sun-sunos4.1.1
% sh config.sub sun3
m68k-sun-sunos4.1.1
% sh config.sub decstation
mips-dec-ultrix4.2
% sh config.sub hp300bsd
m68k-hp-bsd
% sh config.sub i386v
i386-unknown-sysv