Automic VaultAutomic Vault

brew

使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 gdb

查看 gdb 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install gdb

local Homebrew formula metadata

MacPorts已验证 · 94%
sudo port install gdb

MacPorts ports tree · devel/gdb/Portfile · 来源: api.github.com

Linux

Alpine Linux apk已验证 · 92%
sudo apk add gdb

Alpine Linux edge package indexes · gdb · 来源: dl-cdn.alpinelinux.org

Debian apt已验证 · 92%
sudo apt install gdb

Debian stable package indexes · gdb · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install gdb

Fedora Rawhide package metadata · gdb · 来源: dl.fedoraproject.org

Nix已验证 · 92%
nix profile install nixpkgs#gdb

nixpkgs package indexes · pkgs/by-name/gd/gdb/package.nix · 来源: api.github.com

Arch Linux pacman已验证 · 92%
sudo pacman -S gdb

Arch Linux sync databases · gdb · 来源: geo.mirror.pkgbuild.com

openSUSE zypper已验证 · 92%
sudo zypper install gdb

openSUSE Tumbleweed package metadata · gdb · 来源: download.opensuse.org

Windows

Scoop已验证 · 92%
scoop install main/gdb

Scoop official bucket manifest trees · bucket/gdb.json · 来源: api.github.com

概览

软件包摘要

GNU debugger

命令和别名

  • gcore
  • gdb
  • gdb-add-index
  • gdbserver
  • gstack

历史

项目历史与用法

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.

时间线

  • 1988: The GDB manual copyright history begins.
  • 1991: Cygnus Solutions begins sponsoring GDB maintenance and much of its development.
  • 2025: GDB 17.1 is released according to the official news page.
  • 2026: GDB 17.2 is released according to the official news page.

Related projects

  • GDB is developed with GNU Binutils in the binutils-gdb repository and relies on BFD for multiple object-file formats.
  • Related tools and interfaces include gdbserver, Readline, GDB/MI, the Debugger Adapter Protocol, and frontends such as gdbgui.

安全态势

风险级别:red

doc example: debugger and process inspection tool.

风险分类器

red 风险 · 高 置信度 · escape-surveillance-offensive

原因

  • doc example: debugger and process inspection tool

信号

  • override:gdb

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 安装时包含 7 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

Configuration and credential file locations

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.

Configuration files

Config paths the tool may read or write during local use.

macOS
~/Library/Preferences/gdb/gdbearlyinit~/.gdbearlyinit~/Library/Preferences/gdb/gdbinit~/.gdbinit./.gdbinit
Unix
$XDG_CONFIG_HOME/gdb/gdbearlyinit~/.config/gdb/gdbearlyinit~/.gdbearlyinit$XDG_CONFIG_HOME/gdb/gdbinit~/.config/gdb/gdbinit~/.gdbinit./.gdbinit

可执行文件

已安装的可执行文件

命令类型暴露范围备注
gcorecli全局可执行文件
gdbcli全局可执行文件
gdb-add-indexcli全局可执行文件
gdbservercli全局可执行文件
gstackcli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-25
管理器版本17.2
管理器更新时间2026-05-10
本地数据OK
上游not checked
检测到的最新版本未检测到

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
Pulseupdated
依赖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 DatabaseHomebrew formula API
Taphomebrew/core
Full Namegdb
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

gdb 16.3-1

GNU Debugger

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

sudo apt install gdb
  • Section: devel
  • Architecture: amd64
  • 18 依赖
  • 1 提供
  • 3 可选依赖
  • normalized package name match
  • 匹配方式:Gdb
Debian stable package indexes · deb.debian.org · Debian stable package indexes: gdb from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

gdb-minimal 16.3-1

GNU Debugger (minimal version - dummy transitional package)

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

sudo apt install gdb-minimal
  • Section: devel
  • Architecture: all
  • Source Package: gdb
  • 1 依赖
  • normalized package name match
  • 匹配方式:Gdb
Debian stable package indexes · deb.debian.org · Debian stable package indexes: gdb-minimal from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

gdb-multiarch 16.3-1

GNU Debugger (with support for multiple architectures)

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

