binutils Newspaper
NOVEMBER 30, 2026
libsframe — Proposed

libsframe: Fix FP data index in flex FDE example

A documentation fix in libsframe corrects the indexing for frame pointer (FP) data in a flexible exception data (FDE) example.

This patch corrects an error in the libsframe documentation’s example of generating stack traces using flexible FDEs. Specifically, it adjusts the data word indexes used for frame pointer tracking. The fix ensures that index 4 is used when RA-valid entries are present, and index 3 is used when the RA offset is invalid, aligning the example with the specification.

In Details

This patch addresses a documentation error within the libsframe library's specification regarding flexible FDEs. The sframe-spec.texi file contains an example demonstrating how to generate stack traces. The error lies in the indices used to access frame pointer (FP) tracking data when dealing with the Return Address (RA) and its offset. The fix correctly assigns fp_data_index to 4 for RA-valid entries and 3 for invalid RA offsets, ensuring the example accurately reflects the SFrame specification.

For Context
libsframe
A library likely related to stack frame unwinding or exception handling, providing mechanisms to parse and interpret stack trace information.
FP
Frame Pointer. A register or memory location that typically points to the base of the current function's stack frame, used for accessing local variables and parameters.
FDE
Frame Description Entry. Data structures used in debugging information (like DWARF) that describe how to unwind the stack for a particular function.
flexible FDE
A type of Frame Description Entry that allows for more dynamic or variable structures, possibly to optimize space or handle complex unwinding scenarios.
RA
Return Address. The memory address where the program should resume execution after the current function returns.
Filed Under: binutilslibsframedocumentationdebuggingFDE