On Wed, Oct 16, 2024, at 11:39 PM, Aaron Merey wrote:
> Hi Serhei,
>
> On Tue, Oct 15, 2024 at 11:28 AM Serhei Makarov <ser...@serhei.io> wrote:
>> 
>> Track the method used to unwind each Dwfl_Frame using an enum field
>> unwound_source; provide access to the field. Then use that in
>> eu-stacktrace to display the unwind methods used for each process.
>> 
>> This is an important diagnostic to verify how many processes are
>> adequately covered by the eh_frame unwinder.
>> 
>> * libdw/libdw.map (ELFUTILS_0.192): Add dwfl_frame_unwound_source,
>>   dwfl_unwound_source_str.
>> * libdwfl/libdwfl.h (Dwfl_Unwound_Source): New enum.
>>   (dwfl_frame_unwound_source)
>>   (dwfl_unwound_source_str): New functions.
>> * libdwfl/dwfl_frame.c (dwfl_frame_unwound_source)
>>   (dwfl_unwound_source_str): New functions.
>> * libdwfl/dwflP.h: Add INTDECL for dwfl_frame_unwound_source,
>
> Should be libdwflP.h.
Fixed.

> It might be worth adding a "Keep this the last entry." comment right
> above DWFL_UNWOUND_NUM.  This is done for libelf.h enums.
Fixed.

>
> Also is DWFL_UNWOUND_UNKNOWN needed? It isn't used anywhere.
Removed. An earlier version of the code required it, but this one no longer 
does.

> What does worst_unwound mean? It looks like the enum values are ordered.
> A comment that describes this ordering would be helpful.
Added comments at the fprintf that displays (last %s, worst %s)
and at the enum definition (also important):

"This identifies the method used to unwind a particular Dwfl_Frame.
The enum order matches the order of preference for unwinding
(i.e. eh_frame is preferred to dwarf is preferred to ebl)."

Reply via email to