Hi,
This patch adds support for dwz multi debuginfo files to libdw.
Fedora is planning to use these in the next release:
https://fedoraproject.org/wiki/Features/DwarfCompressor
The new DW_FORMs are proposed for DWARF5:
http://www.dwarfstd.org/ShowIssue.php?issue=120604.1
But are currently only a GNU extension written by the dwz tool:
http://sourceware.org/git/?p=dwz.git;a=summary
libdw was already setup anticipating such a scheme, so adding support
wasn't so hard. Basically a Dwarf descriptor can now have an alternative
Dwarf descriptor that is consulted whenever one of the new DW_FROM_*alts
is seen.
dwarf_begin_elf will find the right dwz alternative to use. But this is
currently tied somewhat to how fedora implemented this. There are also
two new functions dwarf_getalt () and dwarf_addalt () that can be used
to directly manipulate the alternative Dwarf descriptor. I anticipate
those will be used by some new libdwfl callbacks if we decide those are
necessary to support other ways to get/set alternative Dwarf
descriptors.
This is only lightly tested, but some quick stap queries on rawhide
packages that already had dwz files seemed to return the right results.
I did add some small test binary files and a readelf test to show the
results. I'll add some more tests once we decide whether this is the
proper way to support this.
Please take a look at the proposed implementation and let me know
whether it looks OK or some other approach might be better. I also
pushed this to the mjw/dwz branch.
Thanks,
Mark