GDB: The GNU Project Debugger

[bugs] [maintainers] [contributing] [current�git] [documentation] [download] [home] [irc] [links] [mailing�lists] [news] [schedule] [song] [wiki]

GDB: The GNU Project Debugger

What is GDB?

See More

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:

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 macOS.

What Languages does GDB Support?

GDB supports the following languages (in alphabetical order):

GDB version 17.1

Version 17.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

December 20th, 2025: GDB 17.1 Released!

The latest version of GDB, version 17.1, is available for download.

This version of GDB includes the following changes and enhancements:

  • x86-64 CET shadow stack support
  • Debugging Linux programs that use AArch64 Guarded Control Stacks
  • GDB record feature now supports rv64gc architectures
  • 'info threads' command support for two new options '-stopped' and '-running' to limit the list of displayed threads.
  • On Linux and FreeBSD, the addresses shown by the 'info sharedlibrary' command are now for the full memory range allocated to the shared library.
  • Linux checkpoints now work with multiple inferiors
  • Improved linker namespace support
  • Warnings and error messages now start with an emoji (warning sign, or cross mark) if supported by the host charset. Configurable.
  • Built-in support for TLS on Linux as backup when libthread_db is not available. Supported on the x86_64, aarch64, ppc64, s390x, and riscv architectures, when compiled with GLIBC or MUSL.
  • New command "set riscv numeric-register-names" to display risc-v registers using their numeric names instead of their ABI names.
  • The Alpha target now supports target descriptions.
  • Python API enhancements
    • New class gdb.Color for dealing with colors, and new constant gdb.PARAM_COLOR
    • New gdb.ParameterPrefix class, to create new 'set/show' command prefixes.
    • New attribute gdb.Value.is_unavailable, this checks for unavailability like gdb.Value.is_optimized_out checks for optimized out values.
    • New gdb.warning() function to print a warning message, with GDB's standard 'warning' prefix (see emoji support entry below)
    • gdb.execute has an additional 'styling' argument.
    • Prefix commands (gdb.Command sub-classes) that don't have an invoke method now behave like builtin prefix commands when invoked without a sub-command name. This means printing the help text for all sub-commands, unless the prefix command is a 'show' command, in which case the value of all sub-commands is printed.
    • Setting the documentation string (__doc__) of a gdb.Parameter sub-class to the empty string, means GDB will only display the set_doc or show_doc strings in the set/show help output.
  • Guile API enhancements:
    • New type for dealing with colors and constant PARAM_COLOR
    • Prefix commands (using make-command) that don't have a #:invoke property will now behave like builtin prefix commands when invoked without a sub-command name. This means printing the help text for all sub-commands, unless the prefix command is a 'show' command, in which case the value of all sub-commands is printed.
    • Eliding the #:doc string from make-parameter now means that GDB will use a default documentation string. Setting #:doc to the empty string for make-parameter means GDB will only display the #:set_doc or #:show_doc strings in the set/show help output.
  • Debugger Adapter Protocol changes
    • GDB now supports the "completions" request.
    • New "--binary-output" command line option to disable LF translations (Windows only)
  • New convenience variables
    • $_colorsupport providing a comma-separated list of color space names supported by the terminal.
    • $linker_namespace_count and $_linker_namespace provide the list of active linker namespaces.
  • Remote package additions and changes
    • New 'binary-upload+' value in qSupported reply
    • The 'vFile:stat' command implementation has been corrected to use stat rather than lstat. The documentation has also been clarified.
    • New vFile:lstat packet, useful for handling symbolic links
    • Support for the "id_str" attribute in 'qXfer:threads:read' XML answer.
  • GDB/MI changes
    • The =library-unloaded event now includes the 'ranges' field, which has the same meaning as for the =library-loaded event.
    • The =library-unloaded event now includes the 'still-in-use' field.
  • Configure changes
    • Ability to select which file formats to include support for
    • New option --disable-gdb-compile to disable support for the compile subsystem.
    • New option --disable-gdb-dwarf-support to disable support for DWARF debug information in GDB.
    • New option --disable-gdb-mdebug-support to disable support for mdebug/ecoff debug information.
  • Incompatible changes
    • Support for Python versions older than 3.4 has been removed
    • Support for stabs debugging format and the a.out/dbx object format is deprecated, and will be removed in GDB 18.
    • UST (static tracepoint) gdbserver support has been removed
See the NEWS file for a more complete and detailed list of what this release includes.

September 6th, 2025: GDB 17 branch created

The GDB 17 branch (gdb-17-branch) has been created. To check out a copy of the branch use:

git clone --branch gdb-17-branch https://sourceware.org/git/binutils-gdb.git

April 20th, 2025: GDB 16.3 Released!

The latest version of GDB, version 16.3, is available for download.

This is a corrective release over GDB 16.2, fixing the following issues:

  • PR symtab/32309 ([gdb/symtab, fission] gdb/dwarf2/read.h:289: internal-error: version: Assertion `m_dwarf_version != 0' failed)
  • PR corefiles/32441 (gdb segfaults when generating a core file if target_fileio_read_alloc fails)
  • PR tui/32623 (TUI console window doesn't update while inferior is running)
  • PR corefiles/32634 ([gdb/corefiles] segfault in gdb.arch/i386-biarch-core.exp)
  • PR backtrace/32757 ("Assertion `stashed' failed" when inline frame #0 is duplicated)
  • PR tdep/32770 ([gdb/tdep, i386] FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2)
  • PR gdb/32775 ([AArch64] gdbserver crashes on SVE/SME-enabled systems)
  • PR record/32784 ([gdb/record, aarch64] Stack smashing detected in aarch64_record_asimd_load_store)
  • PR tui/32797 (Escape sequences to only reset foreground or background color to default fail)
  • PR gdb/32828 (gstack regression: missing file names and line numbers)
See the NEWS file for a more complete and detailed list of what this release includes.

February 1st, 2025: GDB 16.2 Released!

The latest version of GDB, version 16.2, is available for download.

This is a corrective release over GDB 16.1, fixing the following issues:

  • PR build/32578 (cannot build GDB 16.1 out of tree when calling the configure script with a relative path)
  • PR tui/32592 ([gdb/tui] internal error in tui-winsource.c:340:refresh_window)
  • PR remote/32593 (Incompatibilities between GDB's and LLDB's 'x' packet implementation)
  • PR build/32610 (Missing #include file in darwin_nat.c)
See the NEWS file for a more complete and detailed list of what this release includes.

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] [maintainers] [contributing] [current�git] [documentation] [download] [home] [irc] [links] [mailing�lists] [news] [schedule] [song] [wiki]