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: Sat, 22 Aug 2015 00:53:35 +0200
- Subject: Re: Using dwfl to enumerate frames of current thread
On Fri, Aug 21, 2015 at 06:25:38PM +0200, Ben Gamari wrote:
> Mark Wielaard <firstname.lastname@example.org> writes:
> > And this is the problem. Sorry. I should have realized earlier.
> > We use the .debug_aranges to get a quick index of the CUs and which
> > address ranges they cover. In the case that there is no .debug_aranges
> > we could do a full scan of all CUs. But that is somewhat inefficient,
> > since no .debug_aranges could also mean that there really are no
> > CUs with address scope DIEs (however that is probably unlikely). But
> > if there is a .debug_aranges then we do assume it is complete. I am
> > thinking whether we should still scan all CUs anyway if we are
> > looking for an address that is really inside a module. But I think
> > that would quickly become very inefficient.
> Does elfutils need .debug_ranges as well?
Only if the DWARF producer created DIEs with DW_AT_ranges attributes.
You seem to never do that. If your range is just one simple one you can
just use a DW_AT_low_pc/high_pc pair and .debug_ranges will never be
Also see Appendix B -- Debug Section Relationships in
http://dwarfstd.org/doc/DWARF4.pdf for a picture of which and how
different debug sections might refer to each other.