Next: , Previous: , Up: Installing ROCGDB   [Contents][Index]


C.2 Invoking the ROCGDB configure Script

ROCGDB comes with a configure script that automates the process of preparing ROCGDB for installation; you can then use make to build the gdb program.

The ROCGDB distribution includes all the source code you need for ROCGDB in a single directory, whose name is usually composed by appending the version number to ‘gdb’.

For example, the ROCGDB version 13.0.50.20220325-git distribution is in the gdb-13.0.50.20220325-git directory. That directory contains:

gdb-13.0.50.20220325-git/configure (and supporting files)

script for configuring ROCGDB and all its supporting libraries

gdb-13.0.50.20220325-git/gdb

the source specific to ROCGDB itself

gdb-13.0.50.20220325-git/bfd

source for the Binary File Descriptor library

gdb-13.0.50.20220325-git/include

GNU include files

gdb-13.0.50.20220325-git/libiberty

source for the ‘-liberty’ free software library

gdb-13.0.50.20220325-git/opcodes

source for the library of opcode tables and disassemblers

gdb-13.0.50.20220325-git/readline

source for the GNU command-line interface

There may be other subdirectories as well.

The simplest way to configure and build ROCGDB is to run configure from the gdb-version-number source directory, which in this example is the gdb-13.0.50.20220325-git 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 ROCGDB will run as an argument.

For example:

cd gdb-13.0.50.20220325-git
./configure
make

Running ‘configure’ and then running make builds the included supporting 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

You should run the configure script from the top directory in the source tree, the gdb-version-number directory. If you run configure from one of the subdirectories, you will configure only that subdirectory. That is usually not what you want. In particular, if you run the first configure from the gdb subdirectory of the gdb-version-number directory, you will omit the configuration of bfd, readline, and other sibling directories of the gdb subdirectory. This leads to build errors about missing include files such as bfd/bfd.h.

You can install ROCGDB anywhere. The best way to do this is to pass the --prefix option to configure, and then install it with make install.


Next: Compiling ROCGDB in Another Directory, Previous: Requirements for Building ROCGDB, Up: Installing ROCGDB   [Contents][Index]