GDB vs OpenOCD
GDB
sourceware.orgOpenOCD
openocd.orgSide by side
| Figure | GDB | OpenOCD |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 1 |
| Spec score · Debuggers | 8.0 (#9) | 7.8 (#12) |
| Purpose | GDB lets users inspect what another program is doing while it executes or after it crashes. | OpenOCD provides debugging, in-system programming, and boundary-scan testing for embedded target devices using a debug adapter. |
Plans
In their own words
GDB
GDB is a free debugger for inspecting a program as it runs or after it crashes. It can launch programs, stop execution under specified conditions, examine the stopped state, and change program state for experimentation. A target can run on the same machine, remotely, or in a simulator. GDB runs on popular UNIX variants, Microsoft Windows, and macOS, and supports languages including C, C++, Rust, Go, Ada, Fortran, Assembly, and others. Debugging options include conditional and exception breakpoints, core dump debugging, and record-and-replay with forward and reverse execution on supported platforms. For remote debugging, gdbserver connects a program to GDB. The console interpreter and GDB/MI are available, while Python extensions and the Debugger Adapter Protocol require Python support at build time. GDB is part of the GNU Project and is free software under the GNU General Public License, which allows copying, adaptation, and redistribution with source access. Official releases are available from GNU and Sourceware, with signature verification through the GNU keyring. Version 18.1 was released on September 25, 2026.
OpenOCD
OpenOCD provides debugging, in-system programming, and boundary-scan testing for embedded target devices through a debug adapter. It communicates with targets over JTAG or Serial Wire Debug (SWD), and can run as a server for GDB clients. Users can also interact through Telnet or GDB; its Tcl interface is intended for machine interaction, and configuration files can contain commands using the documented Tcl scripting API. The target list includes ARM, MIPS, RISC-V, Xtensa, ARC, AVR32, and other architectures. Release 0.12.0 notes support for Espressif ESP32, ESP32-S2, ESP32-S3 cores, and Raspberry Pi Pico RP2040, along with Zephyr and a no-RTOS option. OpenOCD supports remote debugging and exception breakpoints. It is free and listed for Linux, macOS, Windows, and self-hosted setups. The project says it is packaged in popular operating-system repositories and provides access to source code; community binaries are marked unofficial. Host configuration may take extra steps: Linux usually needs a udev rule for adapter access, and Windows requires driver configuration for each peripheral.