GDB Debugger Release 17

Presented debugger release GDB 17.1 (the first release of the 17.x series, the 17.0 branch was used for development). GDB supports source-level debugging for a wide range of programming languages (Ada, C, C++, D, Fortran, Go, Objective-C, Modula-2, Pascal, Rust, etc.) on various hardware (i386, amd64, ARM, Power, Sparc, RISC-V, LoongArch, etc.) and software platforms (GNU/Linux, *BSD, Unix, Windows, macOS).

The most notable improvements:

  • For x86-64 systems, support for the shadow stack has been implemented (shadow stack), which appeared in the Linux kernel 6.6 and allows you to block the operation of many exploits, using the hardware capabilities of Intel processors to protect against overwriting the return address from a function in the event of a buffer overflow on the stack. The essence of the protection is that after control is transferred to a function, return addresses are stored by the processor not only in the regular stack, but also in a separate “shadow” stack, which cannot be changed directly. Before the function exits, the return address is popped from the shadow stack and checked against the return address from the main stack.
  • Added the ability to debug Linux programs compiled for the AArch64 architecture and using the GCS (Guarded Control Stack) extension. GCS provides tools for hardware protection of return addresses from functions and blocking exploits that use return-oriented programming methods (ROP – Return-Oriented Programming, an exploit is formed from already existing pieces of machine instructions that end with a return control instruction).
  • For systems with the rv64gc architecture, full support for recording the program execution process has been implemented for debugging in the reverse direction and replaying sections of code.
  • The “-stopped” and “-running” options have been added to the “info threads” command to show only stopped or only running threads.
  • The “info sharedlibrary” command on Linux and FreeBSD platforms provides the display of addresses for the entire memory range allocated shared library (previously only the base address and addresses for the .text section were shown).
  • Enabled the ability to use checkpoints in Linux while debugging multiple processes.
  • Expanded support for namespaces linker (linker namespace).
  • Emoji characters are used to highlight errors and warnings.
  • On the Linux platform, there is a built-in ability to access thread-local variables (Thread-Local Storage, TLS), used in the absence of the libthread_db library. The feature is available for x86_64, aarch64, ppc64, s390x and riscv architectures when built with GLIBC or MUSL.
/Reports, release notes, official announcements.