gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / README
CommitLineData
16d6b4b7 1 README for GDB release
c906108c
SS
2
3This is GDB, the GNU source-level debugger.
c906108c 4
129188f6 5A summary of new features is in the file `gdb/NEWS'.
c906108c 6
1bfdc549
AC
7Check the GDB home page at http://www.gnu.org/software/gdb/ for up to
8date release information, mailing list links and archives, etc.
129188f6 9
7f0bd420
TT
10GDB's bug tracking data base can be found at
11http://www.gnu.org/software/gdb/bugs/
c906108c
SS
12
13Unpacking and Installation -- quick overview
14==========================
15
16d6b4b7
NS
16 The release is provided as a gzipped tar file called
17'gdb-VERSION.tar.gz', where VERSION is the version of GDB.
18
19 The GDB debugger sources, the generic GNU include
c906108c
SS
20files, the BFD ("binary file description") library, the readline
21library, and other libraries all have directories of their own
16d6b4b7 22underneath the gdb-VERSION directory. The idea is that a variety of GNU
c906108c 23tools can share a common copy of these things. Be aware of variation
1915ef4f
PA
24over time--for example don't try to build GDB with a copy of bfd from
25a release other than the GDB release (such as a binutils release),
34f47bc4 26especially if the releases are more than a few weeks apart.
c906108c
SS
27Configuration scripts and makefiles exist to cruise up and down this
28directory tree and automatically build all the pieces in the right
29order.
30
16d6b4b7
NS
31 When you unpack the gdb-VERSION.tar.gz file, it will create a
32source directory called `gdb-VERSION'.
c906108c 33
bec71058 34You can build GDB right in the source directory:
c906108c 35
16d6b4b7 36 cd gdb-VERSION
7f0bd420
TT
37 ./configure --prefix=/usr/local (or wherever you want)
38 make all install
c906108c 39
bec71058
FN
40However, we recommend that an empty directory be used instead.
41This way you do not clutter your source tree with binary files
42and will be able to create different builds with different
43configuration options.
44
45You can build GDB in any empty build directory:
46
34f47bc4
AC
47 mkdir build
48 cd build
7f0bd420
TT
49 <full path to your sources>/gdb-VERSION/configure [etc...]
50 make all install
bec71058 51
c63ce875 52(Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
16d6b4b7 53different; see the file gdb-VERSION/gdb/config/djgpp/README for details.)
c63ce875 54
aba7b4b6
AC
55 This will configure and build all the libraries as well as GDB. If
56`configure' can't determine your system type, specify one as its
57argument, e.g., `./configure sun4' or `./configure decstation'.
c906108c 58
16d6b4b7 59 Make sure that your 'configure' line ends in 'gdb-VERSION/configure':
eaec4d85 60
16d6b4b7
NS
61 /berman/migchain/source/gdb-VERSION/configure # RIGHT
62 /berman/migchain/source/gdb-VERSION/gdb/configure # WRONG
eaec4d85 63
1915ef4f 64 The GDB package contains several subdirectories, such as 'gdb',
eaec4d85 65'bfd', and 'readline'. If your 'configure' line ends in
16d6b4b7 66'gdb-VERSION/gdb/configure', then you are configuring only the gdb
1915ef4f 67subdirectory, not the whole GDB package. This leads to build errors
eaec4d85
MC
68such as:
69
70 make: *** No rule to make target `../bfd/bfd.h', needed by `gdb.o'. Stop.
71
72 If you get other compiler errors during this stage, see the `Reporting
aba7b4b6 73Bugs' section below; there are a few known problems.
c906108c 74
7f0bd420
TT
75 GDB's `configure' script has many options to enable or disable
76different features or dependencies. These options are not generally
77known to the top-level `configure', so if you want to see a complete
78list of options, invoke the subdirectory `configure', like:
79
80 /berman/migchain/source/gdb-VERSION/gdb/configure --help
81
82 (Take note of how this differs from the invocation used to actually
83configure the build tree.)
84
85 GDB requires a C++11 compiler. If you do not have a
86C++11 compiler for your system, you may be able to download and install
34f47bc4 87the GNU CC compiler. It is available via anonymous FTP from the
30b50213 88directory `ftp://ftp.gnu.org/pub/gnu/gcc'. GDB also requires an ISO
1915ef4f 89C standard library. The GDB remote server, GDBserver, builds with some
30b50213 90non-ISO standard libraries - e.g. for Windows CE.
c906108c 91
7f0bd420
TT
92 GDB can optionally be built against various external libraries.
93These dependencies are described below in the "`configure options"
94section of this README.
2400729e 95
aba7b4b6
AC
96 GDB can be used as a cross-debugger, running on a machine of one
97type while debugging a program running on a machine of another type.
98See below.
c906108c
SS
99
100
101More Documentation
102******************
103
104 All the documentation for GDB comes as part of the machine-readable
aba7b4b6
AC
105distribution. The documentation is written in Texinfo format, which
106is a documentation system that uses a single source file to produce
107both on-line information and a printed manual. You can use one of the
108Info formatting commands to create the on-line version of the
109documentation and TeX (or `texi2roff') to typeset the printed version.
110
111 GDB includes an already formatted copy of the on-line Info version
112of this manual in the `gdb/doc' subdirectory. The main Info file is
16d6b4b7 113`gdb-VERSION/gdb/doc/gdb.info', and it refers to subordinate files
aba7b4b6
AC
114matching `gdb.info*' in the same directory. If necessary, you can
115print out these files, or read them with any editor; but they are
116easier to read using the `info' subsystem in GNU Emacs or the
117standalone `info' program, available as part of the GNU Texinfo
118distribution.
c906108c
SS
119
120 If you want to format these Info files yourself, you need one of the
121Info formatting programs, such as `texinfo-format-buffer' or
122`makeinfo'.
123
124 If you have `makeinfo' installed, and are in the top level GDB
16d6b4b7
NS
125source directory (`gdb-VERSION'), you can make the Info file by
126typing:
c906108c 127
34f47bc4
AC
128 cd gdb/doc
129 make info
c906108c
SS
130
131 If you want to typeset and print copies of this manual, you need
132TeX, a program to print its DVI output files, and `texinfo.tex', the
133Texinfo definitions file. This file is included in the GDB
16d6b4b7 134distribution, in the directory `gdb-VERSION/texinfo'.
c906108c
SS
135
136 TeX is a typesetting program; it does not print files directly, but
137produces output files called DVI files. To print a typeset document,
138you need a program to print DVI files. If your system has TeX
139installed, chances are it has such a program. The precise command to
140use depends on your system; `lpr -d' is common; another (for PostScript
141devices) is `dvips'. The DVI print command may require a file name
142without any extension or a `.dvi' extension.
143
144 TeX also requires a macro definitions file called `texinfo.tex'.
145This file tells TeX how to typeset a document written in Texinfo
146format. On its own, TeX cannot read, much less typeset a Texinfo file.
147 `texinfo.tex' is distributed with GDB and is located in the
16d6b4b7 148`gdb-VERSION/texinfo' directory.
c906108c
SS
149
150 If you have TeX and a DVI printer program installed, you can typeset
7a9dd1b2 151and print this manual. First switch to the `gdb' subdirectory of
16d6b4b7 152the main source directory (for example, to `gdb-VERSION/gdb') and then type:
c906108c 153
34f47bc4 154 make doc/gdb.dvi
966beb0f
EZ
155
156 If you prefer to have the manual in PDF format, type this from the
157`gdb/doc' subdirectory of the main source directory:
158
34f47bc4 159 make gdb.pdf
966beb0f
EZ
160
161For this to work, you will need the PDFTeX package to be installed.
c906108c
SS
162
163
164Installing GDB
165**************
166
167 GDB comes with a `configure' script that automates the process of
168preparing GDB for installation; you can then use `make' to build the
169`gdb' program.
170
171 The GDB distribution includes all the source code you need for GDB in
16d6b4b7 172a single directory. That directory contains:
c906108c 173
16d6b4b7 174`gdb-VERSION/{COPYING,COPYING.LIB}'
c906108c
SS
175 Standard GNU license files. Please read them.
176
16d6b4b7 177`gdb-VERSION/bfd'
c906108c
SS
178 source for the Binary File Descriptor library
179
16d6b4b7 180`gdb-VERSION/config*'
c906108c
SS
181 script for configuring GDB, along with other support files
182
16d6b4b7 183`gdb-VERSION/gdb'
c906108c
SS
184 the source specific to GDB itself
185
16d6b4b7 186`gdb-VERSION/include'
c906108c
SS
187 GNU include files
188
16d6b4b7 189`gdb-VERSION/libiberty'
c906108c
SS
190 source for the `-liberty' free software library
191
16d6b4b7 192`gdb-VERSION/opcodes'
c906108c
SS
193 source for the library of opcode tables and disassemblers
194
16d6b4b7 195`gdb-VERSION/readline'
c906108c 196 source for the GNU command-line interface
7a292a7a
SS
197 NOTE: The readline library is compiled for use by GDB, but will
198 not be installed on your system when "make install" is issued.
c906108c 199
16d6b4b7 200`gdb-VERSION/sim'
c906108c
SS
201 source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
202
16d6b4b7 203`gdb-VERSION/texinfo'
c906108c
SS
204 The `texinfo.tex' file, which you need in order to make a printed
205 manual using TeX.
206
16d6b4b7 207`gdb-VERSION/etc'
c906108c
SS
208 Coding standards, useful files for editing GDB, and other
209 miscellanea.
210
c63ce875
EZ
211 Note: the following instructions are for building GDB on Unix or
212Unix-like systems. Instructions for building with DJGPP for
213MS-DOS/MS-Windows are in the file gdb/config/djgpp/README.
c906108c
SS
214
215 The simplest way to configure and build GDB is to run `configure'
16d6b4b7 216from the `gdb-VERSION' directory.
c906108c 217
16d6b4b7 218 First switch to the `gdb-VERSION' source directory if you are
c906108c
SS
219not already in it; then run `configure'.
220
221 For example:
222
16d6b4b7 223 cd gdb-VERSION
34f47bc4
AC
224 ./configure
225 make
c906108c
SS
226
227 Running `configure' followed by `make' builds the `bfd',
228`readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
229The configured source files, and the binaries, are left in the
230corresponding source directories.
231
232 `configure' is a Bourne-shell (`/bin/sh') script; if your system
233does not recognize this automatically when you run a different shell,
234you may need to run `sh' on it explicitly:
235
34f47bc4 236 sh configure
c906108c
SS
237
238 If you run `configure' from a directory that contains source
16d6b4b7
NS
239directories for multiple libraries or programs, `configure' creates
240configuration files for every directory level underneath (unless
241you tell it not to, with the `--norecursion' option).
c906108c
SS
242
243 You can install `gdb' anywhere; it has no hardwired paths. However,
244you should make sure that the shell on your path (named by the `SHELL'
245environment variable) is publicly readable. Remember that GDB uses the
246shell to start your program--some systems refuse to let GDB debug child
247processes whose programs are not readable.
248
249
250Compiling GDB in another directory
251==================================
252
253 If you want to run GDB versions for several host or target machines,
254you need a different `gdb' compiled for each combination of host and
255target. `configure' is designed to make this easy by allowing you to
256generate each configuration in a separate subdirectory, rather than in
257the source directory. If your `make' program handles the `VPATH'
258feature correctly (GNU `make' and SunOS 'make' are two that should),
259running `make' in each of these directories builds the `gdb' program
260specified there.
261
262 To build `gdb' in a separate directory, run `configure' with the
263`--srcdir' option to specify where to find the source. (You also need
264to specify a path to find `configure' itself from your working
265directory. If the path to `configure' would be the same as the
266argument to `--srcdir', you can leave out the `--srcdir' option; it
267will be assumed.)
268
16d6b4b7 269 For example, you can build GDB in a separate
c906108c
SS
270directory for a Sun 4 like this:
271
16d6b4b7 272 cd gdb-VERSION
c906108c
SS
273 mkdir ../gdb-sun4
274 cd ../gdb-sun4
16d6b4b7 275 ../gdb-VERSION/configure
c906108c
SS
276 make
277
278 When `configure' builds a configuration using a remote source
279directory, it creates a tree for the binaries with the same structure
280(and using the same names) as the tree under the source directory. In
281the example, you'd find the Sun 4 library `libiberty.a' in the
282directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
283
284 One popular reason to build several GDB configurations in separate
285directories is to configure GDB for cross-compiling (where GDB runs on
286one machine--the host--while debugging programs that run on another
287machine--the target). You specify a cross-debugging target by giving
288the `--target=TARGET' option to `configure'.
289
290 When you run `make' to build a program or library, you must run it
291in a configured directory--whatever directory you were in when you
292called `configure' (or one of its subdirectories).
293
294 The `Makefile' that `configure' generates in each source directory
295also runs recursively. If you type `make' in a source directory such
16d6b4b7
NS
296as `gdb-VERSION' (or in a separate configured directory configured with
297`--srcdir=PATH/gdb-VERSION'), you will build all the required libraries,
c906108c
SS
298and then build GDB.
299
300 When you have multiple hosts or targets configured in separate
301directories, you can run `make' on them in parallel (for example, if
302they are NFS-mounted on each of the hosts); they will not interfere
303with each other.
304
305
306Specifying names for hosts and targets
307======================================
308
309 The specifications used for hosts and targets in the `configure'
310script are based on a three-part naming scheme, but some short
311predefined aliases are also supported. The full naming scheme encodes
312three pieces of information in the following pattern:
313
314 ARCHITECTURE-VENDOR-OS
315
316 For example, you can use the alias `sun4' as a HOST argument or in a
317`--target=TARGET' option. The equivalent full name is
318`sparc-sun-sunos4'.
319
320 The `configure' script accompanying GDB does not provide any query
321facility to list all supported host and target names or aliases.
322`configure' calls the Bourne shell script `config.sub' to map
323abbreviations to full names; you can read the script, if you wish, or
324you can use it to test your guesses on abbreviations--for example:
325
326 % sh config.sub sun4
327 sparc-sun-sunos4.1.1
328 % sh config.sub sun3
329 m68k-sun-sunos4.1.1
330 % sh config.sub decstation
331 mips-dec-ultrix4.2
332 % sh config.sub hp300bsd
333 m68k-hp-bsd
334 % sh config.sub i386v
335 i386-pc-sysv
336 % sh config.sub i786v
337 Invalid configuration `i786v': machine `i786v' not recognized
338
16d6b4b7 339`config.sub' is also distributed in the GDB source directory.
c906108c
SS
340
341
342`configure' options
343===================
344
345 Here is a summary of the `configure' options and arguments that are
346most often useful for building GDB. `configure' also has several other
7f0bd420
TT
347options not listed here. There are many options to gdb's `configure'
348script, some of which are only useful in special situation.
349*note : (autoconf.info)Running configure scripts, for a full
350explanation of `configure'.
c906108c
SS
351
352 configure [--help]
353 [--prefix=DIR]
354 [--srcdir=PATH]
c906108c
SS
355 [--target=TARGET]
356 [--host=HOST]
357 [HOST]
358
359You may introduce options with a single `-' rather than `--' if you
7f0bd420
TT
360prefer; but you may abbreviate option names if you use `--'. Some
361more obscure GDB `configure' options are not listed here.
c906108c
SS
362
363`--help'
364 Display a quick summary of how to invoke `configure'.
365
366`-prefix=DIR'
367 Configure the source to install programs and files under directory
368 `DIR'.
369
370`--srcdir=PATH'
371 *Warning: using this option requires GNU `make', or another `make'
372 that compatibly implements the `VPATH' feature.*
373 Use this option to make configurations in directories separate
374 from the GDB source directories. Among other things, you can use
375 this to build (or maintain) several configurations simultaneously,
376 in separate directories. `configure' writes configuration
377 specific files in the current directory, but arranges for them to
378 use the source in the directory PATH. `configure' will create
379 directories under the working directory in parallel to the source
380 directories below PATH.
381
70926f63
EZ
382`--host=HOST'
383 Configure GDB to run on the specified HOST.
384
385 There is no convenient way to generate a list of all available
386 hosts.
387
388`HOST ...'
389 Same as `--host=HOST'. If you omit this, GDB will guess; it's
390 quite accurate.
391
c906108c
SS
392`--target=TARGET'
393 Configure GDB for cross-debugging programs running on the specified
394 TARGET. Without this option, GDB is configured to debug programs
395 that run on the same machine (HOST) as GDB itself.
396
397 There is no convenient way to generate a list of all available
398 targets.
399
7f0bd420
TT
400`--enable-targets=TARGET,TARGET,...'
401`--enable-targets=all`
402 Configure GDB for cross-debugging programs running on the
403 specified list of targets. The special value `all' configures
404 GDB for debugging programs running on any target it supports.
405
b14b1491
TT
406`--with-gdb-datadir=PATH'
407 Set the GDB-specific data directory. GDB will look here for
408 certain supporting files or scripts. This defaults to the `gdb'
409 subdirectory of `datadir' (which can be set using `--datadir').
410
70926f63
EZ
411`--with-relocated-sources=DIR'
412 Sets up the default source path substitution rule so that
413 directory names recorded in debug information will be
414 automatically adjusted for any directory under DIR. DIR should
415 be a subdirectory of GDB's configured prefix, the one mentioned
416 in the `--prefix' or `--exec-prefix' options to configure. This
417 option is useful if GDB is supposed to be moved to a different
418 place after it is built.
419
420`--enable-64-bit-bfd'
421 Enable 64-bit support in BFD on 32-bit hosts.
422
423`--disable-gdbmi'
424 Build GDB without the GDB/MI machine interface.
425
426`--enable-tui'
427 Build GDB with the text-mode full-screen user interface (TUI).
428 Requires a curses library (ncurses and cursesX are also
429 supported).
430
7f0bd420
TT
431`--with-curses'
432 Use the curses library instead of the termcap library, for
433 text-mode terminal operations.
70926f63 434
0d79cdc4
AM
435`--with-debuginfod'
436 Build GDB with libdebuginfod, the debuginfod client library. Used
437 to automatically fetch source files and separate debug files from
438 debuginfod servers using the associated executable's build ID.
439 Enabled by default if libdebuginfod is installed and found at
440 configure time. debuginfod is packaged with elfutils, starting
441 with version 0.178. You can get the latest version from
442 'https://sourceware.org/elfutils/'.
443
05e7c244
JK
444`--with-libunwind-ia64'
445 Use the libunwind library for unwinding function call stack on ia64
446 target platforms.
447 See http://www.nongnu.org/libunwind/index.html for details.
70926f63 448
70926f63
EZ
449`--with-system-readline'
450 Use the readline library installed on the host, rather than the
86c6b807
TT
451 library supplied as part of GDB. Readline 7 or newer is required;
452 this is enforced by the build system.
70926f63 453
7f0bd420
TT
454`--with-system-zlib
455 Use the zlib library installed on the host, rather than the
a95746f9 456 library supplied as part of GDB.
7f0bd420 457
70926f63 458`--with-expat'
7f0bd420
TT
459 Build GDB with Expat, a library for XML parsing. (Done by
460 default if libexpat is installed and found at configure time.)
461 This library is used to read XML files supplied with GDB. If it
462 is unavailable, some features, such as remote protocol memory
463 maps, target descriptions, and shared library lists, that are
464 based on XML files, will not be available in GDB. If your host
465 does not have libexpat installed, you can get the latest version
466 from `http://expat.sourceforge.net'.
467
468`--with-libiconv-prefix[=DIR]'
469 Build GDB with GNU libiconv, a character set encoding conversion
470 library. This is not done by default, as on GNU systems the
471 `iconv' that is built in to the C library is sufficient. If your
472 host does not have a working `iconv', you can get the latest
473 version of GNU iconv from `https://www.gnu.org/software/libiconv/'.
474
475 GDB's build system also supports building GNU libiconv as part of
476 the overall build. See the GDB manual instructions on how to do
477 this.
478
479`--with-lzma'
480 Build GDB with LZMA, a compression library. (Done by default if
481 liblzma is installed and found at configure time.) LZMA is used
482 by GDB's "mini debuginfo" feature, which is only useful on
483 platforms using the ELF object file format. If your host does
484 not have liblzma installed, you can get the latest version from
485 `https://tukaani.org/xz/'.
70926f63 486
2400729e 487`--with-mpfr'
7f0bd420
TT
488 Build GDB with GNU MPFR, a library for multiple-precision
489 floating-point computation with correct rounding. (Done by
490 default if GNU MPFR is installed and found at configure time.)
491 This library is used to emulate target floating-point arithmetic
492 during expression evaluation when the target uses different
493 floating-point formats than the host. If GNU MPFR is not
494 available, GDB will fall back to using host floating-point
495 arithmetic. If your host does not have GNU MPFR installed, you
496 can get the latest version from `http://www.mpfr.org'.
497
498`--with-python[=PYTHON]'
70926f63
EZ
499 Build GDB with Python scripting support. (Done by default if
500 libpython is present and found at configure time.) Python makes
501 GDB scripting much more powerful than the restricted CLI
502 scripting language. If your host does not have Python installed,
7f0bd420 503 you can find it on `http://www.python.org/download/'. The oldest
9a351667 504 version of Python supported by GDB is 2.6. The optional argument
7f0bd420
TT
505 PYTHON is used to find the Python headers and libraries. It can
506 be either the name of a Python executable, or the name of the
507 directory in which Python is installed.
508
7f0bd420
TT
509`--with-guile[=GUILE]'
510 Build GDB with GNU Guile scripting support. (Done by default if
511 libguile is present and found at configure time.) If your host
512 does not have Guile installed, you can find it at
513 `https://www.gnu.org/software/guile/'. The optional argument
514 GUILE can be a version number, which will cause `configure' to
515 try to use that version of Guile; or the file name of a
516 `pkg-config' executable, which will be queried to find the
517 information needed to compile and link against Guile.
70926f63 518
9a351667
CB
519`--enable-source-highlight'
520 When printing source code, use source highlighting. This requires
521 libsource-highlight to be installed and is enabled by default
522 if the library is found.
523
524`--with-xxhash'
525 Use libxxhash for hashing. This has no user-visible effect but
526 speeds up various GDB operations such as symbol loading. Enabled
527 by default if libxxhash is found.
528
70926f63
EZ
529`--without-included-regex'
530 Don't use the regex library included with GDB (as part of the
531 libiberty library). This is the default on hosts with version 2
532 of the GNU C library.
533
534`--with-sysroot=DIR'
535 Use DIR as the default system root directory for libraries whose
536 file names begin with `/lib' or `/usr/lib'. (The value of DIR
537 can be modified at run time by using the "set sysroot" command.)
538 If DIR is under the GDB configured prefix (set with `--prefix' or
539 `--exec-prefix' options), the default system root will be
540 automatically adjusted if and when GDB is moved to a different
541 location.
542
543`--with-system-gdbinit=FILE'
544 Configure GDB to automatically load a system-wide init file.
545 FILE should be an absolute file name. If FILE is in a directory
546 under the configured prefix, and GDB is moved to another location
547 after being built, the location of the system-wide init file will
548 be adjusted accordingly.
549
9a351667
CB
550`--with-system-gdbinit-dir=DIR'
551 Configure GDB to automatically load system-wide init files from
552 a directory. Files with extensions `.gdb', `.py' (if Python
553 support is enabled) and `.scm' (if Guile support is enabled) are
554 supported. DIR should be an absolute directory name. If DIR is
555 in a directory under the configured prefix, and GDB is moved to
556 another location after being built, the location of the system-
557 wide init directory will be adjusted accordingly.
558
7f0bd420
TT
559`--enable-build-warnings'
560 When building the GDB sources, ask the compiler to warn about any
561 code which looks even vaguely suspicious. It passes many
562 different warning flags, depending on the exact version of the
563 compiler you are using.
564
565`--enable-werror'
566 Treat compiler warnings as werrors. It adds the -Werror flag to
567 the compiler, which will fail the compilation if the compiler
568 outputs any warning messages.
569
f35d5ade
TT
570`--enable-ubsan'
571 Enable the GCC undefined behavior sanitizer. By default this is
572 disabled in GDB releases, but enabled when building from git.
573 The undefined behavior sanitizer checks for C++ undefined
574 behavior. It has a performance cost, so if you are looking at
575 GDB's performance, you should disable it.
576
8ecfd7bd
SDJ
577`--enable-unit-tests[=yes|no]'
578 Enable (i.e., include) support for unit tests when compiling GDB
579 and GDBServer. Note that if this option is not passed, GDB will
580 have selftests if it is a development build, and will *not* have
581 selftests if it is a non-development build.
582
c906108c 583`configure' accepts other options, for compatibility with configuring
7f0bd420 584other GNU tools recursively.
c906108c
SS
585
586
c906108c
SS
587Remote debugging
588=================
589
aba7b4b6
AC
590 The files m68k-stub.c, i386-stub.c, and sparc-stub.c are examples
591of remote stubs to be used with remote.c. They are designed to run
592standalone on an m68k, i386, or SPARC cpu and communicate properly
593with the remote.c stub over a serial line.
c906108c 594
919adfe8 595 The directory gdbserver/ contains `gdbserver', a program that
1915ef4f 596allows remote debugging for Unix applications. GDBserver is only
919adfe8 597supported for some native configurations.
7f0bd420 598
919adfe8 599 The file gdbserver/README includes further notes on GDBserver; in
1915ef4f
PA
600particular, it explains how to build GDBserver for cross-debugging
601(where GDBserver runs on the target machine, which is of a different
92726479 602architecture than the host machine running GDB).
c906108c 603
c906108c 604
129188f6
AC
605Reporting Bugs in GDB
606=====================
607
608 There are several ways of reporting bugs in GDB. The prefered
609method is to use the World Wide Web:
610
611 http://www.gnu.org/software/gdb/bugs/
612
613As an alternative, the bug report can be submitted, via e-mail, to the
614address "bug-gdb@gnu.org".
c906108c 615
16d6b4b7
NS
616 When submitting a bug, please include the GDB version number, and
617how you configured it (e.g., "sun4" or "mach386 host,
7f0bd420 618i586-intel-synopsys target"). Since GDB supports so many
aba7b4b6 619different configurations, it is important that you be precise about
7f0bd420
TT
620this. The simplest way to do this is to include the output from these
621commands:
622
623 % gdb --version
624 % gdb --config
c906108c 625
129188f6
AC
626 For more information on how/whether to report bugs, see the
627Reporting Bugs chapter of the GDB manual (gdb/doc/gdb.texinfo).
c906108c 628
aba7b4b6
AC
629
630Graphical interface to GDB -- X Windows, MS Windows
631==========================
c906108c 632
aba7b4b6
AC
633 Several graphical interfaces to GDB are available. You should
634check:
c906108c 635
7f0bd420 636 https://sourceware.org/gdb/wiki/GDB%20Front%20Ends
c906108c 637
aba7b4b6 638for an up-to-date list.
c906108c 639
aba7b4b6 640 Emacs users will very likely enjoy the Grand Unified Debugger mode;
f032fb6e 641try typing `M-x gdb RET'.
c906108c
SS
642
643
644Writing Code for GDB
645=====================
646
0a7cfe2c
SS
647 There is information about writing code for GDB in the file
648`CONTRIBUTE' and at the website:
649
650 http://www.gnu.org/software/gdb/
651
652in particular in the wiki.
c906108c 653
aba7b4b6 654 If you are pondering writing anything but a short patch, especially
0a7cfe2c
SS
655take note of the information about copyrights and copyright assignment.
656It can take quite a while to get all the paperwork done, so
c906108c
SS
657we encourage you to start that process as soon as you decide you are
658planning to work on something, or at least well ahead of when you
659think you will be ready to submit the patches.
660
661
662GDB Testsuite
663=============
664
aba7b4b6
AC
665 Included with the GDB distribution is a DejaGNU based testsuite
666that can either be used to test your newly built GDB, or for
667regression testing a GDB with local modifications.
668
669 Running the testsuite requires the prior installation of DejaGNU,
670which is generally available via ftp. The directory
47b95330
AC
671ftp://sources.redhat.com/pub/dejagnu/ will contain a recent snapshot.
672Once DejaGNU is installed, you can run the tests in one of the
673following ways:
c906108c 674
16d6b4b7 675 (1) cd gdb-VERSION
aba7b4b6
AC
676 make check-gdb
677
678or
c906108c 679
16d6b4b7 680 (2) cd gdb-VERSION/gdb
c906108c
SS
681 make check
682
683or
684
16d6b4b7 685 (3) cd gdb-VERSION/gdb/testsuite
c906108c
SS
686 make site.exp (builds the site specific file)
687 runtest -tool gdb GDB=../gdb (or GDB=<somepath> as appropriate)
688
6bc80edc
TT
689When using a `make'-based method, you can use the Makefile variable
690`RUNTESTFLAGS' to pass flags to `runtest', e.g.:
691
692 make RUNTESTFLAGS=--directory=gdb.cp check
693
694If you use GNU make, you can use its `-j' option to run the testsuite
695in parallel. This can greatly reduce the amount of time it takes for
696the testsuite to run. In this case, if you set `RUNTESTFLAGS' then,
697by default, the tests will be run serially even under `-j'. You can
698override this and force a parallel run by setting the `make' variable
699`FORCE_PARALLEL' to any non-empty value. Note that the parallel `make
700check' assumes that you want to run the entire testsuite, so it is not
701compatible with some dejagnu options, like `--directory'.
702
aba7b4b6
AC
703The last method gives you slightly more control in case of problems
704with building one or more test executables or if you are using the
705testsuite `standalone', without it being part of the GDB source tree.
c906108c
SS
706
707See the DejaGNU documentation for further details.
708
3c36c0af
JB
709
710Copyright and License Notices
711=============================
712
713Most files maintained by the GDB Project contain a copyright notice
714as well as a license notice, usually at the start of the file.
715
716To reduce the length of copyright notices, consecutive years in the
717copyright notice can be combined into a single range. For instance,
718the following list of copyright years...
719
720 1986, 1988, 1989, 1991-1993, 1999, 2000, 2007, 2008, 2009, 2010, 2011
721
722... is abbreviated into:
723
724 1986, 1988-1989, 1991-1993, 1999-2000, 2007-2011
725
726Every year of each range, inclusive, is a copyrightable year that
727could be listed individually.
728
c906108c
SS
729\f
730(this is for editing this file with GNU emacs)
731Local Variables:
732mode: text
733End:
This page took 1.224427 seconds and 4 git commands to generate.