]>
Commit | Line | Data |
---|---|---|
ba47c66a PS |
1 | README for gdb-4.12 release |
2 | Updated 3-Feb-94 by Fred Fish | |
c45c19f8 | 3 | |
846058ed | 4 | This is GDB, the GNU source-level debugger, presently running under un*x. |
c50c5197 | 5 | A summary of new features is in the file `NEWS'. |
c45c19f8 | 6 | |
bd5635a1 | 7 | |
846058ed JG |
8 | Unpacking and Installation -- quick overview |
9 | ========================== | |
bd5635a1 | 10 | |
fbda4193 | 11 | In this release, the GDB debugger sources, the generic GNU include |
7739d614 JK |
12 | files, the BFD ("binary file description") library, the readline |
13 | library, and other libraries all have directories of their own | |
ba47c66a | 14 | underneath the gdb-4.12 directory. The idea is that a variety of GNU |
7739d614 JK |
15 | tools can share a common copy of these things. Be aware of variation |
16 | over time--for example don't try to build gdb with a copy of bfd from | |
17 | a release other than the gdb release (such as a binutils or gas | |
18 | release), especially if the releases are more than a few weeks apart. | |
19 | Configuration scripts and makefiles exist to cruise up and down this | |
20 | directory tree and automatically build all the pieces in the right | |
21 | order. | |
bd5635a1 | 22 | |
ba47c66a PS |
23 | When you unpack the gdb-4.12.tar.gz file, you'll find a directory |
24 | called `gdb-4.12', which contains: | |
bd5635a1 | 25 | |
804d23f3 JG |
26 | Makefile.in config.sub* glob/ opcodes/ |
27 | README configure* include/ readline/ | |
28 | bfd/ configure.in libiberty/ texinfo/ | |
29 | config/ etc/ mmalloc/ | |
30 | config.guess* gdb/ move-if-change* | |
170d0c85 | 31 | |
846058ed | 32 | To build GDB, you can just do: |
170d0c85 | 33 | |
ba47c66a | 34 | cd gdb-4.12 |
804d23f3 | 35 | ./configure |
170d0c85 | 36 | make |
846058ed | 37 | cp gdb/gdb /usr/local/bin/gdb (or wherever you want) |
170d0c85 | 38 | |
846058ed | 39 | This will configure and build all the libraries as well as GDB. |
804d23f3 JG |
40 | If `configure' can't determine your system type, specify one as its |
41 | argument, e.g. sun4 or decstation. | |
42 | ||
c45c19f8 JG |
43 | If you get compiler warnings during this stage, see the `Reporting Bugs' |
44 | section below; there are a few known problems. | |
361cc81a | 45 | |
c45c19f8 | 46 | GDB can be used as a cross-debugger, running on a machine of one type |
846058ed JG |
47 | while debugging a program running on a machine of another type. See below. |
48 | ||
49 | ||
50 | More Documentation | |
c50c5197 | 51 | ****************** |
846058ed | 52 | |
804d23f3 JG |
53 | The GDB 4 release includes an already-formatted reference card, |
54 | ready for printing with PostScript or GhostScript, in the `gdb' | |
ba47c66a | 55 | subdirectory of the main source directory. (In `gdb-4.12/gdb/refcard.ps'.) |
804d23f3 JG |
56 | If you can use PostScript or GhostScript with your printer, you can |
57 | print the reference card immediately with `refcard.ps'. | |
846058ed | 58 | |
c50c5197 JG |
59 | The release also includes the source for the reference card. You |
60 | can format it, using TeX, by typing: | |
846058ed | 61 | |
575945e3 | 62 | make refcard.dvi |
846058ed | 63 | |
575945e3 JG |
64 | The GDB reference card is designed to print in landscape mode on US |
65 | "letter" size paper; that is, on a sheet 11 inches wide by 8.5 inches | |
66 | high. You will need to specify this form of printing as an option to | |
67 | your DVI output program. | |
846058ed | 68 | |
c50c5197 JG |
69 | All the documentation for GDB comes as part of the machine-readable |
70 | distribution. The documentation is written in Texinfo format, which is | |
71 | a documentation system that uses a single source file to produce both | |
72 | on-line information and a printed manual. You can use one of the Info | |
73 | formatting commands to create the on-line version of the documentation | |
74 | and TeX (or `texi2roff') to typeset the printed version. | |
846058ed | 75 | |
c50c5197 JG |
76 | GDB includes an already formatted copy of the on-line Info version of |
77 | this manual in the `gdb' subdirectory. The main Info file is | |
575945e3 | 78 | `gdb-VERSION-NUMBER/gdb/gdb.info', and it refers to subordinate files |
c50c5197 JG |
79 | matching `gdb.info*' in the same directory. If necessary, you can |
80 | print out these files, or read them with any editor; but they are | |
81 | easier to read using the `info' subsystem in GNU Emacs or the | |
82 | standalone `info' program, available as part of the GNU Texinfo | |
83 | distribution. | |
846058ed | 84 | |
575945e3 | 85 | If you want to format these Info files yourself, you need one of the |
c50c5197 | 86 | Info formatting programs, such as `texinfo-format-buffer' or `makeinfo'. |
846058ed | 87 | |
575945e3 | 88 | If you have `makeinfo' installed, and are in the top level GDB |
ba47c66a | 89 | source directory (`gdb-4.12', in the case of version 4.12), you can make |
575945e3 | 90 | the Info file by typing: |
846058ed | 91 | |
575945e3 JG |
92 | cd gdb |
93 | make gdb.info | |
846058ed | 94 | |
804d23f3 JG |
95 | If you want to typeset and print copies of this manual, you need TeX, |
96 | a program to print its DVI output files, and `texinfo.tex', the Texinfo | |
575945e3 JG |
97 | definitions file. |
98 | ||
804d23f3 | 99 | TeX is a typesetting program; it does not print files directly, but |
575945e3 JG |
100 | produces output files called DVI files. To print a typeset document, |
101 | you need a program to print DVI files. If your system has TeX | |
102 | installed, chances are it has such a program. The precise command to | |
804d23f3 JG |
103 | use depends on your system; `lpr -d' is common; another (for PostScript |
104 | devices) is `dvips'. The DVI print command may require a file name | |
105 | without any extension or a `.dvi' extension. | |
575945e3 JG |
106 | |
107 | TeX also requires a macro definitions file called `texinfo.tex'. | |
108 | This file tells TeX how to typeset a document written in Texinfo | |
c50c5197 JG |
109 | format. On its own, TeX cannot read, much less typeset a Texinfo file. |
110 | `texinfo.tex' is distributed with GDB and is located in the | |
575945e3 JG |
111 | `gdb-VERSION-NUMBER/texinfo' directory. |
112 | ||
c50c5197 JG |
113 | If you have TeX and a DVI printer program installed, you can typeset |
114 | and print this manual. First switch to the the `gdb' subdirectory of | |
ba47c66a | 115 | the main source directory (for example, to `gdb-4.12/gdb') and then type: |
170d0c85 | 116 | |
846058ed | 117 | make gdb.dvi |
170d0c85 | 118 | |
c50c5197 | 119 | |
846058ed | 120 | Installing GDB |
804d23f3 | 121 | ************** |
c45c19f8 | 122 | |
846058ed JG |
123 | GDB comes with a `configure' script that automates the process of |
124 | preparing GDB for installation; you can then use `make' to build the | |
804d23f3 | 125 | `gdb' program. |
c45c19f8 | 126 | |
c50c5197 JG |
127 | The GDB distribution includes all the source code you need for GDB in |
128 | a single directory, whose name is usually composed by appending the | |
575945e3 JG |
129 | version number to `gdb'. |
130 | ||
ba47c66a | 131 | For example, the GDB version 4.12 distribution is in the `gdb-4.12' |
575945e3 | 132 | directory. That directory contains: |
c45c19f8 | 133 | |
ba47c66a | 134 | `gdb-4.12/configure (and supporting files)' |
fbda4193 | 135 | script for configuring GDB and all its supporting libraries. |
c45c19f8 | 136 | |
ba47c66a | 137 | `gdb-4.12/gdb' |
c45c19f8 JG |
138 | the source specific to GDB itself |
139 | ||
ba47c66a | 140 | `gdb-4.12/bfd' |
c50c5197 | 141 | source for the Binary File Descriptor library |
c45c19f8 | 142 | |
ba47c66a | 143 | `gdb-4.12/include' |
c45c19f8 JG |
144 | GNU include files |
145 | ||
ba47c66a | 146 | `gdb-4.12/libiberty' |
c45c19f8 JG |
147 | source for the `-liberty' free software library |
148 | ||
ba47c66a | 149 | `gdb-4.12/opcodes' |
c50c5197 JG |
150 | source for the library of opcode tables and disassemblers |
151 | ||
ba47c66a | 152 | `gdb-4.12/readline' |
c45c19f8 JG |
153 | source for the GNU command-line interface |
154 | ||
ba47c66a | 155 | `gdb-4.12/glob' |
c50c5197 JG |
156 | source for the GNU filename pattern-matching subroutine |
157 | ||
ba47c66a | 158 | `gdb-4.12/mmalloc' |
c50c5197 JG |
159 | source for the GNU memory-mapped malloc package |
160 | ||
ba47c66a | 161 | 'gdb-4.12/sim' |
804d23f3 JG |
162 | source for some simulators (z8000, H8/300, H8/500, etc) |
163 | ||
575945e3 JG |
164 | The simplest way to configure and build GDB is to run `configure' |
165 | from the `gdb-VERSION-NUMBER' source directory, which in this example | |
ba47c66a | 166 | is the `gdb-4.12' directory. |
575945e3 | 167 | |
c50c5197 JG |
168 | First switch to the `gdb-VERSION-NUMBER' source directory if you are |
169 | not already in it; then run `configure'. Pass the identifier for the | |
170 | platform on which GDB will run as an argument. | |
575945e3 JG |
171 | |
172 | For example: | |
c45c19f8 | 173 | |
ba47c66a | 174 | cd gdb-4.12 |
c45c19f8 JG |
175 | ./configure HOST |
176 | make | |
177 | ||
575945e3 JG |
178 | where HOST is an identifier such as `sun4' or `decstation', that |
179 | identifies the platform where GDB will run. | |
180 | ||
c50c5197 JG |
181 | Running `configure HOST' followed by `make' builds the `bfd', |
182 | `readline', `mmalloc', and `libiberty' libraries, then `gdb' itself. | |
183 | The configured source files, and the binaries, are left in the | |
184 | corresponding source directories. | |
fbda4193 JG |
185 | |
186 | `configure' is a Bourne-shell (`/bin/sh') script; if your system | |
187 | does not recognize this automatically when you run a different shell, | |
575945e3 JG |
188 | you may need to run `sh' on it explicitly: |
189 | ||
190 | sh configure HOST | |
fbda4193 | 191 | |
575945e3 | 192 | If you run `configure' from a directory that contains source |
ba47c66a PS |
193 | directories for multiple libraries or programs, such as the `gdb-4.12' |
194 | source directory for version 4.12, `configure' creates configuration | |
575945e3 JG |
195 | files for every directory level underneath (unless you tell it not to, |
196 | with the `--norecursion' option). | |
197 | ||
198 | You can run the `configure' script from any of the subordinate | |
c50c5197 JG |
199 | directories in the GDB distribution, if you only want to configure that |
200 | subdirectory; but be sure to specify a path to it. | |
575945e3 | 201 | |
ba47c66a | 202 | For example, with version 4.12, type the following to configure only |
575945e3 | 203 | the `bfd' subdirectory: |
fbda4193 | 204 | |
ba47c66a | 205 | cd gdb-4.12/bfd |
fbda4193 JG |
206 | ../configure HOST |
207 | ||
c50c5197 JG |
208 | You can install `gdb' anywhere; it has no hardwired paths. However, |
209 | you should make sure that the shell on your path (named by the `SHELL' | |
210 | environment variable) is publicly readable. Remember that GDB uses the | |
211 | shell to start your program--some systems refuse to let GDB debug child | |
212 | processes whose programs are not readable. | |
c45c19f8 | 213 | |
c45c19f8 | 214 | |
804d23f3 JG |
215 | Compiling GDB in another directory |
216 | ================================== | |
846058ed | 217 | |
fbda4193 | 218 | If you want to run GDB versions for several host or target machines, |
804d23f3 | 219 | you need a different `gdb' compiled for each combination of host and |
c50c5197 JG |
220 | target. `configure' is designed to make this easy by allowing you to |
221 | generate each configuration in a separate subdirectory, rather than in | |
222 | the source directory. If your `make' program handles the `VPATH' | |
804d23f3 JG |
223 | feature correctly (GNU `make' and SunOS 'make' are two that should), |
224 | running `make' in each of these directories builds the `gdb' program | |
225 | specified there. | |
846058ed | 226 | |
575945e3 | 227 | To build `gdb' in a separate directory, run `configure' with the |
804d23f3 JG |
228 | `--srcdir' option to specify where to find the source. (You also need |
229 | to specify a path to find `configure' itself from your working | |
c50c5197 JG |
230 | directory. If the path to `configure' would be the same as the |
231 | argument to `--srcdir', you can leave out the `--srcdir' option; it | |
232 | will be assumed.) | |
c45c19f8 | 233 | |
ba47c66a | 234 | For example, with version 4.12, you can build GDB in a separate |
575945e3 | 235 | directory for a Sun 4 like this: |
c45c19f8 | 236 | |
ba47c66a | 237 | cd gdb-4.12 |
575945e3 JG |
238 | mkdir ../gdb-sun4 |
239 | cd ../gdb-sun4 | |
ba47c66a | 240 | ../gdb-4.12/configure sun4 |
575945e3 | 241 | make |
c45c19f8 | 242 | |
575945e3 JG |
243 | When `configure' builds a configuration using a remote source |
244 | directory, it creates a tree for the binaries with the same structure | |
245 | (and using the same names) as the tree under the source directory. In | |
246 | the example, you'd find the Sun 4 library `libiberty.a' in the | |
247 | directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'. | |
c45c19f8 | 248 | |
c50c5197 | 249 | One popular reason to build several GDB configurations in separate |
575945e3 JG |
250 | directories is to configure GDB for cross-compiling (where GDB runs on |
251 | one machine--the host--while debugging programs that run on another | |
252 | machine--the target). You specify a cross-debugging target by giving | |
253 | the `--target=TARGET' option to `configure'. | |
846058ed | 254 | |
fbda4193 | 255 | When you run `make' to build a program or library, you must run it |
575945e3 JG |
256 | in a configured directory--whatever directory you were in when you |
257 | called `configure' (or one of its subdirectories). | |
846058ed | 258 | |
804d23f3 | 259 | The `Makefile' that `configure' generates in each source directory |
575945e3 | 260 | also runs recursively. If you type `make' in a source directory such |
ba47c66a PS |
261 | as `gdb-4.12' (or in a separate configured directory configured with |
262 | `--srcdir=PATH/gdb-4.12'), you will build all the required libraries, | |
804d23f3 | 263 | and then build GDB. |
c45c19f8 | 264 | |
575945e3 JG |
265 | When you have multiple hosts or targets configured in separate |
266 | directories, you can run `make' on them in parallel (for example, if | |
267 | they are NFS-mounted on each of the hosts); they will not interfere | |
268 | with each other. | |
fbda4193 JG |
269 | |
270 | ||
804d23f3 JG |
271 | Specifying names for hosts and targets |
272 | ====================================== | |
846058ed JG |
273 | |
274 | The specifications used for hosts and targets in the `configure' | |
275 | script are based on a three-part naming scheme, but some short | |
fbda4193 JG |
276 | predefined aliases are also supported. The full naming scheme encodes |
277 | three pieces of information in the following pattern: | |
846058ed JG |
278 | |
279 | ARCHITECTURE-VENDOR-OS | |
280 | ||
c50c5197 | 281 | For example, you can use the alias `sun4' as a HOST argument or in a |
804d23f3 | 282 | `--target=TARGET' option. The equivalent full name is |
fbda4193 | 283 | `sparc-sun-sunos4'. |
846058ed | 284 | |
575945e3 JG |
285 | The `configure' script accompanying GDB does not provide any query |
286 | facility to list all supported host and target names or aliases. | |
287 | `configure' calls the Bourne shell script `config.sub' to map | |
fbda4193 JG |
288 | abbreviations to full names; you can read the script, if you wish, or |
289 | you can use it to test your guesses on abbreviations--for example: | |
846058ed JG |
290 | |
291 | % sh config.sub sun4 | |
c50c5197 | 292 | sparc-sun-sunos411 |
846058ed | 293 | % sh config.sub sun3 |
c50c5197 | 294 | m68k-sun-sunos411 |
846058ed | 295 | % sh config.sub decstation |
c50c5197 | 296 | mips-dec-ultrix42 |
846058ed JG |
297 | % sh config.sub hp300bsd |
298 | m68k-hp-bsd | |
299 | % sh config.sub i386v | |
c50c5197 JG |
300 | i386-unknown-sysv |
301 | % sh config.sub i786v | |
302 | Invalid configuration `i786v': machine `i786v' not recognized | |
fbda4193 | 303 | |
575945e3 | 304 | `config.sub' is also distributed in the GDB source directory |
ba47c66a | 305 | (`gdb-4.12', for version 4.12). |
fbda4193 | 306 | |
846058ed | 307 | |
804d23f3 JG |
308 | `configure' options |
309 | =================== | |
c45c19f8 | 310 | |
c50c5197 JG |
311 | Here is a summary of the `configure' options and arguments that are |
312 | most often useful for building GDB. `configure' also has several other | |
313 | options not listed here. *note : (configure.info)What Configure Does, | |
314 | for a full explanation of `configure'. | |
c45c19f8 | 315 | |
c50c5197 JG |
316 | configure [--help] |
317 | [--prefix=DIR] | |
318 | [--srcdir=PATH] | |
575945e3 JG |
319 | [--norecursion] [--rm] |
320 | [--target=TARGET] HOST | |
c45c19f8 | 321 | |
575945e3 JG |
322 | You may introduce options with a single `-' rather than `--' if you |
323 | prefer; but you may abbreviate option names if you use `--'. | |
c45c19f8 | 324 | |
c50c5197 JG |
325 | `--help' |
326 | Display a quick summary of how to invoke `configure'. | |
327 | ||
328 | `-prefix=DIR' | |
329 | Configure the source to install programs and files under directory | |
330 | `DIR'. | |
c45c19f8 | 331 | |
575945e3 | 332 | `--srcdir=PATH' |
c50c5197 | 333 | *Warning: using this option requires GNU `make', or another `make' |
804d23f3 | 334 | that compatibly implements the `VPATH' feature.* |
575945e3 JG |
335 | Use this option to make configurations in directories separate |
336 | from the GDB source directories. Among other things, you can use | |
c50c5197 JG |
337 | this to build (or maintain) several configurations simultaneously, |
338 | in separate directories. `configure' writes configuration | |
339 | specific files in the current directory, but arranges for them to | |
340 | use the source in the directory PATH. `configure' will create | |
341 | directories under the working directory in parallel to the source | |
342 | directories below PATH. | |
575945e3 JG |
343 | |
344 | `--norecursion' | |
345 | Configure only the directory level where `configure' is executed; | |
346 | do not propagate configuration to subdirectories. | |
347 | ||
348 | `--rm' | |
846058ed | 349 | Remove the configuration that the other arguments specify. |
c45c19f8 | 350 | |
575945e3 | 351 | `--target=TARGET' |
c50c5197 JG |
352 | Configure GDB for cross-debugging programs running on the specified |
353 | TARGET. Without this option, GDB is configured to debug programs | |
354 | that run on the same machine (HOST) as GDB itself. | |
846058ed JG |
355 | |
356 | There is no convenient way to generate a list of all available | |
357 | targets. | |
c45c19f8 JG |
358 | |
359 | `HOST ...' | |
575945e3 | 360 | Configure GDB to run on the specified HOST. |
846058ed JG |
361 | |
362 | There is no convenient way to generate a list of all available | |
363 | hosts. | |
c45c19f8 JG |
364 | |
365 | `configure' accepts other options, for compatibility with configuring | |
c50c5197 JG |
366 | other GNU tools recursively; but these are the only options that affect |
367 | GDB or its supporting libraries. | |
368 | ||
bd5635a1 | 369 | |
c50c5197 JG |
370 | Languages other than C |
371 | ======================= | |
bd5635a1 | 372 | |
ba47c66a | 373 | See the GDB manual (doc/gdb.texinfo) for information on this. |
bd5635a1 | 374 | |
c50c5197 JG |
375 | Kernel debugging |
376 | ================= | |
bd5635a1 | 377 | |
c45c19f8 JG |
378 | I have't done this myself so I can't really offer any advice. |
379 | Remote debugging over serial lines works fine, but the kernel debugging | |
c50c5197 JG |
380 | code in here has not been tested in years. Van Jacobson has |
381 | better kernel debugging, but the UC lawyers won't let FSF have it. | |
bd5635a1 | 382 | |
bd5635a1 | 383 | |
c50c5197 JG |
384 | Remote debugging |
385 | ================= | |
bd5635a1 | 386 | |
c50c5197 JG |
387 | The files m68k-stub.c, i386-stub.c, and sparc-stub.c are examples of |
388 | remote stubs to be used with remote.c. They are designed to run | |
804d23f3 | 389 | standalone on an m68k, i386, or SPARC cpu and communicate properly with |
c50c5197 | 390 | the remote.c stub over a serial line. |
361cc81a | 391 | |
170d0c85 RP |
392 | The file rem-multi.shar contains a general stub that can probably |
393 | run on various different flavors of unix to allow debugging over a | |
361cc81a | 394 | serial line from one machine to another. |
bd5635a1 | 395 | |
fbda4193 JG |
396 | Some working remote interfaces for talking to existing ROM monitors |
397 | are: | |
804d23f3 | 398 | remote-adapt.c AMD 29000 "Adapt" |
fbda4193 | 399 | remote-eb.c AMD 29000 "EBMON" |
804d23f3 | 400 | remote-es1800.c Ericsson 1800 monitor |
c50c5197 | 401 | remote-hms.c Hitachi Micro Systems H8/300 monitor |
804d23f3 | 402 | remote-mips.c MIPS remote debugging protocol |
fbda4193 | 403 | remote-mm.c AMD 29000 "minimon" |
804d23f3 JG |
404 | remote-nindy.c Intel 960 "Nindy" |
405 | remote-sim.c Generalized simulator protocol | |
406 | remote-st2000.c Tandem ST-2000 monitor | |
407 | remote-udi.c AMD 29000 using the AMD "Universal Debug Interface" | |
408 | remote-vx.c VxWorks realtime kernel | |
409 | remote-z8k.c Zilog Z8000 simulator | |
170d0c85 RP |
410 | |
411 | Remote-vx.c and the vx-share subdirectory contain a remote interface for the | |
412 | VxWorks realtime kernel, which communicates over TCP using the Sun | |
413 | RPC library. This would be a useful starting point for other remote- | |
414 | via-ethernet back ends. | |
bd5635a1 | 415 | |
804d23f3 JG |
416 | Remote-udi.c and the 29k-share subdirectory contain a remote interface |
417 | for AMD 29000 programs, which uses the AMD "Universal Debug Interface". | |
418 | This allows GDB to talk to software simulators, emulators, and/or bare | |
419 | hardware boards, via network or serial interfaces. Note that GDB only | |
420 | provides an interface that speaks UDI, not a complete solution. You | |
421 | will need something on the other end that also speaks UDI. | |
422 | ||
c45c19f8 | 423 | |
c50c5197 JG |
424 | Reporting Bugs |
425 | =============== | |
c45c19f8 JG |
426 | |
427 | The correct address for reporting bugs found in gdb is | |
804d23f3 JG |
428 | "[email protected]". Please email all bugs, and all requests for |
429 | help with GDB, to that address. Please include the GDB version number | |
ba47c66a | 430 | (e.g. gdb-4.12), and how you configured it (e.g. "sun4" or "mach386 |
804d23f3 JG |
431 | host, i586-intel-synopsys target"). If you include the banner that GDB |
432 | prints when it starts up, that will give us enough information. | |
433 | ||
434 | For more information on how/whether to report bugs, see the GDB Bugs | |
435 | section of the GDB manual (gdb/doc/gdb.texinfo). | |
436 | ||
437 | Known bugs: | |
438 | ||
7739d614 JK |
439 | * Under Ultrix 4.2 (DECstation-3100) or Alphas under OSF/1, we have |
440 | seen problems with backtraces after interrupting the inferior out | |
441 | of a read(). The problem is caused by ptrace() returning an | |
b4fd641f JK |
442 | incorrect value for the frame pointer register (register 15 or |
443 | 30). As far as we can tell, this is a kernel problem. Any help | |
444 | with this would be greatly appreciated. | |
fbda4193 | 445 | |
804d23f3 JG |
446 | * On the SPARC GDB reports incorrect values of struct arguments to |
447 | functions, for the seventh and subsequent arguments. We have been looking | |
448 | at this but no fix is available yet. | |
fbda4193 | 449 | |
804d23f3 JG |
450 | * On DECstations there are warnings about shift counts out of range in |
451 | various BFD modules. None of them is a cause for alarm, they are actually | |
452 | a result of bugs in the DECstation compiler. | |
453 | ||
7739d614 JK |
454 | * Notes for the DEC Alpha using OSF/1: |
455 | The debugging output of native cc has two known problems; we view these | |
456 | as compiler bugs. | |
457 | The linker miscompacts symbol tables, which causes gdb to confuse the | |
458 | type of variables or results in `struct <illegal>' type outputs. | |
459 | dbx has the same problems with those executables. A workaround is to | |
460 | specify -Wl,-b when linking, but that will increase the executable size | |
461 | considerably. | |
b4fd641f | 462 | If a structure has incomplete type in one file (e.g. "struct foo *" |
7739d614 | 463 | without a definition for "struct foo"), gdb will be unable to find the |
b4fd641f JK |
464 | structure definition from another file. |
465 | It has been reported that the Ultrix 4.3A compiler on decstations has the | |
7739d614 JK |
466 | same problems. |
467 | ||
ba47c66a PS |
468 | Under some circumstances OSF/1 shared libraries do get relocated to a |
469 | different address, but gdb cannot handle these relocations yet. If you | |
470 | encounter problems while debugging executables which use shared libraries, | |
471 | try to relink your executable with the -non_shared option when using cc | |
472 | or with the -static option when using gcc. | |
473 | ||
474 | * Notes for BSD/386: | |
475 | To compile gdb-4.12 on BSD/386, you must run the configure script and | |
476 | its subscripts with bash. Here is an easy way to do this: | |
477 | ||
478 | bash -c 'CONFIG_SHELL=/bin/bash ./configure' | |
479 | ||
480 | (configure will report i386-unknown-bsd). Then, compile with the | |
481 | standard "make" command. | |
bd5635a1 | 482 | |
846058ed JG |
483 | GDB can produce warnings about symbols that it does not understand. By |
484 | default, these warnings are disabled. You can enable them by executing | |
485 | `set complaint 10' (which you can put in your ~/.gdbinit if you like). | |
486 | I recommend doing this if you are working on a compiler, assembler, | |
487 | linker, or gdb, since it will point out problems that you may be able | |
488 | to fix. Warnings produced during symbol reading indicate some mismatch | |
fbda4193 | 489 | between the object file and GDB's symbol reading code. In many cases, |
846058ed | 490 | it's a mismatch between the specs for the object file format, and what |
fbda4193 | 491 | the compiler actually outputs or the debugger actually understands. |
c45c19f8 | 492 | |
c45c19f8 | 493 | |
c50c5197 JG |
494 | X Windows versus GDB |
495 | ===================== | |
bd5635a1 | 496 | |
804d23f3 JG |
497 | There is an "xxgdb", which seems to work for simple operations, |
498 | which was posted to comp.sources.x. | |
bd5635a1 | 499 | |
804d23f3 | 500 | For those interested in auto display of source and the availability of |
bd5635a1 RP |
501 | an editor while debugging I suggest trying gdb-mode in gnu-emacs |
502 | (Try typing M-x gdb RETURN). Comments on this mode are welcome. | |
503 | ||
c45c19f8 | 504 | |
c50c5197 JG |
505 | Writing Code for GDB |
506 | ===================== | |
507 | ||
804d23f3 JG |
508 | There is a lot of information about writing code for GDB in the |
509 | internals manual, distributed with GDB in gdb/doc/gdbint.texinfo. You | |
510 | can read it by hand, print it by using TeX and texinfo, or process it | |
511 | into an `info' file for use with Emacs' info mode or the standalone | |
512 | `info' program. In particular, see the nodes Getting Started, | |
513 | Debugging GDB, New Architectures, Coding Style, Clean Design, and | |
514 | Submitting Patches. | |
515 | ||
516 | If you are pondering writing anything but a short patch, especially | |
517 | take note of the information about copyrights in the node Submitting | |
518 | Patches. It can take quite a while to get all the paperwork done, so | |
519 | we encourage you to start that process as soon as you decide you are | |
520 | planning to work on something, or at least well ahead of when you | |
521 | think you will be ready to submit the patches. | |
522 | ||
523 | ||
524 | GDB Testsuite | |
525 | ============= | |
526 | ||
527 | There is a dejagnu based testsuite available for testing your newly | |
528 | built gdb, or for regression testing gdb's with local modifications. | |
529 | The testsuite is distributed separately from the base gdb distribution | |
530 | for the convenience of people that wish to get either gdb or the testsuite | |
531 | separately. | |
532 | ||
ba47c66a | 533 | The name of the testsuite is gdb-4.12-testsuite.tar.gz. You unpack it in the |
804d23f3 | 534 | same directory in which you unpacked the base gdb distribution, and it |
ba47c66a | 535 | will create and populate the directory gdb-4.12/gdb/testsuite. |
804d23f3 JG |
536 | |
537 | Running the testsuite requires the prior installation of dejagnu, which | |
538 | should be available via ftp. Once dejagnu is installed, you can run | |
539 | the tests in one of two ways: | |
540 | ||
ba47c66a | 541 | (1) cd gdb-4.12/gdb (assuming you also unpacked gdb) |
804d23f3 | 542 | make check |
bd5635a1 | 543 | |
804d23f3 | 544 | or |
bd5635a1 | 545 | |
ba47c66a | 546 | (2) cd gdb-4.12/gdb/testsuite |
804d23f3 JG |
547 | make (builds the test executables) |
548 | make site.exp (builds the site specific file) | |
549 | runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate) | |
c45c19f8 | 550 | |
804d23f3 JG |
551 | The second method gives you slightly more control in case of problems with |
552 | building one or more test executables, in case you wish to remove some | |
553 | test executables before running the tests, or if you are using the testsuite | |
554 | 'standalone', without it being part of the gdb source tree. | |
846058ed | 555 | |
804d23f3 | 556 | See the dejagnu documentation for further details. |
c45c19f8 | 557 | |
bd5635a1 RP |
558 | \f |
559 | (this is for editing this file with GNU emacs) | |
560 | Local Variables: | |
561 | mode: text | |
562 | End: |