[PATCH v4 3/4] gas: sframe: Represent .cfi_undefined RA as FRE without offsets

Jens Remus jremus@linux.ibm.com
Tue Jul 29 10:55:17 GMT 2025


Hello Jose!

On 7/28/2025 8:34 PM, Jose E. Marchesi wrote:
>> 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...

Sure.  Will add a NEWS entry for the assembler and binutils, as the
output of objdump/readelf changes when dumping SFrame.

Regards,
Jens
-- 
Jens Remus
Linux on Z Development (D3303)
+49-7031-16-1128 Office
jremus@de.ibm.com

IBM

IBM Deutschland Research & Development GmbH; Vorsitzender des Aufsichtsrats: Wolfgang Wendt; Geschäftsführung: David Faller; Sitz der Gesellschaft: Böblingen; Registergericht: Amtsgericht Stuttgart, HRB 243294
IBM Data Privacy Statement: https://www.ibm.com/privacy/



More information about the Binutils mailing list