[PATCH v6 0/5] glibc: Add SFrame support for stack backtracing

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Jul 2 13:44:39 GMT 2025



On 02/07/25 10:10, Claudiu Zissulescu-Ianculescu wrote:
>> It is not clear to me how this was tested, since there is no regression
>> tests.  Is it because with --enable-sframe the -Wa,--gsframe will be
>> used by default for all tests and thus the backtrace ones will use
>> SFRAME? 
> 
> Indeed, that is what I did.
> 
>>
>> If it were the case I think we will need to add tests on backtrace for
>> *both* cases, by disabling -Wa,--gsframe on some and adding
>> -Wa,--gsframe on another to get full coverage independent whether
>> --enable-sframe is used.
> 
> It is not clear for me how I can control CFLAGS option for a test. I can
> add flags, but not much else.
> Whenever the sframe is enable, the sframe option(-Wa,-gsframe) is added
> to global CFLAGS. Actually, this is my current bottleneck in making a
> half/half example where I should demonstrate how sframe stack backtracer
> is falling back onto dwarf unwinder.
> Any help here is much appreciated.

You need to filter out -Wa,-gsframe for the backtrace tests on debug
and add gsframe tests for 'ifeq ($(enable-gsframe),yes)' (it can be
just a #include "tst-backtraceX.c").

Otherwise we still start to loss coverage and only test for sframes
since last patch enables it by default if binutils supports it.


More information about the Libc-alpha mailing list