Skip to main content

What Is GDB?

GDB (GNU Debugger) is the free software debugger from the GNU Project. It supports source-level debugging for C, C++, Go, Rust, Fortran, Ada, and other languages, providing breakpoints, watchpoints, stepping, memory inspection, and scripting via Python and Guile.

Use Cases

Source-level debugging of native applications, crash analysis, and scripting automated debugging workflows.

Strengths and Limitations

Strengths

  • +Runs on most Unix-like systems and Windows, with support for many architectures and a dozen source languages.
  • +Scriptable via Python and Guile for automated debugging and crash analysis.
  • +Supports remote debugging, core dump analysis, and reverse debugging (with compatible targets).

Limitations

  • -Command-line interface has a steep learning curve without a frontend like GDBgui or DDD.
  • -Python scripting is available only in builds configured with Python support.

Defensive Use

Crash analysis, vulnerability root-cause investigation, and debugging security-critical native code.

GDB Alternatives

3 tools
ToolPricing
Ghidra

Software reverse engineering suite developed by the NSA, offering disassembly, decompilation, and scriptable binary analysis.

Open Source
pwndbg

GDB and LLDB plugin that improves debugging for exploit development and reverse engineering with low-level inspection helpers.

Open Source
x64dbg

Free x64 and x32 debugger for Windows binaries, featuring assembly viewing, memory editing, and plugin extensibility.

Free

Frequently Asked Questions

What is GDB?→

GDB (GNU Debugger) is the free software debugger from the GNU Project. It supports source-level debugging for C, C++, Go, Rust, Fortran, Ada, and other languages, providing breakpoints, watchpoints, stepping, memory inspection, and scripting via Python and Guile.

What is GDB used for?→

Source-level debugging of native applications, crash analysis, and scripting automated debugging workflows.

What are the strengths of GDB?→
  • +Runs on most Unix-like systems and Windows, with support for many architectures and a dozen source languages.
  • +Scriptable via Python and Guile for automated debugging and crash analysis.
  • +Supports remote debugging, core dump analysis, and reverse debugging (with compatible targets).
What are the limitations of GDB?→
  • +Command-line interface has a steep learning curve without a frontend like GDBgui or DDD.
  • +Python scripting is available only in builds configured with Python support.
How is GDB used defensively?→

Crash analysis, vulnerability root-cause investigation, and debugging security-critical native code.