GDB: The GNU Project Debugger
[bugs]
[GDB Maintainers]
[contributing]
[current git]
[documentation]
[download]
[home]
[irc]
[links]
[mailing lists]
[news]
[schedule]
[song]
[wiki]
GDB: The GNU Project Debugger
What is GDB?
GDB, the GNU Project debugger, allows you to see what is going on
`inside' another program while it executes -- or what another program
was doing at the moment it crashed.
GDB can do four main kinds of things (plus other things in support
of these) to help you catch bugs in the act:
- Start your program, specifying anything that might affect its behavior.
- Make your program stop on specified conditions.
- Examine what has happened, when your program has stopped.
- Change things in your program, so you can experiment with
correcting the effects of one bug and go on to learn about another.
Those programs might be executing on the same machine as GDB (native),
on another machine (remote), or on a simulator. GDB can run on most
popular UNIX and Microsoft Windows variants, as well as on Mac OS X.
What Languages does GDB Support?
GDB supports the following languages (in alphabetical order):
- Ada
- Assembly
- C
- C++
- D
- Fortran
- Go
- Objective-C
- OpenCL
- Modula-2
- Pascal
- Rust
GDB version 8.1.1
Version 8.1.1 of GDB, the GNU
Debugger, is now available for download. See the ANNOUNCEMENT for details
including changes in this release.
An errata list (PROBLEMS) and documentation
are also available.
News
- July 31st, 2018: GDB 8.1.1 Released!
-
The latest version of GDB, version 8.1.1, is available for download.
This is a minor corrective release over GDB 8.1, fixing the following
issues:
- PR gdb/22824 (misleading description of new rbreak Python function in GDB 8.1 NEWS file)
- PR gdb/22849 (ctrl-c doesn't work in extended-remote)
- PR gdb/22907 ([Regression] gdbserver doesn't work with filename-only binaries)
- PR gdb/23028 (inconsistent disassemble of vcvtpd2dq)
- PR gdb/23053 (Fix -D_GLIBCXX_DEBUG gdb-add-index regression)
- PR gdb/23127 ([AArch64] GDB cannot be used for debugging software that uses high Virtual Addresses)
- PR server/23158 (gdbserver no longer functional on Windows)
- PR breakpoints/23210 ([8.1/8.2 Regression] Bogus Breakpoint address adjusted from 0xf7fe7dd3 to 0xfffffffff7fe7dd3)
- July 4th, 2018: GDB 8.2 branch created
-
The GDB 8.2 branch (gdb-8.2-branch) has been created.
To check out a copy of the branch use:
git clone --branch gdb-8.2-branch ssh://sourceware.org/git/binutils-gdb.git
- January 31st, 2018: GDB 8.1 Released!
-
The latest version of GDB, version 8.1, is available for download.
Changes in this release include:
- Breakpoints on C++ functions are now set on all scopes by default ("wild" matching);
- Support for inserting breakpoints on functions marked with C++ ABI tags;
- Target floating-point arithmetic emulation during expression evaluation (requires MPFR 3.1 or later);
- Various Python Scripting enhancements;
- Improved Rust support; in particular, Trait objects can now be inspected when debugging Rust code;
- GDB no longer makes assumptions about the type of symbols without debugging information to avoid producing erroneous and often confusing results;
- The 'enable' and 'disable' commands now accept a range of breakpoint locations;
- New 'starti' command to start the program at the first instruction;
- New 'rbreak' command to insert a number of breakpoints via a regular expression pattern (requires Python);
- The 'ptype' command now supports printing the offset and size of the fields in a struct;
- The 'gcore' command now supports dumping all the memory mappings ('-a' command-line option);
- New shortcuts for TUI Single-Key mode: 'i' for stepi, and 'o' for nexti;
- GDBserver enhancements:
- Support for transmitting environment variables to GDBserver;
- Support for starting inferior processes with a specified initial working directory;
- On Unix systems, support for globbing expansion and variable substitution of inferior command-line arguments;
- Various completion enhancements;
- The command used to compile and inject code with the 'compile' command is now configurable;
- New '--readnever' command-line option to speed the GDB startup when debugging information is not needed;
- Support for the following new native configurations:
- FreeBSD/aarch64 (aarch64*-*-freebsd*);
- FreeBSD/arm (arm*-*-freebsd*);
- Support for the following new targets:
- FreeBSD/aarch64 (aarch64*-*-freebsd*);
- FreeBSD/arm (arm*-*-freebsd*);
- OpenRISC ELF (or1k*-*-elf)
- Removed support for the following targets and native configurations:
- Solaris2/x86 (i?86-*-solaris2.[0-9]);
- Solaris2/sparc (sparc*-*-solaris2.[0-9]);
See the NEWS file for a more complete and detailed list of what this release includes.
- September 30, 2011: Release Mistakes in GDB Versions 6.0 - 7.3
-
A mistake has been detected in the release tar files for all
GDB releases from version 6.0 to version 7.3 (included). The mistake
has been corrected, and the FSF issued the following announcements:
- Nov 28, 2006: Reversible Debugging
-
The GDB maintainers are looking for contributors interested
in reversible debugging.
Late breaking information, such as recently added features, can be
found in the NEWS file in the gdb source tree. Old announcements are in the
news archive.
[bugs]
[GDB Maintainers]
[contributing]
[current git]
[documentation]
[download]
[home]
[irc]
[links]
[mailing lists]
[news]
[schedule]
[song]
[wiki]
Please send FSF & GNU inquiries & questions to gnu@gnu.org. There are also other ways to
contact the FSF.
This page is maintained by the GDB
developers.
Copyright Free Software Foundation, Inc., 51 Franklin St - Fifth
Floor, Boston, MA 02110-1301 USA.
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
Last modified 2018-07-31.