GDB
sourceware.org
- Free plan
- Windows
- macOS
- Linux
What GDB is
GDB is a free debugger for examining what a program is doing as it runs or after it crashes. It can start programs, pause them when specified conditions occur, inspect their stopped execution, and change program state for experimentation. The target can run on the same machine, a remote machine, or a simulator. GDB supports Linux, macOS, Windows, and other popular UNIX variants, with languages including C, C++, Rust, Go, Ada, Fortran, Assembly, and others. Debugging options include conditional and exception breakpoints, core dump debugging, and recording and replaying execution in both directions on supported platforms. For remote work, gdbserver connects a program to GDB. Console and GDB/MI interpreters are supported; Python extensions and the Debugger Adapter Protocol are available when built with Python support. GDB is part of the GNU Project and is licensed under the GNU General Public License. Its version 18.1 was released on September 25, 2026.
Who it suits
GDB suits developers debugging programs across its supported languages and platforms, whether targets are local, remote, or simulated. It can also suit teams that need conditional breakpoints, core dump debugging, or reversible execution on supported platforms.
Good to know, and what to watch
- Free software under the GNU General Public License
- Supports a broad set of programming languages
- Can debug local, remote, and simulator targets
- Offers conditional and exception breakpoints
- Records and replays execution on supported platforms
- Reverse execution is limited to supported platforms
- Python extensions require a Python-enabled build
- Debugger Adapter Protocol requires Python support
Plans
Every plan and priceGDB
Free plan
Getting started
- Open the GDB website
- Download an official release from GNU or Sourceware
- Verify the release using the GNU keyring
- Install GDB on Linux, macOS, or Windows
- Launch a program or connect to a remote target with gdbserver
The Club's review
Overview
GDB is a debugger for developers who need to inspect and control program execution across a broad range of languages and targets.
Key features
Execution control and crash investigation
GDB can start a program, stop it when chosen conditions occur, inspect its state, and change that state to test different scenarios. Conditional and exception breakpoints help narrow attention to relevant events, while core-dump debugging supports investigation after a crash. These capabilities make it useful both for tracing live behavior and diagnosing failures that cannot be reproduced in a running session.
Remote targets and replay
Debugging can target a program on the same machine, a remote machine, or a simulator. For remote work, gdbserver connects the target program to GDB through target remote or target extended-remote. On supported platforms, record-and-replay adds forward and reverse execution, a meaningful advantage when retracing a failure; that benefit depends on platform support.
Languages and extensibility
GDB supports Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust. Python extensions are available when GDB is configured with --with-python. The console interpreter and GDB/MI are supported, and Debugger Adapter Protocol support also depends on a Python-enabled build. That flexibility suits varied workflows, but Python-related capabilities are not guaranteed in every build.
Security and distribution
On targets that support it, virtual address space randomization helps protect programs against certain security attacks. GDB is part of the GNU Project and is licensed under the GNU General Public License, allowing users to copy, adapt, and redistribute it with source access. Official releases are available from GNU's HTTPS server and Sourceware's releases site, with signature verification through the GNU keyring. Project support is organized through mailing lists for announcements, discussion, patches, bug reports, and testing.
Pricing
GDB costs free under the GNU General Public License, with source code available. There are no paid tiers to weigh against the free plan, so it is a strong fit when licensing cost and the ability to modify or redistribute source matter. Its trade-off is not a cheaper feature tier but dependence on the capabilities of the platform and build in use.
Platforms
GDB runs on UNIX variants, Microsoft Windows, and macOS. Its targets can be native, remote, or simulator-based, so it can suit teams working across different execution environments. Remote connections use gdbserver, while record-and-replay and some language-related features depend on platform support or build configuration.
Who it's for
GDB is a sensible choice for developers debugging supported languages who need to pause execution, inspect state, investigate core dumps, or work with remote and simulated targets. Its breadth is especially useful when one debugger must cover varied target types. It is a less direct fit when the task is tied to a specialized debugger or hardware workflow, or when a required Python-dependent capability is absent from the build.
Pros and cons
- Pros: Broad language coverage, conditional and exception breakpoints, and core-dump debugging support varied investigation needs.
- Pros: Native, remote, and simulator targets, plus record-and-replay on supported platforms, give developers options beyond live local debugging.
- Pros: Free software with source access can be copied, adapted, and redistributed under the GNU General Public License.
- Cons: Python extensions and Debugger Adapter Protocol support require a Python-enabled build, so those capabilities are not assured across installations.
- Cons: Record-and-replay and virtual address space randomization are conditional on platform or target support.
Alternatives
Browse more debuggers if you want to compare tools across the category. LLDB is another free debugger and may suit readers looking for an alternative across platforms including Android and iOS. PonyDebugger is a free option for readers focused on iOS, macOS, self-hosted, or web environments. For embedded microcontrollers, Black Magic Debug is a free JTAG/SWD debugger, but it requires compatible probe hardware and a suitable toolchain. FlowStorm is a free and open-source alternative for readers considering its Linux, macOS, Windows, or self-hosted availability. Perl Debugger is included with Perl and suits Perl debugging, provided the program compiles correctly before debugging. pyOCD is a free, Apache 2.0-licensed project for readers evaluating its API, self-hosted, or listed desktop platforms. IDA Pro is worth considering for disassembly and decompilation: IDA Free includes x86-32 and x86-64 disassembly and two cloud-based decompilers, while IDA Pro Essential costs $1,099. For iOS debugging, FLEX is a free open-source debugging library for iOS 9 or higher.
Verdict
Choose GDB if you need a free, source-available debugger with broad language support and control across local, remote, and simulator targets. Its execution control and conditional replay capabilities are compelling, but Python-dependent features and record-and-replay vary with the build and platform; look elsewhere when those constraints conflict with your target setup.
The verdict
GDB covers core debugging tasks across many languages and target types, with remote debugging and record-and-replay on supported platforms. Its Python-related capabilities depend on how it is built.
Questions people ask
Is GDB free?
Yes. GDB is free software under the GNU General Public License, and its source code is available.
Which operating systems does GDB support?
GDB supports popular UNIX variants, Microsoft Windows, and macOS.
Which languages can GDB debug?
Supported languages include Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust.
Can GDB debug remote programs?
Yes. Programs can run on another machine or in a simulator, and gdbserver connects a remote program to GDB.
Does GDB support reverse debugging?
On supported platforms, GDB records process execution and replays it with forward and reverse execution commands.
How much does the GDB plan cost?
The GDB plan costs nothing.
What the maker publishes
- Core debugging
- GDB can start programs, stop them under specified conditions, examine stopped execution, and change program state for experimentation. source
- Debugger protocols
- GDB supports the console interpreter, GDB/MI, and the Debugger Adapter Protocol when built with Python support. source
- Distribution
- Official releases are downloadable from GNU's HTTPS server and Sourceware's releases site, with signature verification through the GNU keyring. source
- Languages
- GDB supports Ada, Assembly, C, C++, D, Fortran, Go, Objective-C, OpenCL, Modula-2, Pascal, and Rust. source
- Latest release
- GDB version 18.1 was released on September 25, 2026. source
- License
- GDB is free software protected by the GNU General Public License, which permits copying, adapting, and redistributing copies with source access. source
- Operating systems
- GDB runs on popular UNIX and Microsoft Windows variants and on macOS. source
- Project identity
- GDB is a Free Software project that is part of the GNU Project. source
- Purpose
- GDB lets users inspect what another program is doing while it executes or after it crashes. source
- Python extension
- GDB can be extended with Python when configured with --with-python. source
- Record and replay
- On supported platforms, GDB records process execution and replays it with forward and reverse execution commands. source
- Remote debugging
- The gdbserver control program connects programs to a remote GDB through target remote or target extended-remote. source
- Security behavior
- On targets that support it, virtual address space randomization protects programs against certain security attacks. source
- Support
- The project provides mailing lists for announcements, discussion, patches, bug reports, and testing. source
- Targets
- Programs can run on the same machine, another machine remotely, or a simulator. source
Checked against the maker's pages on 30 Sept 2026.