On Mon, 2013-10-07 at 10:53 -0700, Josh Stone wrote:
BTW, I thought of another corner case which I think will break
offset-resuming in dwarf_getfuncs: DW_AT_import+DW_FORM_GNU_ref_alt.
The die offsets from the main file and alt file will almost surely
overlap, and if you happen to have a subprogram at the same offset in
both, then it's not possible to tell which one to resume on.
Unfortunately you seem to be right, even if that is somewhat unlikely.
Must the offsets used by dwarf_getfuncs be die offsets? After all,
they
are type ptrdiff_t, not Dwarf_Off. This particular problem might be
solved by instead using die->addr for the "offset" value.
Yes, that seems to be the correct fix.
Please check the attached.
Thanks,
Mark