This is the mail archive of the
mailing list for the elfutils project.
Re: Using dwfl to enumerate frames of current thread
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 20 Aug 2015 16:15:43 +0200
- Subject: Re: Using dwfl to enumerate frames of current thread
On Thu, 2015-08-20 at 13:09 +0200, Ben Gamari wrote:
> It turns out that libbacktrace only uses DWARF line information, not
> the .debug_frames unwinding information.
It might indeed be that libbacktrace only handles .eh_frame.
If you already generate .debug_frame it should be easy to
generate .eh_frame information. The formats are almost the same with a
few small encoding differences (also .eh_frame can have a .eh_frame_hdr
index which makes address lookup and unwinding much more efficient).
Alternatively it might not be too hard to make libbacktrace
use .debug_frame if it is already loading the .debug_line info then
making it also load .debug_frame and interpret it mostly like .eh_frame
is. (elfutils libdw cie.c/fde.c use CFI_IS_EH to distinquish if you want
to see some of the practical differences)
Again, not wanting you to push away towards another library, but simply
pointing out different options.