Mail Archives: djgpp/2000/05/23/07:00:55
The GNU project has released version 5.0 of GDB, the GNU Debugger.
It is available from the GNU FTP site:
ftp://ftp.gnu.org/gnu/gdb/gdb-5.0.tar.gz
It will take some time until precompiled binary of the DJGPP port is
available from SimTel.NET: I would like to run it through its test suite,
resolve any problems I find, get the packaging right on all supported
platforms, etc. It's possible that the port won't be ready before a few
weeks pass.
However, since this GDB release supports DJGPP out of the box, I'd like
to encourage people who want the latest-and-greatest (and can sustain
downloading a 12-MByte compressed archive ;-) to please fetch it, build
it on their machines, and use it, in the hope that this will reveal any
problems, both in the build procedure and in the DJGPP port itself, that
were not caught during the pretest.
Those who do download this release, are requested to please report here
any problems they see.
Unpacking and building the package with DJGPP tools is a bit complicated,
so I append below the relevant portion of the DJGPP-specific README
file. Please read this *before* you unpack!
One last comment: due to last-minute changes, if you unpack the
distribution on a non-LFN platforms, DJTAR will ask for a new name for a
couple of files. Just hit [Enter] when it does (these files are not used
in the DJGPP port).
=================================================================
Rebuilding GDB from sources
===========================
1. Prerequisites
-------------
To build the package, you will need the DJGPP development environment
(GCC, header files, and the libraries), and also DJGPP ports of the
following tools:
- GNU Make 3.78.1 or later
- Bash 2.03 or later
- GNU Sed
- GNU Fileutils
- GNU Textutils 2.0 or later
- GNU Sh-utils
- GNU Grep 2.4 or later
- GNU Findutils
- GNU Awk 3.04 or later
- GNU Bison (only if you change one of the gdb/*.y files)
- Groff (only if you need to format the man pages)
- GNU Diffutils (only if you run the test suite)
These programs should be available from the DJGPP sites, in the v2gnu
directory. In addition, the configuration script invokes the `update'
and `utod' utilities which are part of the basic DJGPP development kit
(djdevNNN.zip).
2. Unpacking the sources
---------------------
If you download the source distribution from one of the DJGPP sites,
just unzip it while preserving the directory structure (I suggest to
use unzip32.exe available with the rest of DJGPP), and proceed to the
section "How to build" below.
Source distributions downloaded from one of the GNU FTP sites need
some more work to unpack. First, you MUST use the `djunpack' batch
file to unzip the package. That's because some file names in the
official distributions need to be changed to avoid problems on the
various platforms supported by DJGPP. `djunpack' invokes the `djtar'
program (that is part of the basic DJGPP development kit) to rename
these files on the fly given a file with name mappings; the
distribution includes a file `gdb/config/djgpp/fnchange.lst' with the
necessary mappings. So you need first to retrieve that batch file,
and then invoke it to unpack the distribution. Here's how:
djtar -x -p -o gdb-5.0/djunpack.bat gdb-5.0.tar.gz > djunpack.bat
djunpack gdb-5.0.tar.gz
(The name of the distribution archive and the leading directory of the
path to `djunpack.bat' in the distribution will be different for
versions of GDB other than 5.0.)
If the argument to `djunpack.bat' include leading directories, it MUST
be given with the DOS-style backslashes; Unix-style forward slashes
will NOT work.
If the distribution comes as a .tar.bz2 archive, you need to unpack it
as follows:
bnzip2 gdb-5.0.tar.bz2
djtar -x -p -o gdb-5.0/djunpack.bat gdb-5.0.tar > djunpack.bat
djunpack gdb-5.0.tar
3. How to build
------------
To build a package downloaded from a GNU FTP site, you will need o
configure it first. You will also need to configure it if you want to
change the configuration options (e.g., compile with support for the
GDBMI interface). To configure GDB, type this command:
sh ./gdb/config/djgpp/djconfig.sh
This script checks the unpacked distribution, then edits the configure
scripts in the various subdirectories, to make them suitable for
DJGPP, and finally invokes the top-level configure script, which
recursively configures all the subdirectories.
You may pass optional switches to djconfig.sh. It accepts all the
switches accepted by the original GDB configure script. These
switches are described in the file gdb/README, and their full list be
displayed by running the following command:
sh ./gdb/configure --help
NOTE: if you *do* use optional command-line switches, you MUST pass
to the script the name of the directory where GDB sources are
unpacked--even if you are building GDB in-place! For example:
sh ./gdb/config/djgpp/djconfig.sh . --enable-gdbmi
It is also possible to build GDB in a directory that is different from
the one where the sources were unpacked. In that case, you have to
pass the source directory as the first argument to the script:
sh ./gdb/config/djgpp/djconfig.sh d:/gnu/gdb-5.0
You MUST use forward slashes in the first argument.
After the configure script finishes, run Make:
make
If you want to produce the documentation (for example, if you changed
some of the Texinfo sources), type this:
make info
When Make finishes, you can install the package:
make -k install prefix='${DJDIR}' INSTALL='ginstall -c'
The above doesn't install the docs; for that you will need to say
this:
make -k install-info prefix='${DJDIR}' INSTALL='ginstall -c'
(The -k switch is required, because some unneeded targets that are
part of the install process fail; -k lets Make run to completion
nonetheless.)
- Raw text -