Automatic date update in version.in
[binutils-gdb.git] / gdb / README
blob763089bb02d7b2bf2d437862961b50ce700d7c8b
1                      README for GDB release
3 This is GDB, the GNU source-level debugger.
5 A summary of new features is in the file `gdb/NEWS'.
7 Check the GDB home page at http://www.gnu.org/software/gdb/ for up to
8 date release information, mailing list links and archives, etc.
10 GDB's bug tracking data base can be found at
11 http://www.gnu.org/software/gdb/bugs/
13 Unpacking and Installation -- quick overview
14 ==========================
16    The release is provided as a gzipped tar file called
17 'gdb-VERSION.tar.gz', where VERSION is the version of GDB.
19    The GDB debugger sources, the generic GNU include
20 files, the BFD ("binary file description") library, the readline
21 library, and other libraries all have directories of their own
22 underneath the gdb-VERSION directory.  The idea is that a variety of GNU
23 tools can share a common copy of these things.  Be aware of variation
24 over time--for example don't try to build GDB with a copy of bfd from
25 a release other than the GDB release (such as a binutils release),
26 especially if the releases are more than a few weeks apart.
27 Configuration scripts and makefiles exist to cruise up and down this
28 directory tree and automatically build all the pieces in the right
29 order.
31    When you unpack the gdb-VERSION.tar.gz file, it will create a
32 source directory called `gdb-VERSION'.
34 You can build GDB right in the source directory:
36       cd gdb-VERSION
37       ./configure --prefix=/usr/local   (or wherever you want)
38       make all install
40 However, we recommend that an empty directory be used instead.
41 This way you do not clutter your source tree with binary files
42 and will be able to create different builds with different
43 configuration options.
45 You can build GDB in any empty build directory:
47       mkdir build
48       cd build
49       <full path to your sources>/gdb-VERSION/configure [etc...]
50       make all install
52 (Building GDB with DJGPP tools for MS-DOS/MS-Windows is slightly
53 different; see the file gdb-VERSION/gdb/config/djgpp/README for details.)
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
57 argument, e.g., `./configure sun4' or `./configure decstation'.
59    Make sure that your 'configure' line ends in 'gdb-VERSION/configure':
61       /berman/migchain/source/gdb-VERSION/configure      # RIGHT
62       /berman/migchain/source/gdb-VERSION/gdb/configure  # WRONG
64    The GDB package contains several subdirectories, such as 'gdb',
65 'bfd', and 'readline'.  If your 'configure' line ends in
66 'gdb-VERSION/gdb/configure', then you are configuring only the gdb
67 subdirectory, not the whole GDB package.  This leads to build errors
68 such as:
70       make: *** No rule to make target `../bfd/bfd.h', needed by `gdb.o'.  Stop.
72    If you get other compiler errors during this stage, see the `Reporting
73 Bugs' section below; there are a few known problems.
75    GDB's `configure' script has many options to enable or disable
76 different features or dependencies.  These options are not generally
77 known to the top-level `configure', so if you want to see a complete
78 list of options, invoke the subdirectory `configure', like:
80       /berman/migchain/source/gdb-VERSION/gdb/configure --help
82    (Take note of how this differs from the invocation used to actually
83 configure the build tree.)
85    GDB requires a C++17 compiler.  If you do not have a
86 C++17 compiler for your system, you may be able to download and install
87 the GNU CC compiler.  It is available via anonymous FTP from the
88 directory `ftp://ftp.gnu.org/pub/gnu/gcc'.  GDB also requires an ISO
89 C standard library.  The GDB remote server, GDBserver, builds with some
90 non-ISO standard libraries - e.g. for Windows CE.
92    GDB can optionally be built against various external libraries.
93 These dependencies are described below in the "`configure options"
94 section of this README.
96    GDB can be used as a cross-debugger, running on a machine of one
97 type while debugging a program running on a machine of another type.
98 See below.
101 More Documentation
102 ******************
104    All the documentation for GDB comes as part of the machine-readable
105 distribution.  The documentation is written in Texinfo format, which
106 is a documentation system that uses a single source file to produce
107 both on-line information and a printed manual.  You can use one of the
108 Info formatting commands to create the on-line version of the
109 documentation and TeX (or `texi2roff') to typeset the printed version.
111    GDB includes an already formatted copy of the on-line Info version
112 of this manual in the `gdb/doc' subdirectory.  The main Info file is
113 `gdb-VERSION/gdb/doc/gdb.info', and it refers to subordinate files
114 matching `gdb.info*' in the same directory.  If necessary, you can
115 print out these files, or read them with any editor; but they are
116 easier to read using the `info' subsystem in GNU Emacs or the
117 standalone `info' program, available as part of the GNU Texinfo
118 distribution.
120    If you want to format these Info files yourself, you need one of the
121 Info formatting programs, such as `texinfo-format-buffer' or
122 `makeinfo'.
124    If you have `makeinfo' installed, and are in the top level GDB
125 source directory (`gdb-VERSION'), you can make the Info file by
126 typing:
128       cd gdb/doc
129       make info
131    If you want to typeset and print copies of this manual, you need
132 TeX, a program to print its DVI output files, and `texinfo.tex', the
133 Texinfo definitions file.  This file is included in the GDB
134 distribution, in the directory `gdb-VERSION/texinfo'.
136    TeX is a typesetting program; it does not print files directly, but
137 produces output files called DVI files.  To print a typeset document,
138 you need a program to print DVI files.  If your system has TeX
139 installed, chances are it has such a program.  The precise command to
140 use depends on your system; `lpr -d' is common; another (for PostScript
141 devices) is `dvips'.  The DVI print command may require a file name
142 without any extension or a `.dvi' extension.
144    TeX also requires a macro definitions file called `texinfo.tex'.
145 This file tells TeX how to typeset a document written in Texinfo
146 format.  On its own, TeX cannot read, much less typeset a Texinfo file.
147  `texinfo.tex' is distributed with GDB and is located in the
148 `gdb-VERSION/texinfo' directory.
150    If you have TeX and a DVI printer program installed, you can typeset
151 and print this manual.  First switch to the `gdb' subdirectory of
152 the main source directory (for example, to `gdb-VERSION/gdb') and then type:
154       make doc/gdb.dvi
156    If you prefer to have the manual in PDF format, type this from the
157 `gdb/doc' subdirectory of the main source directory:
159       make gdb.pdf
161 For this to work, you will need the PDFTeX package to be installed.
164 Installing GDB
165 **************
167    GDB comes with a `configure' script that automates the process of
168 preparing GDB for installation; you can then use `make' to build the
169 `gdb' program.
171    The GDB distribution includes all the source code you need for GDB in
172 a single directory.  That directory contains:
174 `gdb-VERSION/{COPYING,COPYING.LIB}'
175      Standard GNU license files.  Please read them.
177 `gdb-VERSION/bfd'
178      source for the Binary File Descriptor library
180 `gdb-VERSION/config*'
181      script for configuring GDB, along with other support files
183 `gdb-VERSION/gdb'
184      the source specific to GDB itself
186 `gdb-VERSION/include'
187      GNU include files
189 `gdb-VERSION/libiberty'
190      source for the `-liberty' free software library
192 `gdb-VERSION/opcodes'
193      source for the library of opcode tables and disassemblers
195 `gdb-VERSION/readline'
196      source for the GNU command-line interface
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.
200 `gdb-VERSION/sim'
201      source for some simulators (ARM, D10V, SPARC, M32R, MIPS, PPC, V850, etc)
203 `gdb-VERSION/texinfo'
204      The `texinfo.tex' file, which you need in order to make a printed
205      manual using TeX.
207 `gdb-VERSION/etc'
208      Coding standards, useful files for editing GDB, and other
209      miscellanea.
211    Note: the following instructions are for building GDB on Unix or
212 Unix-like systems.  Instructions for building with DJGPP for
213 MS-DOS/MS-Windows are in the file gdb/config/djgpp/README.
215    The simplest way to configure and build GDB is to run `configure'
216 from the `gdb-VERSION' directory.
218    First switch to the `gdb-VERSION' source directory if you are
219 not already in it; then run `configure'.
221    For example:
223       cd gdb-VERSION
224       ./configure
225       make
227    Running `configure' followed by `make' builds the `bfd',
228 `readline', `mmalloc', and `libiberty' libraries, then `gdb' itself.
229 The configured source files, and the binaries, are left in the
230 corresponding source directories.
232    `configure' is a Bourne-shell (`/bin/sh') script; if your system
233 does not recognize this automatically when you run a different shell,
234 you may need to run `sh' on it explicitly:
236       sh configure
238    If you run `configure' from a directory that contains source
239 directories for multiple libraries or programs, `configure' creates
240 configuration files for every directory level underneath (unless
241 you tell it not to, with the `--norecursion' option).
243    You can install `gdb' anywhere; it has no hardwired paths. However,
244 you should make sure that the shell on your path (named by the `SHELL'
245 environment variable) is publicly readable.  Remember that GDB uses the
246 shell to start your program--some systems refuse to let GDB debug child
247 processes whose programs are not readable.
250 Compiling GDB in another directory
251 ==================================
253    If you want to run GDB versions for several host or target machines,
254 you need a different `gdb' compiled for each combination of host and
255 target.  `configure' is designed to make this easy by allowing you to
256 generate each configuration in a separate subdirectory, rather than in
257 the source directory.  If your `make' program handles the `VPATH'
258 feature correctly (GNU `make' and SunOS 'make' are two that should),
259 running `make' in each of these directories builds the `gdb' program
260 specified there.
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
264 to specify a path to find `configure' itself from your working
265 directory.  If the path to `configure' would be the same as the
266 argument to `--srcdir', you can leave out the `--srcdir' option; it
267 will be assumed.)
269    For example, you can build GDB in a separate
270 directory for a Sun 4 like this:
272      cd gdb-VERSION
273      mkdir ../gdb-sun4
274      cd ../gdb-sun4
275      ../gdb-VERSION/configure
276      make
278    When `configure' builds a configuration using a remote source
279 directory, 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
281 the example, you'd find the Sun 4 library `libiberty.a' in the
282 directory `gdb-sun4/libiberty', and GDB itself in `gdb-sun4/gdb'.
284    One popular reason to build several GDB configurations in separate
285 directories is to configure GDB for cross-compiling (where GDB runs on
286 one machine--the host--while debugging programs that run on another
287 machine--the target).  You specify a cross-debugging target by giving
288 the `--target=TARGET' option to `configure'.
290    When you run `make' to build a program or library, you must run it
291 in a configured directory--whatever directory you were in when you
292 called `configure' (or one of its subdirectories).
294    The `Makefile' that `configure' generates in each source directory
295 also runs recursively.  If you type `make' in a source directory such
296 as `gdb-VERSION' (or in a separate configured directory configured with
297 `--srcdir=PATH/gdb-VERSION'), you will build all the required libraries,
298 and then build GDB.
300    When you have multiple hosts or targets configured in separate
301 directories, you can run `make' on them in parallel (for example, if
302 they are NFS-mounted on each of the hosts); they will not interfere
303 with each other.
306 Specifying names for hosts and targets
307 ======================================
309    The specifications used for hosts and targets in the `configure'
310 script are based on a three-part naming scheme, but some short
311 predefined aliases are also supported.  The full naming scheme encodes
312 three pieces of information in the following pattern:
314      ARCHITECTURE-VENDOR-OS
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'.
320    The `configure' script accompanying GDB does not provide any query
321 facility to list all supported host and target names or aliases.
322 `configure' calls the Bourne shell script `config.sub' to map
323 abbreviations to full names; you can read the script, if you wish, or
324 you can use it to test your guesses on abbreviations--for example:
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
339 `config.sub' is also distributed in the GDB source directory.
342 `configure' options
343 ===================
345    Here is a summary of the `configure' options and arguments that are
346 most often useful for building GDB.  `configure' also has several other
347 options not listed here.  There are many options to gdb's `configure'
348 script, some of which are only useful in special situation.
349 *note : (autoconf.info)Running configure scripts, for a full
350 explanation of `configure'.
352      configure [--help]
353                [--prefix=DIR]
354                [--srcdir=PATH]
355                [--target=TARGET]
356                [--host=HOST]
357                [HOST]
359 You may introduce options with a single `-' rather than `--' if you
360 prefer; but you may abbreviate option names if you use `--'.  Some
361 more obscure GDB `configure' options are not listed here.
363 `--help'
364      Display a quick summary of how to invoke `configure'.
366 `-prefix=DIR'
367      Configure the source to install programs and files under directory
368      `DIR'.
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.
382 `--host=HOST'
383      Configure GDB to run on the specified HOST.
385      There is no convenient way to generate a list of all available
386      hosts.
388 `HOST ...'
389      Same as `--host=HOST'.  If you omit this, GDB will guess; it's
390      quite accurate.
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.
397      There is no convenient way to generate a list of all available
398      targets.
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.
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').
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.
420 `--enable-64-bit-bfd'
421      Enable 64-bit support in BFD on 32-bit hosts.
423 `--disable-gdbmi'
424      Build GDB without the GDB/MI machine interface.
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).
431 `--with-curses'
432      Use the curses library instead of the termcap library, for
433      text-mode terminal operations.
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/'.
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.
449 `--with-system-readline'
450      Use the readline library installed on the host, rather than the
451      library supplied as part of GDB.  Readline 7 or newer is required;
452      this is enforced by the build system.
454 `--with-system-zlib
455      Use the zlib library installed on the host, rather than the
456      library supplied as part of GDB.
458 `--with-expat'
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'.
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/'.
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.
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/'.
487 `--with-gmp=DIR'
488 `--with-gmp-lib=LIBDIR'
489 `--with-gmp-include=INCDIR'
490      Build GDB using the GMP library installed at the directory DIR.
491      If your host does not have GMP installed, you can get the latest
492      version at `https://gmplib.org/'.
493      The `--with-gmp=gmpinstalldir` option is shorthand for
494      `--with-gmp-lib=gmpinstalldir/lib` and
495      `--with-gmp-include=gmpinstalldir/include`.
497 `--with-mpfr=DIR'
498 `--with-mpfr-lib=LIBDIR'
499 `--with-mpfr-include=INCDIR'
500      Build GDB using GNU MPFR installed at the directory DIR,
501      a library for multiple-precision floating-point computation
502      with correct rounding.
503      This library is used to emulate target floating-point arithmetic
504      during expression evaluation when the target uses different
505      floating-point formats than the host.
506      If your host does not have GNU MPFR installed, you
507      can get the latest version from `https://www.mpfr.org/'.
509      The `--with-mpfr=mpfrinstalldir` option is shorthand for
510      `--with-mpfr-lib=mpfrinstalldir/lib` and
511      `--with-mpfr-include=mpfrinstalldir/include`.
513 `--with-python[=PYTHON]'
514      Build GDB with Python scripting support.  (Done by default if
515      libpython is present and found at configure time.)  Python makes
516      GDB scripting much more powerful than the restricted CLI
517      scripting language.  If your host does not have Python installed,
518      you can find it on `http://www.python.org/download/'.  The oldest
519      version of Python supported by GDB is 3.2.  The optional argument
520      PYTHON is used to find the Python headers and libraries.  It can
521      be either the name of a Python executable, or the name of the
522      directory in which Python is installed.
524 `--with-guile[=GUILE]'
525      Build GDB with GNU Guile scripting support.  (Done by default if
526      libguile is present and found at configure time.)  If your host
527      does not have Guile installed, you can find it at
528      `https://www.gnu.org/software/guile/'.  The optional argument
529      GUILE can be a version number, which will cause `configure' to
530      try to use that version of Guile; or the file name of a
531      `pkg-config' executable, which will be queried to find the
532      information needed to compile and link against Guile.
534 `--enable-source-highlight'
535      When printing source code, use source highlighting.  This requires
536      libsource-highlight to be installed and is enabled by default
537      if the library is found.
539 `--with-xxhash'
540      Use libxxhash for hashing.  This has no user-visible effect but
541      speeds up various GDB operations such as symbol loading.  Enabled
542      by default if libxxhash is found.
544 `--with-amd-dbgapi=[auto,yes,no]'
545      Whether to use the amd-dbgapi library to support local debugging of
546      AMD GCN architecture GPUs.
548      When explicitly requesting support for an AMD GCN architecture through
549      `--enable-targets' or `--target', there is no need to use
550      `--with-amd-dbgapi': `configure' will automatically look for the
551      amd-dbgapi library and fail if not found.
553      When using --enable-targets=all, support for the AMD GCN architecture will
554      only be included if the amd-dbgapi is found.  `--with-amd-dbgapi=yes' can
555      be used to make it a failure if the amd-dbgapi library is not found.
556      `--with-amd-dbgapi=no' can be used to prevent looking for the amd-dbgapi
557      library altogether.
559 `--without-included-regex'
560      Don't use the regex library included with GDB (as part of the
561      libiberty library).  This is the default on hosts with version 2
562      of the GNU C library.
564 `--with-sysroot=DIR'
565      Use DIR as the default system root directory for libraries whose
566      file names begin with `/lib' or `/usr/lib'.  (The value of DIR
567      can be modified at run time by using the "set sysroot" command.)
568      If DIR is under the GDB configured prefix (set with `--prefix' or
569      `--exec-prefix' options), the default system root will be
570      automatically adjusted if and when GDB is moved to a different
571      location.
573 `--with-system-gdbinit=FILE'
574      Configure GDB to automatically load a system-wide init file.
575      FILE should be an absolute file name.  If FILE is in a directory
576      under the configured prefix, and GDB is moved to another location
577      after being built, the location of the system-wide init file will
578      be adjusted accordingly.
580 `--with-system-gdbinit-dir=DIR'
581      Configure GDB to automatically load system-wide init files from
582      a directory. Files with extensions `.gdb', `.py' (if Python
583      support is enabled) and `.scm' (if Guile support is enabled) are
584      supported.  DIR should be an absolute directory name.  If DIR is
585      in a directory under the configured prefix, and GDB is moved to
586      another location after being built, the location of the system-
587      wide init directory will be adjusted accordingly.
589 `--enable-build-warnings'
590      When building the GDB sources, ask the compiler to warn about any
591      code which looks even vaguely suspicious.  It passes many
592      different warning flags, depending on the exact version of the
593      compiler you are using.
595 `--enable-werror'
596      Treat compiler warnings as werrors.  It adds the -Werror flag to
597      the compiler, which will fail the compilation if the compiler
598      outputs any warning messages.
600 `--enable-ubsan'
601      Enable the GCC undefined behavior sanitizer.  By default this is
602      disabled in GDB releases, but enabled when building from git.
603      The undefined behavior sanitizer checks for C++ undefined
604      behavior.  It has a performance cost, so if you are looking at
605      GDB's performance, you should disable it.
607 `--enable-unit-tests[=yes|no]'
608      Enable (i.e., include) support for unit tests when compiling GDB
609      and GDBServer.  Note that if this option is not passed, GDB will
610      have selftests if it is a development build, and will *not* have
611      selftests if it is a non-development build.
613 `configure' accepts other options, for compatibility with configuring
614 other GNU tools recursively.
617 Remote debugging
618 =================
620    The files m68k-stub.c, i386-stub.c, and sparc-stub.c are examples
621 of remote stubs to be used with remote.c.  They are designed to run
622 standalone on an m68k, i386, or SPARC cpu and communicate properly
623 with the remote.c stub over a serial line.
625    The directory gdbserver/ contains `gdbserver', a program that
626 allows remote debugging for Unix applications.  GDBserver is only
627 supported for some native configurations.
629    The file gdbserver/README includes further notes on GDBserver; in
630 particular, it explains how to build GDBserver for cross-debugging
631 (where GDBserver runs on the target machine, which is of a different
632 architecture than the host machine running GDB).
635 Reporting Bugs in GDB
636 =====================
638    There are several ways of reporting bugs in GDB.  The preferred
639 method is to use the World Wide Web:
641       http://www.gnu.org/software/gdb/bugs/
643 As an alternative, the bug report can be submitted, via e-mail, to the
644 address "bug-gdb@gnu.org".
646    When submitting a bug, please include the GDB version number, and
647 how you configured it (e.g., "sun4" or "mach386 host,
648 i586-intel-synopsys target").  Since GDB supports so many
649 different configurations, it is important that you be precise about
650 this.  The simplest way to do this is to include the output from these
651 commands:
653       % gdb --version
654       % gdb --config
656    For more information on how/whether to report bugs, see the
657 Reporting Bugs chapter of the GDB manual (gdb/doc/gdb.texinfo).
660 Graphical interface to GDB -- X Windows, MS Windows
661 ==========================
663    Several graphical interfaces to GDB are available.  You should
664 check:
666         https://sourceware.org/gdb/wiki/GDB%20Front%20Ends
668 for an up-to-date list.
670    Emacs users will very likely enjoy the Grand Unified Debugger mode;
671 try typing `M-x gdb RET'.
674 Writing Code for GDB
675 =====================
677    There is information about writing code for GDB in the file
678 `CONTRIBUTE' and at the website:
680         http://www.gnu.org/software/gdb/
682 in particular in the wiki.
684    If you are pondering writing anything but a short patch, especially
685 take note of the information about copyrights and copyright assignment.
686 It can take quite a while to get all the paperwork done, so
687 we encourage you to start that process as soon as you decide you are
688 planning to work on something, or at least well ahead of when you
689 think you will be ready to submit the patches.
692 GDB Testsuite
693 =============
695    Included with the GDB distribution is a DejaGNU based testsuite
696 that can either be used to test your newly built GDB, or for
697 regression testing a GDB with local modifications.
699    Running the testsuite requires the prior installation of DejaGNU,
700 which is generally available via ftp.  The directory
701 ftp://sources.redhat.com/pub/dejagnu/ will contain a recent snapshot.
702 Once DejaGNU is installed, you can run the tests in one of the
703 following ways:
705   (1)   cd gdb-VERSION
706         make check-gdb
710   (2)   cd gdb-VERSION/gdb
711         make check
715   (3)   cd gdb-VERSION/gdb/testsuite
716         make site.exp   (builds the site specific file)
717         runtest -tool gdb GDB=../gdb    (or GDB=<somepath> as appropriate)
719 When using a `make'-based method, you can use the Makefile variable
720 `RUNTESTFLAGS' to pass flags to `runtest', e.g.:
722         make RUNTESTFLAGS=--directory=gdb.cp check
724 If you use GNU make, you can use its `-j' option to run the testsuite
725 in parallel.  This can greatly reduce the amount of time it takes for
726 the testsuite to run.  In this case, if you set `RUNTESTFLAGS' then,
727 by default, the tests will be run serially even under `-j'.  You can
728 override this and force a parallel run by setting the `make' variable
729 `FORCE_PARALLEL' to any non-empty value.  Note that the parallel `make
730 check' assumes that you want to run the entire testsuite, so it is not
731 compatible with some dejagnu options, like `--directory'.
733 The last method gives you slightly more control in case of problems
734 with building one or more test executables or if you are using the
735 testsuite `standalone', without it being part of the GDB source tree.
737 See the DejaGNU documentation for further details.
740 Copyright and License Notices
741 =============================
743 Most files maintained by the GDB Project contain a copyright notice
744 as well as a license notice, usually at the start of the file.
746 To reduce the length of copyright notices, consecutive years in the
747 copyright notice can be combined into a single range.  For instance,
748 the following list of copyright years...
750     1986, 1988, 1989, 1991-1993, 1999, 2000, 2007, 2008, 2009, 2010, 2011
752 ... is abbreviated into:
754     1986, 1988-1989, 1991-1993, 1999-2000, 2007-2011
756 Every year of each range, inclusive, is a copyrightable year that
757 could be listed individually.
760 (this is for editing this file with GNU emacs)
761 Local Variables:
762 mode: text
763 End: