Appendix B. Installing gdb
317
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
.
Make sure that your path to the
configure
script has just one instance of
gdb
in it. If your path to
configure
looks like
../gdb-2003-07-22-cvs/gdb/configure
, you are configuring only one
subdirectory of gdb, not the whole package. This leads to build errors about missing include files such
as
bfd/bfd.h
.
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-2003-07-22-cvs
(or in a separate configured directory con-
figured with
-srcdir=
dirname
/gdb-2003-07-22-cvs
), 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.
B.2. 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 ab-
breviations 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 i386-linux
i386-pc-linux-gnu
% sh config.sub alpha-linux
alpha-unknown-linux-gnu
% sh config.sub hp9k700
hppa1.1-hp-hpux
% sh config.sub sun4
sparc-sun-sunos4.1.1
% sh config.sub sun3
m68k-sun-sunos4.1.1
% sh config.sub i986v
Invalid configuration ‘i986v’: machine ‘i986v’ not recognized
config.sub
is also distributed in the gdb source directory (
gdb-2003-07-22-cvs
, for version
2003-07-22-cvs).
Summary of Contents for ENTERPRISE LINUX 4 - DEVELOPER TOOLS GUIDE
Page 1: ...Red Hat Enterprise Linux 4 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......