macOS
brew install gdblocal Homebrew formula metadata
安装
brew install gdblocal Homebrew formula metadata
sudo apk add gdbAlpine Linux edge package indexes · gdb · 来源: dl-cdn.alpinelinux.org
sudo dnf install gdbFedora Rawhide package metadata · gdb · 来源: dl.fedoraproject.org
nix profile install nixpkgs#gdbnixpkgs package indexes · pkgs/by-name/gd/gdb/package.nix · 来源: api.github.com
sudo pacman -S gdbArch Linux sync databases · gdb · 来源: geo.mirror.pkgbuild.com
sudo zypper install gdbopenSUSE Tumbleweed package metadata · gdb · 来源: download.opensuse.org
scoop install main/gdbScoop official bucket manifest trees · bucket/gdb.json · 来源: api.github.com
概览
GNU debugger
历史
GDB is the GNU Project's source-level debugger, used from the command line to run programs under observation, stop them at controlled points, inspect state, and experiment with program execution.
The current GDB manual credits Richard Stallman as the original author and describes many later contributors. Its copyright history begins in 1988, placing GDB among the early core GNU development tools.
The manual's contributor history records early releases through 2.8 under Richard Stallman and assistants, later 3.x and 4.x release stewards, and major commercial and community contributions for CPU targets, object formats, remote debugging, gdbserver, the machine interface, and language support.
GDB is maintained in Sourceware's binutils-gdb repository, reflecting its close development relationship with GNU Binutils and the broader GNU toolchain.
GDB became the default debugger in many Unix-like development environments because it paired a scriptable CLI with broad compiler, architecture, object-file, and language support.
The manual records Cygnus Solutions sponsoring GDB maintenance and much development since 1991, an important phase in professionalizing GNU toolchain support for commercial cross-development and embedded targets.
The manual describes GDB as useful for starting a program, stopping it on specified conditions, examining what happened after it stopped, and changing program state to continue debugging.
GDB supports many languages, including C, C++, D, Go, Objective-C, Fortran, OpenCL C, Pascal, Rust, assembly, Modula-2, and Ada. It also includes remote debugging, gdbserver, TUI, GDB/MI, Python and Guile extension APIs, and Debugger Adapter Protocol support.
GDB is a canonical package-manager debugging tool: small at the command line, but deeply tied to compiler output, debug symbols, libc behavior, architecture support, Python scripting, and remote target workflows.
Its initialization-file search path is platform-sensitive, with XDG-style paths on non-macOS Unix systems and Library/Preferences paths on macOS, which makes packaging and documentation details visible to users.
安全态势
doc example: debugger and process inspection tool.
red 风险 · 高 置信度 · escape-surveillance-offensive
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
~/Library/Preferences/gdb/gdbearlyinit~/.gdbearlyinit~/Library/Preferences/gdb/gdbinit~/.gdbinit./.gdbinit$XDG_CONFIG_HOME/gdb/gdbearlyinit~/.config/gdb/gdbearlyinit~/.gdbearlyinit$XDG_CONFIG_HOME/gdb/gdbinit~/.config/gdb/gdbinit~/.gdbinit./.gdbinit可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
gcore | cli | 全局可执行文件 | |
gdb | cli | 全局可执行文件 | |
gdb-add-index | cli | 全局可执行文件 | |
gdbserver | cli | 全局可执行文件 | |
gstack | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://www.gnu.org/software/gdb/
安装元数据
| 软件包键 | brew:gdb |
|---|---|
| 版本 | 17.2 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/gdb |
| 主页 | https://www.gnu.org/software/gdb/ |
| 仓库 | https://sourceware.org/git?p=binutils-gdb.git |
| 上游文档 | https://sourceware.org/gdb/current/onlinedocs/gdb |
| 许可证 | GPL-3.0-or-later |
| 源码归档 | https://ftpmirror.gnu.org/gnu/gdb/gdb-17.2.tar.xz |
| 最后更新 | 2026-05-10T20:39:26Z |
| Pulse | updated |
| 依赖 | gmp, mpfr, ncurses, python@3.14, readline, xz, zstd |
| 构建依赖 | pkgconf, texinfo |
| macOS 提供的库 | expat |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
| 注意事项 | gdb requires special privileges to access Mach ports. You will need to codesign the binary. For instructions, see: https://sourceware.org/gdb/wiki/PermissionsDarwin |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | gdb |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
gdb 16.3-1
GNU Debugger
sudo apt install gdbgdb-minimal 16.3-1
GNU Debugger (minimal version - dummy transitional package)
sudo apt install gdb-minimalgdb-multiarch 16.3-1
GNU Debugger (with support for multiple architectures)
sudo apt install gdb-multiarchgdb-source 16.3-1
GNU Debugger (source)
sudo apt install gdb-sourcegdbserver 16.3-1
GNU Debugger (remote server)
sudo apt install gdbservergdb
nix profile install nixpkgs#gdbgdb 15.0.50.20240403-0ubuntu1
GNU Debugger
sudo apt install gdbgdb-doc 15.0.50.20240403-0ubuntu1
The GNU Debugger Documentation
sudo apt install gdb-docgdb-multiarch 15.0.50.20240403-0ubuntu1
GNU Debugger (with support for multiple architectures)
sudo apt install gdb-multiarchgdb-source 15.0.50.20240403-0ubuntu1
GNU Debugger (source)
sudo apt install gdb-sourcegdbserver 15.0.50.20240403-0ubuntu1
GNU Debugger (remote server)
sudo apt install gdbservergdb 16.3-r4
The GNU Debugger
https://www.gnu.org/software/gdb/
sudo apk add gdbgdb-dbg 16.3-r4
The GNU Debugger (debug symbols)
https://www.gnu.org/software/gdb/
sudo apk add gdb-dbggdb-doc 16.3-r4
The GNU Debugger (documentation)
https://www.gnu.org/software/gdb/
sudo apk add gdb-docgdb-multiarch 16.3-r4
The GNU Debugger for all supported architectures
https://www.gnu.org/software/gdb/
sudo apk add gdb-multiarchgdb 17.1-10.fc45
A GNU source-level debugger for C, C++, Fortran, Go and other languages
sudo dnf install gdb来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.