[PATCH,V1 00/14] Definition and support for SFrame unwind format

Jan Beulich jbeulich@suse.com
Fri Sep 30 08:09:23 GMT 2022


On 30.09.2022 02:04, Indu Bhagat via Binutils wrote:
> What is SFrame format and why do we need it
> -------------------------------------------
> SFrame format is the Simple Frame format.  It can be used to represent the
> minimal necessary information for backtracing.  As such, it only encodes how to
> recover the CFA (based on SP/FP) and the return address (RA) for all
> instructions of a program.
> 
> The format is supported on AMD64 and AARCH64 ABIs only.  The information stored
> in the .sframe section is a subset of what .eh_frame can convey: .eh_frame can
> convey how to resurrect all callee-saved registers, if need be; but .sframe
> does not.

I expect the question was asked before, but since the summary here doesn't
answer it: What about cases where the return address is stored in a
callee-saved register? You won't be able to determine its value if that
wasn't the leaf-most function in the active call chain and some inner
function saved and then modified that (presumably) GPR. The same would
likely apply if the return address was saved to some secondary stack.

Jan


More information about the Binutils mailing list