sudo apt install gdb-multiarch
  • Section: devel
  • Architecture: amd64
  • Source Package: gdb
  • 19 依赖
  • normalized package name match
  • 匹配方式:Gdb
Debian stable package indexes · deb.debian.org · Debian stable package indexes: gdb-multiarch from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

gdb-source 16.3-1

GNU Debugger (source)

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

sudo apt install gdb-source
  • Section: devel
  • Architecture: all
  • Source Package: gdb
  • normalized package name match
  • 匹配方式:Gdb
Debian stable package indexes · deb.debian.org · Debian stable package indexes: gdb-source from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Debian apt95%

gdbserver 16.3-1

GNU Debugger (remote server)

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

sudo apt install gdbserver
  • Section: devel
  • Architecture: amd64
  • Source Package: gdb
  • 3 依赖
  • normalized package name match
  • 匹配方式:Gdb
Debian stable package indexes · deb.debian.org · Debian stable package indexes: gdbserver from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

gdb

nix profile install nixpkgs#gdb
  • normalized package name match
  • 匹配方式:Gdb
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/gd/gdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

gdb 15.0.50.20240403-0ubuntu1

GNU Debugger

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

sudo apt install gdb
  • Section: devel
  • Architecture: amd64
  • 18 依赖
  • 1 提供
  • 3 可选依赖
  • normalized package name match
  • 匹配方式:Gdb
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: gdb from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

gdb-doc 15.0.50.20240403-0ubuntu1

The GNU Debugger Documentation

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

sudo apt install gdb-doc
  • Section: devel
  • Architecture: all
  • Source Package: gdb
  • normalized package name match
  • 匹配方式:Gdb
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: gdb-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz
Ubuntu apt95%

gdb-multiarch 15.0.50.20240403-0ubuntu1

GNU Debugger (with support for multiple architectures)

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

sudo apt install gdb-multiarch
  • Section: universe/devel
  • Architecture: amd64
  • Source Package: gdb
  • 19 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Gdb
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: gdb-multiarch from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

gdb-source 15.0.50.20240403-0ubuntu1

GNU Debugger (source)

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

sudo apt install gdb-source
  • Section: universe/devel
  • Architecture: all
  • Source Package: gdb
  • normalized package name match
  • 匹配方式:Gdb
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: gdb-source from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
Ubuntu apt95%

gdbserver 15.0.50.20240403-0ubuntu1

GNU Debugger (remote server)

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

sudo apt install gdbserver
  • Section: universe/devel
  • Architecture: amd64
  • Source Package: gdb
  • 3 依赖
  • normalized package name match
  • 匹配方式:Gdb
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: gdbserver from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
apk95%

gdb 16.3-r4

The GNU Debugger

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

sudo apk add gdb
  • License: GPL-3.0-or-later AND LGPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: gdb
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Gdb
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: gdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

gdb-dbg 16.3-r4

The GNU Debugger (debug symbols)

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

sudo apk add gdb-dbg
  • License: GPL-3.0-or-later AND LGPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: gdb
  • 1 依赖
  • normalized package name match
  • 匹配方式:Gdb
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: gdb-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

gdb-doc 16.3-r4

The GNU Debugger (documentation)

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

sudo apk add gdb-doc
  • License: GPL-3.0-or-later AND LGPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: gdb
  • normalized package name match
  • 匹配方式:Gdb
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: gdb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
apk95%

gdb-multiarch 16.3-r4

The GNU Debugger for all supported architectures

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

sudo apk add gdb-multiarch
  • License: GPL-3.0-or-later AND LGPL-3.0-or-later
  • Architecture: x86_64
  • Source Package: gdb
  • 1 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Gdb
Alpine Linux edge package indexes · dl-cdn.alpinelinux.org · Alpine Linux edge package indexes: gdb-multiarch from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
dnf95%

gdb 17.1-10.fc45

A GNU source-level debugger for C, C++, Fortran, Go and other languages

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

sudo dnf install gdb
  • License: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: gdb
  • 3 依赖
  • 1 提供
  • normalized package name match
  • 匹配方式:Gdb
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: gdb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment