GDB: The GNU Project Debugger (original) (raw)
[](mascot/)
[bugs] [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 macOS.
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 16.3
Version 16.3 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 documentationare also available.
News
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.
January 18th, 2025: GDB 16.1 Released!
The latest version of GDB, version 16.1, is available for download.
This version of GDB includes the following changes and enhancements:
- record/replay support now available on loongarch*-linux*
- GDB now supports watchpoints for tagged data pointers.
- MTE (Memory Tagging Extension) debugging is now supported on AArch64 baremetal.
- New bash script gstack uses GDB to print stack traces of running processes.
- Enhanced breakpoint support
- For breakpoints that are created in the 'pending' state, any 'thread' or 'task' keywords are parsed at the time the breakpoint is created, rather than at the time the breakpoint becomes non-pending.
- Thread-specific breakpoints are only inserted into the program space in which the thread of interest is running.
- Enhanced Intel Processor Trace support
- Support for printing of asynchronous events
- Support for printing of ptwrite payloads
- Changed commands
- The "remove-symbol-file -a ADDRESS" command now accepts a full expression as the ADDRESS.
- The "show configuration" command now prints the version of GNU readline that GDB is using.
- The "maintenance print remote-registers" now provides an "Expedited" column indicating which registers were included in the last stop reply packet received by GDB.
- Various command taking filenames as argument now require file names to be quoted if the argument contains white spaces or quote characters.
- Python API changes
- New module gdb.missing_objfile that facilitates dealing with missing objfiles when opening a core-file. GDB commands to query, enable and disable handlers created using this API have also been added.
- New event gdb.tui_enabled.
- Added the gdb.Symbol.is_artificial attribute.
- New gdb.record.clear function to clear the trace data of the current recording.
- The 'signed' argument to gdb.Architecture.integer_type() will no longer accept non-bool types.
- The gdb.MICommand.installed property can only be set to True or False.
- The 'qualified' argument to gdb.Breakpoint constructor will no longer accept non-bool types.
- Debugger Adapter Protocol changes
- The "scopes" request will now return a scope holding global variables from the stack frame's compilation unit.
- The "scopes" request will return a "returnValue" scope holding the return value from the latest "stepOut" command, when appropriate.
- The "launch" and "attach" requests were rewritten in accordance with some clarifications to the spec. Now they can be sent at any time after the "initialized" event, but will not take effect (or send a response) until after the "configurationDone" request has been sent.
- The "variables" request will not return artificial symbols.
- Remote Protocol
- New remote packet: vFile:stat
- New remote packet: x addr,length
- Miscellaneous
- The Ada 'Object_Size attribute is now supported.
- Styling now available for line numbers, GDB commands and header lines of lists.
- It is now possible to turn the warning emitted when specifying a language that does not match the current frame off.
- For ARM targets, the offset of the pc in the jmp_buf has been fixed to match glibc 2.20 and later. This should only matter when not using libc probes. This may cause breakage when using an incompatible libc, like uclibc or newlib, or an older glibc.
- Deprecated or removed
- Support for QNX Neutrino has been removed
- Support for Nios II targets has been removed
- Support for Intel MPX has been removed See the NEWS file for a more complete and detailed list of what this release includes.
December 29th, 2024: GDB 16 branch created
The GDB 16 branch (gdb-16-branch) has been created. To check out a copy of the branch use:
git clone --branch gdb-16-branch https://sourceware.org/git/binutils-gdb.git
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]