GNU Debugger 10.2

GDB is a source-level debugger for Ada, C, C++, Objective-C, Pascal and many other compiled languages. It can debug running processes on more than a dozen different processor architectures. It's itself ported to most BSD/ and GNU/Linux, Unix and Microsoft Windows systems.

Tags c c++ debugger software-development
License GNU GPLv3
State stable

Recent Releases

10.226 Apr 2021 06:25 minor feature: PR remote/26614 (AddressSanitizer: heap-use-after-free of extended_remote_target in remote_async_inferior_event_handler) PR gdb/26828 (SIGSEGV in follow_die_offset dwarf2/read.c:22950). PR gdb/26861 (internal-error: void target_mourn_inferior(ptid_t): Assertion `ptid == inferior_ptid' failed. OS: Mac OSX Catalina; Compiler: GCC; Language: C). PR gdb/26876 (gdb error: internal-error: Unknown CFA rule when deging the linux kernel with qemu). PR breakpoints/26881 (infrun.c:6384: internal-error: void process_event_stop_test(execution_control_state*): Assertion `ecs- gt;event_thread- gt;control.exception_resume_breakpoint != NULL' failed). PR gdb/26901 (Array subscript fails with flexible array member without size). PR tui/26973 (gdb crashes when not including the status window in a new layout). PR python/26974 (Wrong Value.format_string docu for static members argument). PR breakpoints/27009 ( s390 GDB branches randomly for BC instruction while displaced stepping). PR tdep/27015 (ARC: "eret" value is collected from the wrong data in register cache). PR backtrace/27147 ( GNU/Linux, sparc64 GDB is unable to print full stack trace (got "previous frame inner to this frame" errors)). PR rust/27194 (put rust demangler on 10.x branch). PR threads/27239 (gdb/cp-support.c:1619:(.text+0x5502): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS init function for thread_local_segv_handler'). PR breakpoints/27330 (nextoverthrow.exp FAILs on arm-none-eabi). PR symtab/27333 ( dwarf-5 abort on unhandled DW_TAG_type_unit in process_psymtab_comp_unit). PR fortran/27341 ( dwarf-5 FAIL: gdb.fortran/function-calls.exp: p derived_types_and_module_calls::pass_cart_nd(c_nd)). PR tdep/27369 (ARC: Stepping over atomic instruction sequences loops infinitely). PR build/27385 (Cannot compile arc.c with gcc-4.8 (error: no matching function for call to 'std::pair...')). PR gdb/27435 (Attach on solaris segfaults GDB). PR build/27535 (amd64-linux-siginfo.c
10.125 Oct 2020 15:05 minor feature: Support for deging new targets: BPF (bpf-unknown-none) GDBserver support for the following targets: ARC GNU/Linux. RISC-V GNU/Linux. Multi-target deging support (experimental). Support for deinfod, an HTTP server for distributing ELF/DWARF. Deging information as well as source code. Support for deging a 32-bit Windows program using a 64-bit Windows GDB. Support for building GDB with GNU Guile 3.0 and 2.2 (in addition to 2.0). Improved performance during startup through the use of threading. During symbol table loading (an optional feature in GDB 9, now Enabled by default in GDB 10). Various enhancements to the Python and Guile APIs. Various TUI Mode and enhancements. Other miscellaneous enhancements: Detection when attaching to a process of a mismatch between. This process and the executable previously loaded into GDB. Support for default arguments for "alias" commands. GDBserver support for the following host triplets has been removed: i 34567 86-*-lynxos*. powerpc-*-lynxos*. i 34567 86-*-nto*. bfin-*-*linux*. crisv32-*-linux*. cris-*-linux*. m32r*-*-linux*. tilegx-*-linux*. arm*-*-mingw32ce*. i 34567 86-*-mingw32ce*.
8.2.124 Dec 2018 17:25 minor feature: PR build/23516 (gdb build error under msys+mingw: strip can't handle gdb-add-index.exe) PR build/23623 (install-strip fails). PR rust/23626 (gdb crashes in upstream rust nil-enum test). PR rust/23650 (rust field name access error mentions "foo"). PR gdb/23663 (gdb 8.1.1: undefined rpl_stat function with musl toolchains). PR python/23669 (gdb.execute("show commands") doesn't work). PR python/23714 (Command repetition stops working after gdb.execute). PR gdb/23838 (8.2 regression for invalid -data-directory). PR gdb/23974 ("info os" crash when specifying invalid object). PR gdb/23999 (SYMBOL_LANGUAGE assertion failure on AIX). PR gdb/24003 (Error when binary searching CUs for a specific DIE when using DWZ).
8.206 Sep 2018 05:45 minor feature: Support for the following target has been added: RiscV ELF (riscv*-*-elf) Support for following targets and native configurations has been removed: m88k running OpenBSD (m88*-*-openbsd*). SH-5/SH64 ELF (sh64-*-elf*). SH-5/SH64 (sh*). SH-5/SH64 running GNU/Linux (sh*-*-linux*). SH-5/SH64 running OpenBSD (sh*-*-openbsd*). Various Python API enhancements. Aarch64/Linux enhancements: SVE support. Hardware watchpoints improvements for entities stored at unaligned. Addresses... New "c" response to disable the pager for the rest of the current Command. C expressions can now use _Alignof, and C++ expressions can now. Use alignof. Improved flexibility for loading symbol files. The 'info proc' command nows works on running processes on FreeBSD. Systems as well as core files created on FreeBSD systems. A new --enable-codesign=CERT configure option to automatically. Codesign GDB after build (useful on MacOS X). See the NEWS file for a more complete and detailed list of what this release includes.
8.1.101 Aug 2018 20:45 minor feature: PR gdb/22824 (misleading description of new rbreak Python function in GDB 8.1 NEWS file) PR gdb/22849 (ctrl-c doesn't work in extended-remote). PR gdb/22907 ( Regression gdbserver doesn't work with filename-only binaries). PR gdb/23028 (inconsistent disassemble of vcvtpd2dq). PR gdb/23053 (-D_GLIBCXX_DEgdb-add-index regression). PR gdb/23127 ( AArch64 GDB cannot be used for deging software that uses high Virtual Addresses). PR server/23158 (gdbserver no longer functional on Windows). PR breakpoints/23210 ( 8.1/8.2 Regression Bogus Breakpoint address adjusted from 0xf7fe7dd3 to 0xfffffffff7fe7dd3).
8.101 Feb 2018 03:25 minor feature: Breakpoints on C++ functions are now set on all scopes by default ("wild" matching); Support for inserting breakpoints on functions marked with C++ ABI tags;. Target floating-point arithmetic emulation during expression evaluation (requires MPFR 3.1 or later);. Various Python Scripting enhancements;. Improved Rust support; in particular, Trait objects can now be inspected when deging Rust code;. GDB no longer makes assumptions about the type of symbols without deging information to avoid producing erroneous and often confusing results;. The 'enable' and 'disable' commands now accept a range of breakpoint locations;. New 'starti' command to start the program at the first instruction;. New 'rbreak' command to insert a number of breakpoints via a regular expression pattern (requires Python);. The 'ptype' command now supports printing the offset and size of the fields in a struct;. The 'gcore' command now supports dumping all the memory mappings ('-a' command-line option);. New shortcuts for TUI Single-Key mode: 'i' for stepi, and 'o' for nexti;. GDBserver enhancements: Support for transmitting environment variables to GDBserver;. Support for starting inferior processes with a specified initial working directory;. On Unix systems, support for globbing expansion and variable substitution of inferior command-line arguments;. Various completion enhancements;. The command used to compile and inject code with the 'compile' command is now configurable;. New '--readnever' command-line option to speed the GDB startup when deging information is not needed;. Support for the following new native configurations: FreeBSD/aarch64 (aarch64*-*-freebsd*);. FreeBSD/arm (arm*-*-freebsd*);. Support for the following new targets: FreeBSD/aarch64 (aarch64*-*-freebsd*);. FreeBSD/arm (arm*-*-freebsd*);. OpenRISC ELF (or1k*-*-elf). Removed support for the following targets and native configurations: Solaris2/x86 (i?86-*-solaris2. 0-9 );. Solaris2/sparc (sparc*-*-solaris2. 0-9 );.
8.0.108 Sep 2017 06:05 minor feature: PR breakpoint/21886 (Compressed MIPS code deging impossible due to memory breakpoint misplacement) PR symtab/22002 (Assertion on degee built with -gdwarf-5 -fde-types-section). PR symtab/22003 (Incompatibility with -gdwarf-5 - DW_FORM_implicit_const). PR gdb/22046 (Regression on older kernels for T (stopped) processes). PR sim/20863 (gdb-7.12 powerpc-rtems4.12-gdb does not build on FreeBSD). PR breakpoint/21555 ("error re-setting breakpoint" on PIE executables). PR tdep/21717 ("print fpscr" says ". " until some VFP data register is printed). PR exp/21827 (Regression: gdb command lookup became case-sensitive; but definitions are forced into lowercase). PR remote/22021 (Multi-arch exec fails with a remote target).
7.12.122 Jan 2017 03:15 minor feature: PR tdep/20682 (aarch64 regression: gdb.cp/nextoverthrow.exp) PR server/20733 (Failed to build aarch64_be-linux-gnu GDBserver). PR tdep/20953 (GDB crashes after "set architecture rl78"). PR tdep/20954 (GDB crashes if "set architecture rx"). PR tdep/20955 (GDB internal error in cris-tdep.c). PR build/20712 (gdb 7.12+ doesn't build as C++ on Solaris). PR breakpoint/20653 (string_to_explicit_location has some weird code). PR build/20753 (MinGW compilation errors due to strcasecmp). PR gdb/20977 (GDB exception handling is broken on i686-w64-mingw32). PR python/21048 (backtrace is broken on i686). PR sim/20808 (mips sim build fails due to undefined SD/CPU variables). PR sim/20809 (mips sim build fails for r3900 cpus). PR gdb/20939 (GDB aborts if there is an error in disassembly).
7.1203 Aug 2016 01:25 minor feature: PR remote/19863 (7.10 regression: gdb remote.c due to "setfs" with gdbserver PR gdb/19829 (gdb crashes with PT and reverse next) PR gdb/19676 (gdb fails with assert error if /proc is not mounted). PR gdb/19828 (7.11 regression: non-stop gdb -p : internal error). PR remote/19840 (gdb crashes on reverse-stepi). PR gdb/19858 (GDB doesn't register the JIT libraries on attach). PR gdb/19958 (Breakpoints/watchpoints broken on MIPS Linux PR build/20029 (symfile.c ambiguous else warning). PR python/20037 (GDB use-after-free error). PR gdb/20039 (Using MI/all-stop, can't interrupt multi-threaded program after continue).
7.11.101 Jun 2016 03:45 minor feature: PR remote/19863 (7.10 regression: gdb remote.c due to "setfs" with gdbserver PR gdb/19829 (gdb crashes with PT and reverse next) PR gdb/19676 (gdb fails with assert error if /proc is not mounted). PR gdb/19828 (7.11 regression: non-stop gdb -p : internal error). PR remote/19840 (gdb crashes on reverse-stepi). PR gdb/19858 (GDB doesn't register the JIT libraries on attach). PR gdb/19958 (Breakpoints/watchpoints broken on MIPS Linux PR build/20029 (symfile.c ambiguous else warning). PR python/20037 (GDB use-after-free error). PR gdb/20039 (Using MI/all-stop, can't interrupt multi-threaded program after continue).
7.1111 Feb 2016 06:25 minor feature: PR remote/18965 (new vforkdone stop reply should indicate parent process ID) PR gdb/18957 (build failure in linux-namespaces.c due to setns static declaration). PR gdb/19297 (Internal error on "record btrace": Unexpected branch trace format). PR c++/16957 (gdb segfaults when loading symbols in C++11-enabled application). PR c++/19306 (Incorrect demangling of symbols with ABI tags). PR c++/19307 (Demangler found with fuzz-testing). PR c++/19308 (Demangle C++ Transactional Memory TS (N4514) symbols).
7.10.106 Dec 2015 12:05 minor feature: PR remote/18965 (new vforkdone stop reply should indicate parent process ID) PR gdb/18957 (build failure in linux-namespaces.c due to setns static declaration). PR gdb/19297 (Internal error on "record btrace": Unexpected branch trace format). PR c++/16957 (gdb segfaults when loading symbols in C++11-enabled application). PR c++/19306 (Incorrect demangling of symbols with ABI tags). PR c++/19307 (Demangler found with fuzz-testing). PR c++/19308 (Demangle C++ Transactional Memory TS (N4514) symbols).
7.1007 Jul 2015 13:45 minor feature: PR build/18033 (C++ style comment used in gdb/iq2000-tdep.c and gdb/compile/compile-*.c) PR build/18298 ("compile" command cannot find compiler if tools configured with triplet instead of quadruplet). PR tui/18311 (Random SEGV when displaying registers in TUI mode). PR python/18299 (exception when registering a global pretty-printer in verbose mode). PR python/18066 (argument "word" seems broken in Command.complete (text, word)). PR pascal/17815 (Fix pascal behavior for class fields with testcase). PR python/18285 (ptype expr-with-xmethod causes SEGV).
7.9.115 May 2015 01:25 minor bugfix: C++ style comment used in gdb/iq2000-tdep.c and gdb/compile/compile-*.c. "compile" command cannot find compiler if tools configured with triplet instead of quadruplet. Random SEGV when displaying registers in TUI mode. exception when registering a global pretty-printer in verbose mode. argument "word" seems broken in Command.complete (text, word). Fix pascal behavior for class fields with testcase. ptype expr-with-xmethod causes SEGV.
7.8.219 Jan 2015 18:05 minor feature: PR symtab/17642 ( 7.8 regression internal-error: resolve_dynamic_struct: Assertion `TYPE_NFIELDS (type) gt; 0' failed.) PR binutils/17677 (_bfd_elf_get_synthetic_symtab runs in O(n 2) complexity) PR gdb/16215 (SPARC: can't compute CFA for this frame) PR gdb/17525 (target-async: breakpoint commands not executed when program run from -x script) PR cli/17828 ( 7.8 regression -batch -ex r breaks terminal)
7.915 Jan 2015 07:05 major feature: PR python/17364 (Need better printer names in bound_registers.py) PR build/17104 (CFLAGS="-Wall -Wextra" gdb/confgure --with-babeltrace fails) PR gdb/17345 (babeltrace (1.1.2 and later) complains about the ctf data generated by GDB) PR build/17298 (gcore: Couldn't get registers: No such process) PR python/17342 (Xmethod Python is not Python 3 compatible) PR python/17355 (Crash on Python frame filters with unreadable arg) PR guile/17367 (computation of guild path wrong when pkg-config script supplied as arg to --with-guile) PR gdb/17247 (gdb freezes on multi threaded app) PR gdb/17347 (Regression: GDB stopped on run with attached process) PR gdb/17407 (Regression for Linux vDSO reading) PR server/17457 (aarch64/gdbserver: wrong floating point registers display) PR server/17487 (state- gt;dr_control_mirror == 0 failed assertion in gdbserver on Windows) PR gdb/17472 (with annotations, input while executing in the foreground crashes readline/gdb) PR gdb/17471 (repeating a background command makes it foreground) PR cli/17300 (crash in non-stop mode with continue -a amp; (readline_callback_read_char() called with no handler!)) PR python/17372 (python hangs when displaying help()) PR python/17408 (../../gdb/infrun.c:5256: internal-error: switch_back_to_stepped_thread: Assertion `!schedlock_applies(1)' failed.)
7.8.130 Oct 2014 03:19 minor feature: PR python/17364 (Need better printer names in bound_registers.py) PR build/17104 (CFLAGS="-Wall -Wextra" gdb/confgure --with-babeltrace fails) PR gdb/17345 (babeltrace (1.1.2 and later) complains about the ctf data generated by GDB) PR build/17298 (gcore: Couldn't get registers: No such process) PR python/17342 (Xmethod Python is not Python 3 compatible) PR python/17355 (Crash on Python frame filters with unreadable arg) PR guile/17367 (computation of guild path wrong when pkg-config script supplied as arg to --with-guile) PR gdb/17247 (gdb freezes on multi threaded app) PR gdb/17347 (Regression: GDB stopped on run with attached process) PR gdb/17407 (Regression for Linux vDSO reading) PR server/17457 (aarch64/gdbserver: wrong floating point registers display) PR server/17487 (state- gt;dr_control_mirror == 0 failed assertion in gdbserver on Windows) PR gdb/17472 (with annotations, input while executing in the foreground crashes readline/gdb) PR gdb/17471 (repeating a background command makes it foreground) PR cli/17300 (crash in non-stop mode with continue -a amp; (readline_callback_read_char() called with no handler!)) PR python/17372 (python hangs when displaying help()) PR python/17408 (../../gdb/infrun.c:5256: internal-error: switch_back_to_stepped_thread: Assertion `!schedlock_applies(1)' failed.)
7.801 Aug 2014 21:28 major feature: Guile scripting support. Python scripting enhancements. New commands, options, convenience variables/options. Remote Protocol and GDBserver enhancements. New target configurations (PowerPC64 GNU/Linux little-endian). btrace enhancements. ISO C99 variable length automatic arrays support. The "compare-sections" command now works on all targets. The "target native" command now connects to the native target.