The release of GDB 17.1 has been announced (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).
Most notable improvements:
- Support for shadow stack has been implemented for x86-64 systems. This feature appeared in Linux kernel 6.6 and allows blocking many exploits by using hardware capabilities of Intel processors to protect against overwriting the return address from a function in the event of a stack buffer overflow. The essence of the protection is that after control is passed to a function, return addresses are stored by the processor not only in the normal stack but also in a separate 'shadow' stack, which cannot be modified directly. Before exiting the function, the return address is extracted from the shadow stack and compared with the return address from the main stack.
- The ability to debug Linux programs compiled for the AArch64 architecture using the GCS (Guarded Control Stack) extension has been added. GCS provides means for hardware protection of function return addresses and blocking exploits that use return-oriented programming (ROP), where the exploit is formed from already existing chunks of machine instructions ending with a return instruction.
- For systems with the rv64gc architecture, full support for recording a program's execution for reverse debugging and code replay has been implemented.
- The 'info threads' command has been enhanced with '-stopped' and '-running' options to show only stopped or only running threads.
- The 'info sharedlibrary' command on Linux and FreeBSD platforms now displays addresses for the entire range of memory allocated to the shared library (previously, only the base address and addresses for the .text section were shown).
- The capability to use state snapshots (checkpoint) in Linux while concurrently debugging multiple processes has been provided.
- Support for linker namespaces has been expanded.
- Emoji symbols have been employed to highlight errors and warnings.
- The Linux platform has implemented built-in access to thread-local storage (TLS), used in the absence of the libthread_db library. This feature is available for x86_64, aarch64, ppc64, s390x, and riscv architectures when built with GLIBC or MUSL.
- The command 'set riscv numeric-register-names' has been added to display RISC-V registers using their numeric identifiers instead of ABI names.
- Improvements have been made to the Python API. New classes gdb.Color and gdb.ParameterPrefix have been added, along with the gdb.Value.is_unavailable attribute and the gdb.warning() function. Support for older Python versions has been discontinued — only Python 3.4 and newer are supported.
- Enhancements have been made to the Guile API. The type '' has been introduced.
- The capabilities of the DAP (Debugger Adapter Protocol) have been expanded: support for 'completions' requests has been implemented and the option '--binary-output' has been added to disable newline character conversion on Windows platforms.
- New variables $_colorsupport (list of color spaces supported by the terminal), $linker_namespace_count, and $_linker_namespace (list of active linker namespaces) have been added.
- Options '--disable-gdb-compile' have been introduced to disable the compilation subsystem, as well as '--disable-gdb-dwarf-support' and '--disable-gdb-mdebug-support' to disable debug information in DWARF and mdebug/ecoff formats.
- Support for UST (static tracepoint) has been discontinued in gdbserver.
Source: opennet.ru
