# gdb を Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop でインストール

gdb のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:gdb
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install gdb
```

  証拠: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gdb
```

  証拠: MacPorts ports tree: devel/gdb/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add gdb
```

  証拠: Alpine Linux edge package indexes: gdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install gdb
```

  証拠: Debian stable package indexes: gdb from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install gdb
```

  証拠: Fedora Rawhide package metadata: gdb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gdb
```

  証拠: nixpkgs package indexes: pkgs/by-name/gd/gdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S gdb
```

  証拠: Arch Linux sync databases: gdb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install gdb
```

  証拠: openSUSE Tumbleweed package metadata: gdb from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

### Windows

- Scoop (92%):

```sh
scoop install main/gdb
```

  証拠: Scoop official bucket manifest trees: bucket/gdb.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:gdb
- **パッケージマネージャ:** Homebrew
- **バージョン:** 17.2
- **ソース概要:** GNU debugger
- **ホームページ:** <https://www.gnu.org/software/gdb/>
- **最終更新:** 2026-05-10T20:39:26Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- gcore (エイリアス)
- gdb (エイリアス)
- gdb-add-index (エイリアス)
- gdbserver (エイリアス)
- gstack (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 17.2
## プロジェクトの歴史と使われ方

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.

### ソース

- <https://sourceware.org/gdb/current/onlinedocs/gdb.html>
- <https://sourceware.org/gdb/current/onlinedocs/gdb.html/Contributors.html>
- <https://sourceware.org/gdb/current/onlinedocs/gdb.html/Initialization-Files.html>
- <https://sourceware.org/gdb/current/onlinedocs/gdb.html/Summary.html>
- <https://sourceware.org/gdb/current/onlinedocs/gdb.html/Supported-Languages.html>
- <https://sourceware.org/gdb/news/>
- <https://sourceware.org/git/?p=binutils-gdb.git>


## セキュリティノート

doc example: debugger and process inspection tool.

- **Geiger リスク:** red / 高
- doc example: debugger and process inspection tool


## 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

- 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
## 他のパッケージマネージャ記録

- Debian apt - gdb - 16.3-1: normalized package name match | Debian stable package indexes: gdb from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Debugger | https://www.gnu.org/s/gdb/
- Debian apt - gdb-minimal - 16.3-1: normalized package name match | Debian stable package indexes: gdb-minimal from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Debugger (minimal version - dummy transitional package) | https://www.gnu.org/s/gdb/
- Debian apt - gdb-multiarch - 16.3-1: normalized package name match | Debian stable package indexes: gdb-multiarch from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Debugger (with support for multiple architectures) | https://www.gnu.org/s/gdb/
- Debian apt - gdb-source - 16.3-1: normalized package name match | Debian stable package indexes: gdb-source from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Debugger (source) | https://www.gnu.org/s/gdb/
- Debian apt - gdbserver - 16.3-1: normalized package name match | Debian stable package indexes: gdbserver from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU Debugger (remote server) | https://www.gnu.org/s/gdb/
- Nix - gdb: normalized package name match | nixpkgs package indexes: pkgs/by-name/gd/gdb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gdb - 15.0.50.20240403-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gdb from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GNU Debugger | https://www.gnu.org/s/gdb/
- Ubuntu apt - gdb-doc - 15.0.50.20240403-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gdb-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | The GNU Debugger Documentation | https://www.gnu.org/s/gdb/
- Ubuntu apt - gdb-multiarch - 15.0.50.20240403-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gdb-multiarch from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU Debugger (with support for multiple architectures) | https://www.gnu.org/s/gdb/
- Ubuntu apt - gdb-source - 15.0.50.20240403-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gdb-source from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU Debugger (source) | https://www.gnu.org/s/gdb/
- Ubuntu apt - gdbserver - 15.0.50.20240403-0ubuntu1: normalized package name match | Ubuntu 24.04 LTS package indexes: gdbserver from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GNU Debugger (remote server) | https://www.gnu.org/s/gdb/
- apk - gdb - 16.3-r4: normalized package name match | Alpine Linux edge package indexes: gdb from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Debugger | https://www.gnu.org/software/gdb/
- apk - gdb-dbg - 16.3-r4: normalized package name match | Alpine Linux edge package indexes: gdb-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Debugger (debug symbols) | https://www.gnu.org/software/gdb/
- apk - gdb-doc - 16.3-r4: normalized package name match | Alpine Linux edge package indexes: gdb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Debugger (documentation) | https://www.gnu.org/software/gdb/
- apk - gdb-multiarch - 16.3-r4: normalized package name match | Alpine Linux edge package indexes: gdb-multiarch from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The GNU Debugger for all supported architectures | https://www.gnu.org/software/gdb/
- dnf - gdb - 17.2-4.fc45: normalized package name match | Fedora Rawhide package metadata: gdb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A GNU source-level debugger for C, C++, Fortran, Go and other languages | https://gnu.org/software/gdb/


## Combined YAML source

View the package source record on GitHub. [combined/gdb.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gdb.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
