GDB

What GDB is
GDB is a free debugger for inspecting a program while it runs or after it crashes. It can start programs, stop them under specified conditions, inspect execution at a stop, and change program state for experimentation. A target may run on the same machine, on a remote machine, or in a simulator. GDB supports macOS, Microsoft Windows, and popular UNIX variants, as well as languages including Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust. It offers conditional and exception breakpoints and core dump debugging. On supported platforms, it can record execution and replay it using forward and reverse commands. Remote debugging uses gdbserver to connect a target program to GDB. Python extensions are available when GDB is configured with Python; that configuration also supports the Debugger Adapter Protocol alongside the console interpreter and GDB/MI. GDB is part of the GNU Project and is distributed under the GNU General Public License, which permits copying, adaptation, and redistribution with source access. The project provides mailing lists for announcements, discussion, patches, bug reports, and testing.
Who it suits
GDB suits developers who need to inspect programs locally, remotely, or in a simulator across its supported languages. Its record-and-replay capability is available on supported platforms, and its Debugger Adapter Protocol support requires a Python-enabled build.
What it does well
- Supports local, remote, and simulator targets
- Includes conditional and exception breakpoints
- Record-and-replay supports forward and reverse execution
- Supports a broad list of programming languages
- Free software under the GNU General Public License
What to know first
- Record-and-replay is limited to supported platforms
- Debugger Adapter Protocol requires Python support
Limits
Record-and-replay is available on supported platforms. Python extensions and the Debugger Adapter Protocol require GDB to be built with Python support.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| GDB | GNU General Public License · source code available | Free |
As sourceware.org lists them, read 30 Sept 2026. The maker's own page has the final word.
Getting started
- Download an official release from GNU's HTTPS server or Sourceware's releases site.
- Verify the release signature through the GNU keyring.
- Run GDB with a program on the same machine, or connect a remote target through gdbserver.
- Use the console interpreter or GDB/MI to work with the debugger.
- Build with Python support if you need Python extensions or the Debugger Adapter Protocol.
Verdict
GDB covers program inspection across multiple operating systems, languages, and target types. Some capabilities depend on platform support or a Python-enabled build.
Questions
How much does GDB cost?
GDB is free. It is distributed under the GNU General Public License with source access.
Which operating systems does GDB support?
GDB runs on popular UNIX variants, Microsoft Windows, and macOS.
Which programming languages does GDB support?
Its listed languages are Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust.
Can GDB debug a program on another machine?
Yes. A target can run remotely, and gdbserver can connect it to GDB using target remote or target extended-remote.
Does GDB support Python extensions?
Yes, when configured with --with-python. The Debugger Adapter Protocol is also available when GDB is built with Python support.
Who makes GDB?
GDB is a Free Software project that is part of the GNU Project.
Facts from GDB's own pages
- Core debugging
- GDB can start programs, stop them under specified conditions, examine stopped execution, and change program state for experimentation. · sourceware.org, 30 Sept 2026
- Debugger protocols
- GDB supports the console interpreter, GDB/MI, and the Debugger Adapter Protocol when built with Python support. · sourceware.org, 30 Sept 2026
- Distribution
- Official releases are downloadable from GNU's HTTPS server and Sourceware's releases site, with signature verification through the GNU keyring. · sourceware.org, 30 Sept 2026
- Languages
- GDB supports Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust. · sourceware.org, 30 Sept 2026
- Latest release
- GDB version 18.1 was released on September 25, 2026. · sourceware.org, 30 Sept 2026
- License
- GDB is free software protected by the GNU General Public License, which permits copying, adapting, and redistributing copies with source access. · sourceware.org, 30 Sept 2026
- Operating systems
- GDB runs on popular UNIX and Microsoft Windows variants and on macOS. · sourceware.org, 30 Sept 2026
- Project identity
- GDB is a Free Software project that is part of the GNU Project. · sourceware.org, 30 Sept 2026
- Purpose
- GDB lets users inspect what another program is doing while it executes or after it crashes. · sourceware.org, 30 Sept 2026
- Python extension
- GDB can be extended with Python when configured with --with-python. · sourceware.org, 30 Sept 2026
- Record and replay
- On supported platforms, GDB records process execution and replays it with forward and reverse execution commands. · sourceware.org, 30 Sept 2026
- Remote debugging
- The gdbserver control program connects programs to a remote GDB through target remote or target extended-remote. · sourceware.org, 30 Sept 2026
- Security behavior
- On targets that support it, virtual address space randomization protects programs against certain security attacks. · sourceware.org, 30 Sept 2026
- Support
- The project provides mailing lists for announcements, discussion, patches, bug reports, and testing. · sourceware.org, 30 Sept 2026
- Targets
- Programs can run on the same machine, another machine remotely, or a simulator. · sourceware.org, 30 Sept 2026
Where GDB stands on Freedom251
- Debuggers#7 of 27
- Debugging Software#11 of 30
