Skip to content
  • Mark Wielaard's avatar
    Add support for using elfutils as unwinder. · dfefa9f0
    Mark Wielaard authored
    This adds support for using elfutils as unwinder with -w. Since elfutils
    0.158 elfutils contains a simple unwinder interface that matches nicely
    on the ltrace backtrace support.
    
    The code reuses the libunwind infrastructure already in ltrace where
    possible (by defining HAVE_UNWINDER which is 1 if either libunwind or
    elfutils is used). It also reuses the ltrace proc_add_library callback
    to keep track of the ELF files mapped for the unwinder.
    
    The current implementation matches the output as if libunwind was used.
    But elfutils can also provide some more information since it can lookup
    the DWARF debuginfo. So if the source info of an address can be found
    through elfutils the backtrace will also include this as an additional
    output line per frame.
    dfefa9f0