[PATCH v4 3/4] gas: sframe: Represent .cfi_undefined RA as FRE without offsets
Jose E. Marchesi
jose.marchesi@oracle.com
Mon Jul 28 18:34:22 GMT 2025
Hello Jens.
> diff --git a/libsframe/doc/sframe-spec.texi b/libsframe/doc/sframe-spec.texi
> index 7307789df264..346d29a51ac0 100644
> --- a/libsframe/doc/sframe-spec.texi
> +++ b/libsframe/doc/sframe-spec.texi
> @@ -165,6 +165,11 @@ CFA offset adjustment and then scale down by CFA offset alignment factor).
> @item SFRAME_V2_S390X_CFA_OFFSET_DECODE: Decode CFA offset (i.e., scale up
> by CFA offset alignment factor and then revert CFA offset adjustment).
> @end itemize
> +@item
> +An SFrame FRE info word offset count of zero indicates that the return
> +address (RA) is undefined for the range of PCs covered by the SFrame FRE.
> +A stack tracer may use this as indication that an outermost frame has been
> +reached and the stack trace is complete.
> @end itemize
>
> SFrame version 1 is now obsolete and should not be used.
> @@ -771,7 +776,10 @@ SFRAME_FRE_OFFSET_4B.
> @item 1-4
> @tab @code{fre_offset_count}
> @tab A max value of 15 is allowed. Typically, a value of upto 3 is sufficient
> -for most ABIs to track all three of CFA, FP and RA.
> +for most ABIs to track all three of CFA, FP and RA. A value of zero indicates
> +that the return address (RA) is undefined. A stack tracer may use this as
> +indication that an outermost frame has been reached and the stack trace is
> +complete.
>
> @item 0
> @tab @code{fre_cfa_base_reg_id}
Even if sort of backwards-compatible (a current stack tracer may well
decide that the sframe data is corrupted when finding such a FRE and
return an empty list of PCs) this is still a format change, so it
probably needs a NEWS entry...
More information about the Binutils
mailing list