* ld-elfvsb/elfvsb.exp: Mirror ia64 non-pic xfails for alpha.
[deliverable/binutils-gdb.git] / gdb / config / djgpp / README
CommitLineData
ded59a1e
EZ
1
2 How to build and install the DJGPP native version of GDB
3 ********************************************************
4
5General
6=======
7
8GDB built with DJGPP supports native DJGPP debugging, whereby you run
9gdb.exe and the program being debugged on the same machine. In
10addition, this version supports remote debugging via a serial port,
11provided that the target machine has a GDB-compatible debugging stub
12which can be linked with the target program (see the section "Remote
13Serial" in the GDB manual for more details).
14
15
16Installation of the binary distribution
17=======================================
18
19Simply unzip the gdbNNNb.zip file (where NNN is the version number)
20from the top DJGPP installation directory. Be sure to preserve the
21directory structure while you unzip (use -d switch if you do this with
22PKUNZIP). On Windows 9X and Windows 2000, use an unzip program which
23supports long file names; one such program is unzip32.exe, available
24from the DJGPP sites.
25
26If you need the libraries which are built as part of GDB, install the
27companion file gdbNNNa.zip. This allows to develop applications which
28use the same functions as GDB. For example, you can build your own
29front end to the debugger.
30
31
32Rebuilding GDB from sources
33===========================
34
351. Prerequisites
36 -------------
37To build the package, you will need the DJGPP development environment
38(GCC, header files, and the libraries), and also DJGPP ports of the
39following tools:
40
c4282e67 41 - GNU Make 3.79.1 or later
ded59a1e
EZ
42 - Bash 2.03 or later
43 - GNU Sed
44 - GNU Fileutils
45 - GNU Textutils 2.0 or later
46 - GNU Sh-utils
47 - GNU Grep 2.4 or later
48 - GNU Findutils
49 - GNU Awk 3.04 or later
50 - GNU Bison (only if you change one of the gdb/*.y files)
51 - Groff (only if you need to format the man pages)
52 - GNU Diffutils (only if you run the test suite)
53
54These programs should be available from the DJGPP sites, in the v2gnu
55directory. In addition, the configuration script invokes the `update'
56and `utod' utilities which are part of the basic DJGPP development kit
57(djdevNNN.zip).
58
59
602. Unpacking the sources
61 ---------------------
62If you download the source distribution from one of the DJGPP sites,
63just unzip it while preserving the directory structure (I suggest to
64use unzip32.exe available with the rest of DJGPP), and proceed to the
c4282e67 65section "How to build", below.
ded59a1e
EZ
66
67Source distributions downloaded from one of the GNU FTP sites need
6cafa39f
EZ
68some more work to unpack. First, you MUST use the `djunpack' batch
69file to unzip the package. That's because some file names in the
70official distributions need to be changed to avoid problems on the
71various platforms supported by DJGPP. `djunpack' invokes the `djtar'
72program (that is part of the basic DJGPP development kit) to rename
73these files on the fly given a file with name mappings; the
74distribution includes a file `gdb/config/djgpp/fnchange.lst' with the
75necessary mappings. So you need first to retrieve that batch file,
76and then invoke it to unpack the distribution. Here's how:
77
798bd831
EZ
78 djtar -x -p -o gdb-5.2/djunpack.bat gdb-5.2.tar.gz > djunpack.bat
79 djunpack gdb-5.2.tar.gz
6cafa39f
EZ
80
81(The name of the distribution archive and the leading directory of the
82path to `djunpack.bat' in the distribution will be different for
798bd831 83versions of GDB other than 5.2.)
6cafa39f
EZ
84
85If the argument to `djunpack.bat' include leading directories, it MUST
86be given with the DOS-style backslashes; Unix-style forward slashes
87will NOT work.
88
c4282e67
EZ
89If the distribution comes as a .tar.bz2 archive, and your version of
90`djtar' doesn't support bzip2 decompression, you need to unpack it as
91follows:
6cafa39f 92
798bd831
EZ
93 bnzip2 gdb-5.2.tar.bz2
94 djtar -x -p -o gdb-5.2/djunpack.bat gdb-5.2.tar > djunpack.bat
95 djunpack gdb-5.2.tar
ded59a1e
EZ
96
97
983. How to build
99 ------------
100
101The source distribution available from DJGPP archives is already
102configured for DJGPP v2.x, so if you only want to compile it, just
103invoke Make:
104
105 make
106
107To build a package downloaded from a GNU FTP site, you will need o
108configure it first. You will also need to configure it if you want to
c4282e67 109change the configuration options (e.g., compile without support for the
ded59a1e
EZ
110GDBMI interface). To configure GDB, type this command:
111
112 sh ./gdb/config/djgpp/djconfig.sh
113
114This script checks the unpacked distribution, then edits the configure
115scripts in the various subdirectories, to make them suitable for
116DJGPP, and finally invokes the top-level configure script, which
117recursively configures all the subdirectories.
118
119You may pass optional switches to djconfig.sh. It accepts all the
120switches accepted by the original GDB configure script. These
c4282e67
EZ
121switches are described in the file gdb/README, and their full list can
122be displayed by running the following command:
ded59a1e
EZ
123
124 sh ./gdb/configure --help
125
126NOTE: if you *do* use optional command-line switches, you MUST pass
127to the script the name of the directory where GDB sources are
128unpacked--even if you are building GDB in-place! For example:
129
c4282e67 130 sh ./gdb/config/djgpp/djconfig.sh . --disable-gdbmi
ded59a1e
EZ
131
132It is also possible to build GDB in a directory that is different from
133the one where the sources were unpacked. In that case, you have to
134pass the source directory as the first argument to the script:
135
798bd831 136 sh ./gdb/config/djgpp/djconfig.sh d:/gnu/gdb-5.2
ded59a1e
EZ
137
138You MUST use forward slashes in the first argument.
139
140After the configure script finishes, run Make:
141
142 make
143
74b2d067
EZ
144If you want to produce the documentation (for example, if you changed
145some of the Texinfo sources), type this:
146
147 make info
148
ded59a1e
EZ
149When Make finishes, you can install the package:
150
798bd831 151 make install prefix='${DJDIR}' INSTALL='ginstall -c'
ded59a1e
EZ
152
153The above doesn't install the docs; for that you will need to say
154this:
155
798bd831 156 make install-info prefix='${DJDIR}' INSTALL='ginstall -c'
ded59a1e
EZ
157
158The test suite has been made to work with DJGPP. If you make a change
159in some of the programs, or want to be sure you have a fully
160functional GDB executable, it is a good idea to run the test suite.
161You cannot use "make check" for that, since it will want to run the
162`dejagnu' utility which GDB doesn't support. Instead, use the special
163script gdb/config/djgpp/djcheck.sh, like this:
164
165 cd gdb/testsuite
166 sh ../config/djgpp/djcheck.sh
167
74b2d067
EZ
168This will run for a while and should not print anything, except the
169messages "Running tests in DIR", where DIR is one of the
170subdirectories of the testsuite. Any test that fails to produce the
171expected output will cause the diffs between the expected and the
172actual output be printed, and in addition will leave behind a file
173SOMETHING.tst (where SOMETHING is the name of the failed test). You
174should compare each of the *.tst files with the corresponding *.out
175file and convince yourself that the differences do not indicate a real
176problem. Examples of differences you can disregard are changes in the
177copyright blurb printed by GDB, values of unitialized variables,
178addresses of global variables like argv[] and envp[] (which depend on
179the size of your environment), etc.
ded59a1e
EZ
180
181Note that djcheck.sh only recurses into those of the subdirectories of
182the test suite which test features supported by the DJGPP port of GDB.
183For example, the tests in the gdb.gdbtk, gdb.threads, and gdb.hp
184directories are not run.
185
186
187Enjoy,
188 Eli Zaretskii <eliz@is.elta.co.il>
This page took 0.136756 seconds and 4 git commands to generate.