gdb

Install command:
brew install gdb

GNU debugger

https://www.gnu.org/software/gdb/

License: GPL-3.0-or-later

Development: Pull requests

Formula JSON API: /api/formula/gdb.json

Formula code: gdb.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 18.1
head ⚡️ HEAD

Revision: 1

Patches:

https://github.com/Homebrew/homebrew-core/blob/main/Patches/gdb/macos-system-ncurses.patch

Depends on:

gmp 6.3.0 GNU multiple precision arithmetic library
mpfr 4.2.2 C library for multiple-precision floating-point computations
python@3.15 3.15.2 Interpreted, interactive, object-oriented programming language
readline 8.3.6 Library for command-line editing
xz 5.8.4 General-purpose data compression with high compression ratio
zstd 1.5.7 Zstandard is a real-time compression algorithm

Depends on when building from source:

pkgconf 3.0.10 Package compiler and linker metadata toolkit
texinfo 7.3 Official documentation format of the GNU project

Uses from macOS: expat (since macOS Sequoia), ncurses

Binaries: gcore, gdb, gdb-add-index, gdbserver, gstack

gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:

    https://sourceware.org/gdb/wiki/PermissionsDarwin

GitHub Packages downloads:

Last 30 days20,617
Downloads1,322,482
Analytics install events (30 days)3,159
Downloads / install events (30 days)6.5×

Source: GitHub Packages, fetched 2026-11-15T00:55:53Z. Analytics dates: 2026-10-16 to 2026-11-15. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs3,1596,05126,176
Installs (--HEAD)0532
Installs on Request2,7985,52224,720
Installs on Request (--HEAD)0532
Build Errors32