README 28 KB

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