]>
Commit | Line | Data |
---|---|---|
aba7b4b6 AC |
1 | README for gdb-5.0 release |
2 | Updated 11 May 2000 by Andrew Cagney | |
c906108c SS |
3 | |
4 | This is GDB, the GNU source-level debugger. | |
5 | A summary of new features is in the file `NEWS'. | |
6 | ||
7a292a7a SS |
7 | See the GDB home page at http://sourceware.cygnus.com/gdb/ for up to |
8 | date release information, mailing list links and archives, etc. | |
c906108c SS |
9 | |
10 | ||
11 | Unpacking and Installation -- quick overview | |
12 | ========================== | |
13 | ||
aba7b4b6 | 14 | In this release, the GDB debugger sources, the generic GNU include |
c906108c SS |
15 | files, the BFD ("binary file description") library, the readline |
16 | library, and other libraries all have directories of their own | |
aba7b4b6 | 17 | underneath the gdb-5.0 directory. The idea is that a variety of GNU |
c906108c SS |
18 | tools can share a common copy of these things. Be aware of variation |
19 | over time--for example don't try to build gdb with a copy of bfd from | |
20 | a release other than the gdb release (such as a binutils or gas | |
21 | release), especially if the releases are more than a few weeks apart. | |
22 | Configuration scripts and makefiles exist to cruise up and down this | |
23 | directory tree and automatically build all the pieces in the right | |
24 | order. | |
25 | ||
aba7b4b6 AC |
26 | When you unpack the gdb-5.0.tar.gz file, you'll find a directory |
27 | called `gdb-5.0', which contains: | |
c906108c | 28 | |
aba7b4b6 AC |
29 | COPYING config.if install-sh mmalloc readline |
30 | COPYING.LIB config.sub intl move-if-change sim | |
31 | Makefile.in configure libiberty mpw-README symlink-tree | |
32 | README configure.in ltconfig mpw-build.in texinfo | |
33 | bfd djunpack.bat ltmain.sh mpw-config.in utils | |
34 | config etc md5.sum mpw-configure ylwrap | |
35 | config-ml.in gdb missing mpw-install | |
36 | config.guess include mkinstalldirs opcodes | |
c906108c | 37 | |
bec71058 | 38 | You can build GDB right in the source directory: |
c906108c | 39 | |
aba7b4b6 | 40 | cd gdb-5.0 |
c906108c SS |
41 | ./configure |
42 | make | |
43 | cp gdb/gdb /usr/local/bin/gdb (or wherever you want) | |
44 | ||
bec71058 FN |
45 | However, we recommend that an empty directory be used instead. |
46 | This way you do not clutter your source tree with binary files | |
47 | and will be able to create different builds with different | |
48 | configuration options. | |
49 | ||
50 | You can build GDB in any empty build directory: | |
51 | ||
52 | ||
53 | mkdir build | |
54 | cd build | |
55 | <full path to your sources>/gdb-5.0/configure | |
56 | make | |
57 | ||
c63ce875 | 58 | (Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly |
aba7b4b6 | 59 | different; see the file gdb-5.0/gdb/config/djgpp/README for details.) |
c63ce875 | 60 | |
aba7b4b6 AC |
61 | This will configure and build all the libraries as well as GDB. If |
62 | `configure' can't determine your system type, specify one as its | |
63 | argument, e.g., `./configure sun4' or `./configure decstation'. | |
c906108c | 64 | |
aba7b4b6 AC |
65 | If you get compiler errors during this stage, see the `Reporting |
66 | Bugs' section below; there are a few known problems. | |
c906108c | 67 | |
aba7b4b6 AC |
68 | GDB requires an ISO-C (ANSI C) compiler. If you do not have an |
69 | ISO-C compiler for your system, you may be able to download and | |
70 | install the GNU CC compiler. It is available via anonymous FTP from | |
71 | the directory `ftp://ftp.gnu.org/pub/gnu/gcc'. | |
c906108c | 72 | |
aba7b4b6 AC |
73 | GDB can be used as a cross-debugger, running on a machine of one |
74 | type while debugging a program running on a machine of another type. | |
75 | See below. | |
c906108c SS |
76 | |
77 | ||
78 | More Documentation | |
79 | ****************** | |
80 | ||
81 | All the documentation for GDB comes as part of the machine-readable | |
aba7b4b6 AC |
82 | distribution. The documentation is written in Texinfo format, which |
83 | is a documentation system that uses a single source file to produce | |
84 | both on-line information and a printed manual. You can use one of the | |
85 | Info formatting commands to create the on-line version of the | |
86 | documentation and TeX (or `texi2roff') to typeset the printed version. | |
87 | ||
88 | GDB includes an already formatted copy of the on-line Info version | |
89 | of this manual in the `gdb/doc' subdirectory. The main Info file is | |
90 | `gdb-5.0/gdb/doc/gdb.info', and it refers to subordinate files | |
91 | matching `gdb.info*' in the same directory. If necessary, you can | |
92 | print out these files, or read them with any editor; but they are | |
93 | easier to read using the `info' subsystem in GNU Emacs or the | |
94 | standalone `info' program, available as part of the GNU Texinfo | |
95 | distribution. | |
c906108c SS |
96 | |
97 | If you want to format these Info files yourself, you need one of the | |
98 | Info formatting programs, such as `texinfo-format-buffer' or | |
99 | `makeinfo'. | |
100 | ||
101 | If you have `makeinfo' installed, and are in the top level GDB | |
aba7b4b6 | 102 | source directory (`gdb-5.0', in the case of version 5.0), you can make |
c906108c SS |
103 | the Info file by typing: |
104 | ||
105 | cd gdb/doc | |
106 | make info | |
107 | ||
108 | If you want to typeset and print copies of this manual, you need | |
109 | TeX, a program to print its DVI output files, and `texinfo.tex', the | |
110 | Texinfo definitions file. This file is included in the GDB | |
aba7b4b6 | 111 | distribution, in the directory `gdb-5.0/texinfo'. |
c906108c SS |
112 | |
113 | TeX is a typesetting program; it does not print files directly, but | |
114 | produces output files called DVI files. To print a typeset document, | |
115 | you need a program to print DVI files. If your system has TeX | |
116 | installed, chances are it has such a program. The precise command to | |
117 | use depends on your system; `lpr -d' is common; another (for PostScript | |
118 | devices) is `dvips'. The DVI print command may require a file name | |
119 | without any extension or a `.dvi' extension. | |
120 | ||
121 | TeX also requires a macro definitions file called `texinfo.tex'. | |
122 | This file tells TeX how to typeset a document written in Texinfo | |
123 | format. On its own, TeX cannot read, much less typeset a Texinfo file. | |
124 | `texinfo.tex' is distributed with GDB and is located in the | |
aba7b4b6 | 125 | `gdb-5.0/texinfo' directory. |
c906108c SS |
126 | |
127 | If you have TeX and a DVI printer program installed, you can typeset | |
128 | and print this manual. First switch to the the `gdb' subdirectory of | |
aba7b4b6 | 129 | the main source directory (for example, to `gdb-5.0/gdb') and then type: |
c906108c SS |
130 | |
131 | make gdb.dvi | |
132 | ||
133 | ||
134 | Installing GDB | |
135 | ************** | |
136 | ||
137 | GDB comes with a `configure' script that automates the process of | |
138 | preparing GDB for installation; you can then use `make' to build the | |
139 | `gdb' program. | |
140 | ||
141 | The GDB distribution includes all the source code you need for GDB in | |
142 | a single directory, whose name is usually composed by appending the | |
143 | version number to `gdb'. | |
144 | ||
aba7b4b6 | 145 | For example, the GDB version 5.0 distribution is in the `gdb-5.0' |
c906108c SS |
146 | directory. That directory contains: |
147 | ||
aba7b4b6 | 148 | `gdb-5.0/{COPYING,COPYING.LIB}' |
c906108c SS |
149 | Standard GNU license files. Please read them. |
150 | ||
aba7b4b6 | 151 | `gdb-5.0/bfd' |
c906108c SS |
152 | source for the Binary File Descriptor library |
153 | ||
aba7b4b6 | 154 | `gdb-5.0/config*' |
c906108c SS |
155 | script for configuring GDB, along with other support files |
156 | ||
aba7b4b6 | 157 | `gdb-5.0/gdb' |
c906108c SS |
158 | the source specific to GDB itself |
159 | ||
aba7b4b6 | 160 | `gdb-5.0/include' |
c906108c SS |
161 | GNU include files |
162 | ||
aba7b4b6 | 163 | `gdb-5.0/libiberty' |
c906108c SS |
164 | source for the `-liberty' free software library |
165 | ||
aba7b4b6 | 166 | `gdb-5.0/mmalloc' |
c906108c SS |
167 | source for the GNU memory-mapped malloc package |
168 | ||
aba7b4b6 | 169 | `gdb-5.0/opcodes' |
c906108c SS |
170 | source for the library of opcode tables and disassemblers |
171 | ||
aba7b4b6 | 172 | `gdb-5.0/readline' |
c906108c | 173 | source for the GNU command-line interface |
7a292a7a SS |
174 | NOTE: The readline library is compiled for use by GDB, but will |
175 | not be installed on your system when "make install" is issued. | |
c906108c | 176 | |
aba7b4b6 | 177 | `gdb-5.0/sim' |
c906108c SS |
178 | source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc) |
179 | ||
aba7b4b6 | 180 | `gdb-5.0/intl' |
c906108c SS |
181 | source for the GNU gettext library, for internationalization. |
182 | This is slightly modified from the standalone gettext | |
183 | distribution you can get from GNU. | |
184 | ||
aba7b4b6 | 185 | `gdb-5.0/texinfo' |
c906108c SS |
186 | The `texinfo.tex' file, which you need in order to make a printed |
187 | manual using TeX. | |
188 | ||
aba7b4b6 | 189 | `gdb-5.0/etc' |
c906108c SS |
190 | Coding standards, useful files for editing GDB, and other |
191 | miscellanea. | |
192 | ||
aba7b4b6 | 193 | `gdb-5.0/utils' |
c906108c SS |
194 | A grab bag of random utilities. |
195 | ||
c63ce875 EZ |
196 | Note: the following instructions are for building GDB on Unix or |
197 | Unix-like systems. Instructions for building with DJGPP for | |
198 | MS-DOS/MS-Windows are in the file gdb/config/djgpp/README. | |
c906108c SS |
199 | |
200 | The simplest way to configure and build GDB is to run `configure' | |
201 | from the `gdb-VERSION-NUMBER' source directory, which in this example | |
aba7b4b6 | 202 | is the `gdb-5.0' directory. |
c906108c SS |
203 | |
204 | First switch to the `gdb-VERSION-NUMBER' source directory if you are | |
205 | not already in it; then run `configure'. | |
206 | ||
207 | For example: | |
208 | ||
aba7b4b6 | 209 | cd gdb-5.0 |
c906108c SS |
210 | ./configure |
211 | make | |
212 | ||
213 | Running `configure' followed by `make' builds the `bfd', | |
214 | `readline', `mmalloc', and `libiberty' libraries, then `gdb' itself. | |
215 | The configured source files, and the binaries, are left in the | |
216 | corresponding source directories. | |
217 | ||
218 | `configure' is a Bourne-shell (`/bin/sh') script; if your system | |
219 | does not recognize this automatically when you run a different shell, | |
220 | you may need to run `sh' on it explicitly: | |
221 | ||
222 | sh configure | |
223 | ||
224 | If you run `configure' from a directory that contains source | |
aba7b4b6 AC |
225 | directories for multiple libraries or programs, such as the `gdb-5.0' |
226 | source directory for version 5.0, `configure' creates configuration | |
c906108c SS |
227 | files for every directory level underneath (unless you tell it not to, |
228 | with the `--norecursion' option). | |
229 | ||
230 | You can run the `configure' script from any of the subordinate | |
231 | directories in the GDB distribution, if you only want to configure that | |
232 | subdirectory; but be sure to specify a path to it. | |
233 | ||
aba7b4b6 | 234 | For example, with version 5.0, type the following to configure only |
c906108c SS |
235 | the `bfd' subdirectory: |
236 | ||
aba7b4b6 | 237 | cd gdb-5.0/bfd |
c906108c SS |
238 | ../configure |
239 | ||
240 | You can install `gdb' anywhere; it has no hardwired paths. However, | |
241 | you should make sure that the shell on your path (named by the `SHELL' | |
242 | environment variable) is publicly readable. Remember that GDB uses the | |
243 | shell to start your program--some systems refuse to let GDB debug child | |
244 | processes whose programs are not readable. | |
245 | ||
246 | ||
247 | Compiling GDB in another directory | |
248 | ================================== | |
249 | ||
250 | If you want to run GDB versions for several host or target machines, | |
251 | you need a different `gdb' compiled for each combination of host and | |
252 | target. `configure' is designed to make this easy by allowing you to | |
253 | generate each configuration in a separate subdirectory, rather than in | |
254 | the source directory. If your `make' program handles the `VPATH' | |
255 | feature correctly (GNU `make' and SunOS 'make' are two that should), | |
256 | running `make' in each of these directories builds the `gdb' program | |
257 | specified there. | |
258 | ||
259 | To build `gdb' in a separate directory, run `configure' with the | |
260 | `--srcdir' option to specify where to find the source. (You also need | |
261 | to specify a path to find `configure' itself from your working | |
262 | directory. If the path to `configure' would be the same as the | |
263 | argument to `--srcdir', you can leave out the `--srcdir' option; it | |
264 | will be assumed.) | |
265 | ||
aba7b4b6 | 266 | For example, with version 5.0, you can build GDB in a separate |
c906108c SS |
267 | directory for a Sun 4 like this: |
268 | ||
aba7b4b6 | 269 | cd gdb-5.0 |
c906108c SS |
270 | mkdir ../gdb-sun4 |
271 | cd ../gdb-sun4 | |
aba7b4b6 | 272 | ../gdb-5.0/configure |
c906108c SS |
273 | make |
274 | ||
275 | When `configure' builds a configuration using a remote source | |
276 | directory, it creates a tree for the binaries with the same structure | |
277 | (and using the same names) as the tree under the source directory. In | |
278 | the example, you'd find the Sun 4 library `libiberty.a' in the | |
279 | directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'. | |
280 | ||
281 | One popular reason to build several GDB configurations in separate | |
282 | directories is to configure GDB for cross-compiling (where GDB runs on | |
283 | one machine--the host--while debugging programs that run on another | |
284 | machine--the target). You specify a cross-debugging target by giving | |
285 | the `--target=TARGET' option to `configure'. | |
286 | ||
287 | When you run `make' to build a program or library, you must run it | |
288 | in a configured directory--whatever directory you were in when you | |
289 | called `configure' (or one of its subdirectories). | |
290 | ||
291 | The `Makefile' that `configure' generates in each source directory | |
292 | also runs recursively. If you type `make' in a source directory such | |
aba7b4b6 AC |
293 | as `gdb-5.0' (or in a separate configured directory configured with |
294 | `--srcdir=PATH/gdb-5.0'), you will build all the required libraries, | |
c906108c SS |
295 | and then build GDB. |
296 | ||
297 | When you have multiple hosts or targets configured in separate | |
298 | directories, you can run `make' on them in parallel (for example, if | |
299 | they are NFS-mounted on each of the hosts); they will not interfere | |
300 | with each other. | |
301 | ||
302 | ||
303 | Specifying names for hosts and targets | |
304 | ====================================== | |
305 | ||
306 | The specifications used for hosts and targets in the `configure' | |
307 | script are based on a three-part naming scheme, but some short | |
308 | predefined aliases are also supported. The full naming scheme encodes | |
309 | three pieces of information in the following pattern: | |
310 | ||
311 | ARCHITECTURE-VENDOR-OS | |
312 | ||
313 | For example, you can use the alias `sun4' as a HOST argument or in a | |
314 | `--target=TARGET' option. The equivalent full name is | |
315 | `sparc-sun-sunos4'. | |
316 | ||
317 | The `configure' script accompanying GDB does not provide any query | |
318 | facility to list all supported host and target names or aliases. | |
319 | `configure' calls the Bourne shell script `config.sub' to map | |
320 | abbreviations to full names; you can read the script, if you wish, or | |
321 | you can use it to test your guesses on abbreviations--for example: | |
322 | ||
323 | % sh config.sub sun4 | |
324 | sparc-sun-sunos4.1.1 | |
325 | % sh config.sub sun3 | |
326 | m68k-sun-sunos4.1.1 | |
327 | % sh config.sub decstation | |
328 | mips-dec-ultrix4.2 | |
329 | % sh config.sub hp300bsd | |
330 | m68k-hp-bsd | |
331 | % sh config.sub i386v | |
332 | i386-pc-sysv | |
333 | % sh config.sub i786v | |
334 | Invalid configuration `i786v': machine `i786v' not recognized | |
335 | ||
336 | `config.sub' is also distributed in the GDB source directory | |
aba7b4b6 | 337 | (`gdb-5.0', for version 5.0). |
c906108c SS |
338 | |
339 | ||
340 | `configure' options | |
341 | =================== | |
342 | ||
343 | Here is a summary of the `configure' options and arguments that are | |
344 | most often useful for building GDB. `configure' also has several other | |
345 | options not listed here. *note : (configure.info)What Configure Does, | |
346 | for a full explanation of `configure'. | |
347 | ||
348 | configure [--help] | |
349 | [--prefix=DIR] | |
350 | [--srcdir=PATH] | |
351 | [--norecursion] [--rm] | |
352 | [--enable-build-warnings] | |
353 | [--target=TARGET] | |
354 | [--host=HOST] | |
355 | [HOST] | |
356 | ||
357 | You may introduce options with a single `-' rather than `--' if you | |
358 | prefer; but you may abbreviate option names if you use `--'. | |
359 | ||
360 | `--help' | |
361 | Display a quick summary of how to invoke `configure'. | |
362 | ||
363 | `-prefix=DIR' | |
364 | Configure the source to install programs and files under directory | |
365 | `DIR'. | |
366 | ||
367 | `--srcdir=PATH' | |
368 | *Warning: using this option requires GNU `make', or another `make' | |
369 | that compatibly implements the `VPATH' feature.* | |
370 | Use this option to make configurations in directories separate | |
371 | from the GDB source directories. Among other things, you can use | |
372 | this to build (or maintain) several configurations simultaneously, | |
373 | in separate directories. `configure' writes configuration | |
374 | specific files in the current directory, but arranges for them to | |
375 | use the source in the directory PATH. `configure' will create | |
376 | directories under the working directory in parallel to the source | |
377 | directories below PATH. | |
378 | ||
379 | `--norecursion' | |
380 | Configure only the directory level where `configure' is executed; | |
381 | do not propagate configuration to subdirectories. | |
382 | ||
383 | `--rm' | |
384 | Remove the configuration that the other arguments specify. | |
385 | ||
386 | `--enable-build-warnings' | |
387 | When building the GDB sources, ask the compiler to warn about any | |
388 | code which looks even vaguely suspicious. You should only using | |
389 | this feature if you're compiling with GNU CC. It passes the | |
390 | following flags: | |
aba7b4b6 AC |
391 | -Wimplicit |
392 | -Wreturn-type | |
393 | -Wcomment | |
394 | -Wtrigraphs | |
395 | -Wformat | |
396 | -Wparentheses | |
c906108c | 397 | -Wpointer-arith |
c906108c SS |
398 | |
399 | `--target=TARGET' | |
400 | Configure GDB for cross-debugging programs running on the specified | |
401 | TARGET. Without this option, GDB is configured to debug programs | |
402 | that run on the same machine (HOST) as GDB itself. | |
403 | ||
404 | There is no convenient way to generate a list of all available | |
405 | targets. | |
406 | ||
407 | `--host=HOST' | |
408 | Configure GDB to run on the specified HOST. | |
409 | ||
410 | There is no convenient way to generate a list of all available | |
411 | hosts. | |
412 | ||
413 | `HOST ...' | |
414 | Same as `--host=HOST'. If you omit this, GDB will guess; it's | |
415 | quite accurate. | |
416 | ||
417 | `configure' accepts other options, for compatibility with configuring | |
418 | other GNU tools recursively; but these are the only options that affect | |
419 | GDB or its supporting libraries. | |
420 | ||
421 | ||
422 | Languages other than C | |
423 | ======================= | |
424 | ||
425 | See the GDB manual (gdb/doc/gdb.texinfo) for information on this. | |
426 | ||
427 | ||
428 | Kernel debugging | |
429 | ================= | |
430 | ||
6736fc7b | 431 | Remote debugging over serial lines works fine, but the kernel |
aba7b4b6 | 432 | debugging code in here has not been tested in years. Van Jacobson has |
c906108c SS |
433 | better kernel debugging, but the UC lawyers won't let FSF have it. |
434 | ||
435 | ||
436 | Remote debugging | |
437 | ================= | |
438 | ||
aba7b4b6 AC |
439 | The files m68k-stub.c, i386-stub.c, and sparc-stub.c are examples |
440 | of remote stubs to be used with remote.c. They are designed to run | |
441 | standalone on an m68k, i386, or SPARC cpu and communicate properly | |
442 | with the remote.c stub over a serial line. | |
c906108c | 443 | |
aba7b4b6 | 444 | The directory gdb/gdbserver/ contains `gdbserver', a program that |
c906108c | 445 | allows remote debugging for Unix applications. gdbserver is only |
aba7b4b6 AC |
446 | supported for some native configurations, including Sun 3, Sun 4, and |
447 | Linux. | |
c906108c | 448 | |
aba7b4b6 | 449 | There are a number of remote interfaces for talking to existing ROM |
c906108c SS |
450 | monitors and other hardware: |
451 | ||
452 | remote-adapt.c AMD 29000 "Adapt" | |
453 | remote-array.c Array Tech RAID controller | |
454 | remote-bug.c Motorola BUG monitor | |
c906108c SS |
455 | remote-e7000.c Hitachi E7000 ICE |
456 | remote-eb.c AMD 29000 "EBMON" | |
457 | remote-es.c Ericsson 1800 monitor | |
458 | remote-est.c EST emulator | |
459 | remote-hms.c Hitachi Micro Systems H8/300 monitor | |
460 | remote-mips.c MIPS remote debugging protocol | |
461 | remote-mm.c AMD 29000 "minimon" | |
462 | remote-nindy.c Intel 960 "Nindy" | |
463 | remote-nrom.c NetROM ROM emulator | |
464 | remote-os9k.c PC running OS/9000 | |
465 | remote-rdi.c ARM with Angel monitor | |
466 | remote-rdp.c ARM with Demon monitor | |
467 | remote-sds.c PowerPC SDS monitor | |
468 | remote-sim.c Generalized simulator protocol | |
469 | remote-st.c Tandem ST-2000 monitor | |
470 | remote-udi.c AMD 29000 using the AMD "Universal Debug Interface" | |
471 | remote-vx.c VxWorks realtime kernel | |
472 | ||
aba7b4b6 AC |
473 | Remote-vx.c and the vx-share subdirectory contain a remote |
474 | interface for the VxWorks realtime kernel, which communicates over TCP | |
475 | using the Sun RPC library. This would be a useful starting point for | |
476 | other remote- via-ethernet back ends. | |
c906108c | 477 | |
aba7b4b6 AC |
478 | Remote-udi.c and the 29k-share subdirectory contain a remote |
479 | interface for AMD 29000 programs, which uses the AMD "Universal Debug | |
480 | Interface". This allows GDB to talk to software simulators, | |
481 | emulators, and/or bare hardware boards, via network or serial | |
482 | interfaces. Note that GDB only provides an interface that speaks UDI, | |
483 | not a complete solution. You will need something on the other end | |
484 | that also speaks UDI. | |
c906108c SS |
485 | |
486 | ||
487 | Reporting Bugs | |
488 | =============== | |
489 | ||
aba7b4b6 AC |
490 | The correct address for reporting bugs found in gdb is |
491 | "[email protected]". Please email all bugs, and all requests for help | |
492 | with GDB, to that address. Please include the GDB version number | |
493 | (e.g., gdb-5.0), and how you configured it (e.g., "sun4" or "mach386 | |
c906108c | 494 | host, i586-intel-synopsys target"). Since GDB now supports so many |
aba7b4b6 AC |
495 | different configurations, it is important that you be precise about |
496 | this. If at all possible, you should include the actual banner that | |
497 | GDB prints when it starts up, or failing that, the actual configure | |
498 | command that you used when configuring GDB. | |
c906108c | 499 | |
aba7b4b6 AC |
500 | For more information on how/whether to report bugs, see the GDB |
501 | Bugs section of the GDB manual (gdb/doc/gdb.texinfo) or the | |
502 | gdb/CONTRIBUTE file. | |
c906108c SS |
503 | |
504 | Known bugs: | |
505 | ||
506 | * Under Ultrix 4.2 (DECstation-3100) or Alphas under OSF/1, we have | |
507 | seen problems with backtraces after interrupting the inferior out | |
508 | of a read(). The problem is caused by ptrace() returning an | |
509 | incorrect value for the frame pointer register (register 15 or | |
510 | 30). As far as we can tell, this is a kernel problem. Any help | |
511 | with this would be greatly appreciated. | |
512 | ||
513 | * Under Ultrix 4.4 (DECstation-3100), setting the TERMCAP environment | |
514 | variable to a string without a trailing ':' can cause GDB to dump | |
515 | core upon startup. Although the core file makes it look as though | |
516 | GDB code failed, the crash actually occurs within a call to the | |
517 | termcap library function tgetent(). The problem can be solved by | |
518 | using the GNU Termcap library. | |
519 | ||
520 | Alphas running OSF/1 (versions 1.0 through 2.1) have the same buggy | |
521 | termcap code, but GDB behaves strangely rather than crashing. | |
522 | ||
523 | * On DECstations there are warnings about shift counts out of range in | |
524 | various BFD modules. None of them is a cause for alarm, they are actually | |
525 | a result of bugs in the DECstation compiler. | |
526 | ||
527 | * Notes for the DEC Alpha using OSF/1: | |
528 | The debugging output of native cc has two known problems; we view these | |
529 | as compiler bugs. | |
530 | The linker miscompacts symbol tables, which causes gdb to confuse the | |
531 | type of variables or results in `struct <illegal>' type outputs. | |
532 | dbx has the same problems with those executables. A workaround is to | |
533 | specify -Wl,-b when linking, but that will increase the executable size | |
534 | considerably. | |
535 | If a structure has incomplete type in one file (e.g., "struct foo *" | |
536 | without a definition for "struct foo"), gdb will be unable to find the | |
537 | structure definition from another file. | |
538 | It has been reported that the Ultrix 4.3A compiler on decstations has the | |
539 | same problems. | |
540 | ||
541 | * Notes for Solaris 2.x, using the SPARCworks cc compiler: | |
542 | You have to compile your program with the -xs option of the SPARCworks | |
543 | compiler to be able to debug your program with gdb. | |
544 | Under Solaris 2.3 you also need patch 101409-03 (Jumbo linker patch). | |
545 | Under Solaris 2.2, if you have patch 101052 installed, make sure | |
546 | that it is at least at revision 101052-06. | |
547 | ||
548 | * Under Irix 5 for SGIs, you must have installed the `compiler_dev.hdr' | |
549 | subsystem that is on the IDO CD, otherwise you will get complaints | |
550 | that certain files such as `/usr/include/syms.h' cannot be found. | |
551 | ||
aba7b4b6 AC |
552 | * Under Irix 6 you must build with GCC. The vendor compiler reports |
553 | as errors certain assignments that GCC considers to be warnings. | |
554 | ||
555 | GDB can produce warnings about symbols that it does not understand. | |
556 | By default, these warnings are disabled. You can enable them by | |
557 | executing `set complaint 10' (which you can put in your ~/.gdbinit if | |
558 | you like). I recommend doing this if you are working on a compiler, | |
559 | assembler, linker, or GDB, since it will point out problems that you | |
560 | may be able to fix. Warnings produced during symbol reading indicate | |
561 | some mismatch between the object file and GDB's symbol reading code. | |
562 | In many cases, it's a mismatch between the specs for the object file | |
563 | format, and what the compiler actually outputs or the debugger | |
564 | actually understands. | |
565 | ||
566 | ||
567 | Graphical interface to GDB -- X Windows, MS Windows | |
568 | ========================== | |
c906108c | 569 | |
aba7b4b6 AC |
570 | Several graphical interfaces to GDB are available. You should |
571 | check: | |
c906108c | 572 | |
aba7b4b6 | 573 | http://sourceware.cygnus.com/gdb/#gui |
c906108c | 574 | |
aba7b4b6 | 575 | for an up-to-date list. |
c906108c | 576 | |
aba7b4b6 AC |
577 | Emacs users will very likely enjoy the Grand Unified Debugger mode; |
578 | try typing `M-x gdb RET'. Those interested in experimenting with a | |
579 | new kind of gdb-mode should load gdb/gdba.el into GNU Emacs 19.25 or | |
580 | later. Comments on this mode are also welcome. | |
c906108c SS |
581 | |
582 | ||
583 | Writing Code for GDB | |
584 | ===================== | |
585 | ||
aba7b4b6 | 586 | There is a lot of information about writing code for GDB in the |
c906108c SS |
587 | internals manual, distributed with GDB in gdb/doc/gdbint.texinfo. You |
588 | can read it by hand, print it by using TeX and texinfo, or process it | |
589 | into an `info' file for use with Emacs' info mode or the standalone | |
590 | `info' program. | |
591 | ||
aba7b4b6 | 592 | If you are pondering writing anything but a short patch, especially |
c906108c SS |
593 | take note of the information about copyrights in the node Submitting |
594 | Patches. It can take quite a while to get all the paperwork done, so | |
595 | we encourage you to start that process as soon as you decide you are | |
596 | planning to work on something, or at least well ahead of when you | |
597 | think you will be ready to submit the patches. | |
598 | ||
599 | ||
600 | GDB Testsuite | |
601 | ============= | |
602 | ||
aba7b4b6 AC |
603 | Included with the GDB distribution is a DejaGNU based testsuite |
604 | that can either be used to test your newly built GDB, or for | |
605 | regression testing a GDB with local modifications. | |
606 | ||
607 | Running the testsuite requires the prior installation of DejaGNU, | |
608 | which is generally available via ftp. The directory | |
609 | ftp://sourceware.cygnus.com/pub/dejagnu/ will contain a recent | |
610 | snapshot. Once DejaGNU is installed, you can run the tests in one of | |
611 | the following ways: | |
c906108c | 612 | |
aba7b4b6 AC |
613 | (1) cd gdb-5.0 |
614 | make check-gdb | |
615 | ||
616 | or | |
c906108c | 617 | |
aba7b4b6 | 618 | (2) cd gdb-5.0/gdb |
c906108c SS |
619 | make check |
620 | ||
621 | or | |
622 | ||
aba7b4b6 | 623 | (3) cd gdb-5.0/gdb/testsuite |
c906108c SS |
624 | make site.exp (builds the site specific file) |
625 | runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate) | |
626 | ||
aba7b4b6 AC |
627 | The last method gives you slightly more control in case of problems |
628 | with building one or more test executables or if you are using the | |
629 | testsuite `standalone', without it being part of the GDB source tree. | |
c906108c SS |
630 | |
631 | See the DejaGNU documentation for further details. | |
632 | ||
633 | \f | |
634 | (this is for editing this file with GNU emacs) | |
635 | Local Variables: | |
636 | mode: text | |
637 | End: |