GDB
詳細情報
| タイトル | GDB |
|---|---|
| URL | https://www.sourceware.org/gdb/ |
| バージョン | ver 18.1 |
| 更新日 | 2026/09/26 |
| 追加日 | 2016/02/25 |
| 種別 | フリーソフト / オープンソース(GPL) |
| 説明 | GNUプロジェクトが開発する高機能デバッガ。 |
レビュー
概要
GDB(GNU Debugger)は、GNU Projectが開発するオープンソースのデバッガーです。実行中のプログラムの内部状態を監視したり、クラッシュ時の状態を調査したりするための強力なツールで、Unix・Linux・Windows・macOS上で動作します。
1986年にリチャード・ストールマン(Richard Stallman)によって開発されました。GNU Emacsの開発が一段落した後、GNUシステムの一部として作成されたもので、Berkeley UnixのDBXデバッガを設計のモデルとしています。1990年から1993年はJohn Gilmoreが保守を担当し、その後はFree Software Foundationが任命したGDB Steering Committeeが開発・保守を続けています。現在の最新安定版は17.2(2026年5月リリース)です。
主要な特徴・機能
- 多言語対応 - C・C++・Go・Rust・Fortran・Ada・Objective-C・Assemblyなど11言語以上のデバッグに対応
- 多プラットフォーム対応 - Unix・Linux・Windows・macOSで動作し、リモートマシンやシミュレーター上でもデバッグ可能
- ブレークポイント - 条件付きブレークポイントを含む柔軟な実行停止ポイントを設定可能
- ウォッチポイント - 変数の値が変化したタイミングで実行を停止する機能
- スタックトレース - クラッシュ時やブレーク時にコールスタックを表示してバグの原因箇所を特定
- 変数・メモリ調査 - 実行中の変数値・メモリ内容・レジスタ状態をリアルタイムに確認
- コアダンプ解析 - プログラムがクラッシュして生成したコアファイルを事後解析
- リモートデバッグ - GDBサーバーを介して組み込み機器など別マシン上のプロセスをデバッグ
- Python拡張 - Pythonスクリプトでコマンドやプリティプリンターをカスタマイズ可能
対象ユーザー
C・C++・Goなどのネイティブ言語を使うソフトウェア開発者・システムプログラマーが主な対象です。特にLinux/Unixのコマンドライン環境で開発を行うエンジニア、組み込みシステム開発者、OS・カーネル開発者など、低レベルなバグ解析が必要な場面で広く活用されています。
ライセンス情報
GDBはGNU General Public License version 3(GPLv3)のもとで公開されているフリーソフトウェアです。ソースコードの閲覧・修正・再配布が自由に行えます。
スクリーンショット
更新グラフ
バージョン履歴
Version 18.1 of GDB, the GNU
September 25th, 2026: GDB 18.1 Released!
The latest version of GDB, version 18.1, is available for download.
This version of GDB includes the following changes and enhancements:
Major improvements to the Windows native target:
Non-stop mode is now supported (requires Windows 10 or later).
Scheduler-locking (“set scheduler-locking on”) now works.
Native Thread Local Storage (TLS) variables are now supported.
On the Windows Terminal console, GDB now supports true-color 24-bit colors, and, when the output codepage is 65001, emoji styling and UTF-8 text in general (the host charset is then set to UTF-8 automatically).
GDB now adds all type symbols to the .gdb_index section, fixing cases where GDB could fail to find a type when relying on the index. Existing indexes should be regenerated.
Improved handling of inferior arguments:
“set args”, “run”, “start” and “starti” now accept arguments containing a newline character, within a quoted argument.
New –no-escape-args command line option for GDB, an alternative to –args that does not escape special shell characters within the arguments. gdbserver accepts a –no-escape-args flag with the same effect on the inferior arguments.
When connected to an extended-remote target, GDB can now set the ‘remote exec-file’ automatically, using the current executable, if the remote was not started with an executable and the user did not set one explicitly.
“info locals” now shows a “shadowed” annotation and location information for variables that shadow, or are shadowed by, others.
Support for the Floating Point Mode Register (FPMR) on AArch64.
GDB now supports libipt v2.2 events originating from Event Tracing (“set record btrace pt event-tracing on”) on a FRED-enabled system, and from Trigger Tracing.
GDB now supports arbitrary (non-standard) baud rates for serial connections on systems whose libc accepts them through cfsetispeed/cfsetospeed, such as glibc 2.42 and later, and GNU Hurd.
(省略されました)
Version 17.2 of GDB, the GNU
May 10th, 2026: GDB 17.2 Released!
The latest version of GDB, version 17.2, is available for download.
This is a corrective release over GDB 17.1, fixing the following
issues:
PR dap/33228 ([gdb/dap] error while listing register children)
PR gdb/33737 (gdb --help says 'For more information, type "stream" from within GDB', but "stream" is not a defined command)
PR build/33747 (Incompatible with MUSL libc: no member named 'c_ospeed' in 'termios')
PR gdb/33748 (gdb17 regression with displaying ANSI colors)
PR gdb/33753 (Out-of-bounds writes in string_{v}printf -- threads and static data don't mix)
PR cli/33761 (Setting style colors is broken on MS-Windows)
PR gdb/33768 (Loading compressed GDB scripts from .debug_gdb_scripts fails)
PR symtab/33775 ([gdb/symtab] data race in dwarf2_per_cu::{set_addr_size,set_offset_size,set_ref_addr_size})
PR symtab/33777 ([gdb/symtab] dw2_get_file_names doesn't cache result for dummy CU)
PR symtab/33825 ([dwz] Extremely slow symbol lookup with DWZ-compressed debug info (thousands of partial units))
PR testsuite/33845 (gdb: There are 4 unexpected failures in breakpoint-in-ro-region.exp)
PR gdb/33872 (`skip -gfile` has inverted logic)
PR gdb/33926 (GDB 17.1 AArch64: redefinition of user_gcs struct on musl)
(省略されました)
Version 17.1 of GDB, the GNU
December 20th, 2025: GDB 17.1 Released!
The latest version of GDB, version 17.1, is available for download.
This version of GDB includes the following changes and enhancements:
x86-64 CET shadow stack support
Debugging Linux programs that use AArch64 Guarded Control Stacks
GDB record feature now supports rv64gc architectures
'info threads' command support for two new options '-stopped' and '-running'
to limit the list of displayed threads.
On Linux and FreeBSD, the addresses shown by the 'info sharedlibrary' command
are now for the full memory range allocated to the shared library.
Linux checkpoints now work with multiple inferiors
Improved linker namespace support
Warnings and error messages now start with an emoji (warning sign,
or cross mark) if supported by the host charset. Configurable.
Built-in support for TLS on Linux as backup when libthread_db is not
available. Supported on the x86_64, aarch64, ppc64, s390x, and riscv
architectures, when compiled with GLIBC or MUSL.
(省略されました)
Version 16.3 of GDB, the GNU
April 20th, 2025: GDB 16.3 Released!
The latest version of GDB, version 16.3, is available for download.
This is a corrective release over GDB 16.2, fixing the following
issues:
PR symtab/32309 ([gdb/symtab, fission] gdb/dwarf2/read.h:289: internal-error: version: Assertion `m_dwarf_version != 0' failed)
PR corefiles/32441 (gdb segfaults when generating a core file if target_fileio_read_alloc fails)
PR tui/32623 (TUI console window doesn't update while inferior is running)
PR corefiles/32634 ([gdb/corefiles] segfault in gdb.arch/i386-biarch-core.exp)
PR backtrace/32757 ("Assertion `stashed' failed" when inline frame #0 is duplicated)
PR tdep/32770 ([gdb/tdep, i386] FAIL: gdb.reverse/recvmsg-reverse.exp: continue to breakpoint: marker2)
PR gdb/32775 ([AArch64] gdbserver crashes on SVE/SME-enabled systems)
PR record/32784 ([gdb/record, aarch64] Stack smashing detected in aarch64_record_asimd_load_store)
PR tui/32797 (Escape sequences to only reset foreground or background color to default fail)
PR gdb/32828 (gstack regression: missing file names and line numbers)
See the NEWS file for a more complete and detailed list of what this release includes.
February 1st, 2025: GDB 16.2 Released!
Last modified 2025-04-20.
Version 16.2 of GDB, the GNU
February 1st, 2024: GDB 16.2 Released!
The latest version of GDB, version 16.2, is available for download.
This is a corrective release over GDB 16.1, fixing the following
issues:
PR build/32578 (cannot build GDB 16.1 out of tree when calling the configure script with a relative path)
PR tui/32592 ([gdb/tui] internal error in tui-winsource.c:340:refresh_window)
PR remote/32593 (Incompatibilities between GDB's and LLDB's 'x' packet implementation)
PR build/32610 (Missing #include file in darwin_nat.c)
See the NEWS file for a more complete and detailed list of what this release includes.
Last modified 2025-02-01.
Version 16.1 of GDB, the GNU
January 18th, 2025: GDB 16.1 Released!
The latest version of GDB, version 16.1, is available for download.
record/replay support now available on loongarch*-linux*
GDB now supports watchpoints for tagged data pointers.
MTE (Memory Tagging Extension) debugging is now supported on AArch64
baremetal.
New bash script gstack uses GDB to print stack traces of running processes.
Enhanced breakpoint support
For breakpoints that are created in the 'pending' state, any
'thread' or 'task' keywords are parsed at the time the breakpoint is
created, rather than at the time the breakpoint becomes non-pending.
Thread-specific breakpoints are only inserted into the program space
in which the thread of interest is running.
Enhanced Intel Processor Trace support
Support for printing of asynchronous events
Support for printing of ptwrite payloads
Changed commands
(省略されました)
Version 15.2 of GDB, the GNU
September 29th, 2024: GDB 15.2 Released!
The latest version of GDB, version 15.2, is available for download.
This is a minor corrective release over GDB 15.1, fixing the following
issues:
PR gdb/31727 (-exec-next fails in mingw (infrun.c:2794: internal-error: resume_1: Assertion `pc_in_thread_step_range (pc, tp)' failed))
PR c++/31900 (libstdc++-prettyprinters/debug.cc print redirected fails since gdb-14-branchpoint-2123-g4e417d7bb1c)
PR python/31946 (sys.exit from Python no longer exits the GDB process)
PR record/31971 (Loading a saved record file asserts if we try to execute the inferior)
PR gdb/32005 (frv_current_sos doesn't set solib::lm_info)
PR exp/32015 (GDB crashes while printing large D array)
PR gdb/32025 (Fatal error when the disassemble command is interrupted with SIGINT)
PR gdb/32143 ([15 Regression] arch/amd64.c:71: internal-error: amd64_create_target_description: Assertion `!is_x32' failed)
PR symtab/32158 ([gdb/symtab] enum class enumerator has incorrect parent in cooked index)
PR symtab/32160 ([gdb/symtab] Parent map: die parent or scope parent?)
See the NEWS file for a more complete and detailed list of what this release includes.
Last modified 2024-09-29.
Version 15.1 of GDB, the GNU
July 7th, 2024: GDB 15.1 Released!
The latest version of GDB, version 15.1, is available for download.
Building GDB and GDBserver now requires a C++17 compiler (for instance,
GCC 9 or later).
Enhanced Python support
New function gdb.notify_mi(NAME, DATA), that emits custom
GDB/MI async notification.
New read/write attribute gdb.Value.bytes that contains a bytes
object holding the contents of this value.
New module gdb.missing_debug that facilitates dealing with
objfiles that are missing any debug information.
New function gdb.missing_debug.register_handler that can register
an instance of a sub-class of gdb.missing_debug.MissingDebugInfo
as a handler for objfiles that are missing debug information.
New class gdb.missing_debug.MissingDebugInfo which can be
sub-classed to create handlers for objfiles with missing debug
information.
(省略されました)
Version 14.2 of GDB, the GNU
March 3rd, 2024: GDB 14.2 Released!
The latest version of GDB, version 14.2, is available for download.
This is a minor corrective release over GDB 14.1, fixing the following
issues:
PR symtab/31112 (DLL export forwarding is broken)
PR c++/31128 (gdb crashes when trying to print a global variable stub without a running inferior)
PR tdep/31254 ([gdb/tdep, arm] FAIL: gdb.threads/staticthreads.exp: up 10)
PR gdb/31256 (Crash with basic 'list .')
PR python/31366 (Frame.static_link() segfaults)
See the NEWS file for a more complete and detailed list of what this release includes.
Last modified 2024-03-03.
Version 11.1 of GDB, the GNU
September 13th, 2020: GDB 11.1 Released!
The latest version of GDB, version 11.1, is available for download.
This version of GDB includes the following changes and enhancements:
Support for ARM Symbian (arm*-*-symbianelf*) has been removed.
Building GDB now requires GMP (The GNU Multiple Precision Arithmetic
Library).
New command-line options "--early-init-command" (or "-eix")
and "--early-init-eval-command" (or "-eiex")
GDB/MI Changes:
New --qualified option for the '-break-insert' and '-dprintf-insert'
commands.
New --force-condition option for the '-break-insert' and
'-dprintf-insert' commands.
New --force option for the '-break-condition' command.
The '-file-list-exec-source-files' now accepts an optional regular
expression to filter the source files included in the result.
The results from '-file-list-exec-source-files' now include
(省略されました)