TUESDAY, OCTOBER 27, 2026
gdb/sparc
GDB implements PRSTATUS ELF32-SPARC handler for core dumps.
GDB now parses PRSTATUS notes in SPARC ELF32 core dumps, improving core file analysis.
This commit introduces a handler for the PRSTATUS note within SPARC ELF32 core dump files. Previously, GDB could not parse this information, leading to incomplete or incorrect analysis of core dumps. The new handler correctly extracts the signal and process ID from the PRSTATUS note, enabling more accurate debugging.
In Details
This patch adds elf32_sparc_grok_prstatus to bfd/elf32-sparc.c to handle the NT_PRSTATUS note type in SPARC ELF32 core files. This enables GDB to extract pr_cursig and pr_pid from the note, populating the core->signal and core->lwpid fields respectively. This addresses a gap in core dump parsing for this architecture.
For Context
- PRSTATUS
- A standard structure found in Linux core dump files (specifically within ELF notes) that contains process status information, including the signal that caused the dump and the process ID.
- ELF
- Executable and Linkable Format, a common standard file format for executables, object code, shared libraries, and core dumps on many Unix-like systems.
- Core dump
- A file containing the memory image of a process that terminated abnormally, used for debugging.
- BFD
- The Binary File Descriptor library, a component of GNU Binutils that provides a standardized interface for reading and writing various executable file formats.