[PATCH 4/4] eu-stacktrace: add unwind origin diagnostics to eu-stack

Serhei Makarov serhei@serhei.io
Thu Oct 17 17:27:23 GMT 2024



On Thu, Oct 17, 2024, at 1:22 PM, Mark Wielaard wrote:
> I think (but haven't tried) only print_frame has to have a char *
> argument, print_inline_frames and print_frames can still pass around an
> Dwfl_Unwound_Source. Both print_frames and print_inline_frames can then
> call print_frame with the string argument from unwound_source_str (or
> the static string "inline" in the print_inline_frames case for the
> "bottom" frame).
I can also do that. The asymmetry between print_frames/print_inline_frames is a bit weird.

One more needed simplification I noticed:

i > 1 ? "inline" : ...
can just be replaced with "inline"

The prior lines have a guard that skips the scope if dwarf_tag(scope) != DW_TAG_inlined_subroutine, hence anything printed through that invocation is already known to be an inlined invocation.


More information about the Elfutils-devel mailing list