binutils Newspaper
OCTOBER 6, 2026
gdb/sparc — Proposed

gdb/sparc: implement PRSTATUS elf32-sparc handler

Patch adds a handler for the PRSTATUS note in SPARC ELF32 coredumps to GDB.

This patch resend addresses an issue in GDB where SPARC ELF32 coredumps contain unparsed PRSTATUS notes, leading to incorrect core dump interpretations. It introduces a handler for the PRSTATUS note within the BFD library’s elf32-sparc.c file, enabling GDB to correctly parse these notes and improve core dump analysis.

In the Thread 2 participants
  1. Michal Lach <michal.lach@phoenix-rtos.com> proposer

    Submits a patch to add a handler for the PRSTATUS note in SPARC ELF32 coredumps to GDB, resolving issues with unparsed notes.

    “Some SPARC ELF32 coredumps emit a PRSTATUS note which is left unparsed without a handler in GDB, leading to incorrectly viewed coredumps.”
  2. Jakub Klimek <jakub.klimek@phoenix-rtos.com> contributor

    Original author of the patch, providing context that unparsed PRSTATUS notes in SPARC ELF32 coredumps lead to incorrect interpretations in GDB.

Technical Tradeoffs

  • Improves GDB's ability to interpret SPARC ELF32 coredumps by adding specific parsing logic, with minimal impact on other architectures.

In Details

This patch targets the GDB debugger and the BFD library's handling of SPARC ELF32 core dumps. Specifically, it adds a new backend handler (elf32_sparc_grok_prstatus) to parse the PRSTATUS ELF note. This note contains process status information, including signal and process ID, which GDB previously failed to interpret correctly, leading to corrupted core dump views.

For Context
BFD
Binary File Descriptor library, used by GNU Binutils and GDB to provide a common interface to various object file formats.
SPARC
A RISC instruction set architecture developed by Sun Microsystems.
ELF32
Executable and Linkable Format, a standard file format for object files, executables, and core dumps on Unix-like systems, in its 32-bit variant.
coredump
A file containing the memory image of a process at the time it crashed, used for debugging.
PRSTATUS note
An ELF note type found in core dumps that contains process status information, such as the signal that caused the dump and the process ID.
Filed Under: gdbbinutilssparccoredumpelf