[PATCH] D58698: [DWARFFormValue] Don't consider DW_FORM_data4/8 to be section offsets.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 26 15:06:03 PST 2019
dblaikie added inline comments.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFFormValue.cpp:200
+ // In DWARF3 DW_FORM_data4 and DW_FORM_data8 served also as a section
+ // offset. If we don't have a DWARFUnit, default to the old behavior.
+ if (Form == DW_FORM_data4 || Form == DW_FORM_data8)
----------------
aprantl wrote:
> dblaikie wrote:
> > aprantl wrote:
> > > aprantl wrote:
> > > > "some producers" here means older versions of clang, but since older versions of clang also default to DWARF 2 (at least on Darwin) I think this is a safe change.
> > > To clarify: what we are dropping here is support for compilers that claim to emit DWARF 3+ but still is a FORM_data4 for a section offset. I'm fine with dropping support for these.
> > >
> > > I'm not a fan of DWARFFormValue optionally having a DWARFUnit pointer. This is asking for trouble. If we could assert that we have on in this condition (or get rid of the optionality) I'd be much happier.
> > I mean... we could drop support for this convenience feature when dumping DWARFv3 and older entirely?
> > I mean... we could drop support for this convenience feature when dumping DWARFv3 and older entirely?
>
> Probably not. This is generic libDebugInfo code so it's not a convenience feature, but necessary functionality. I ran across this bug in dsymutil, too, for example.
>
Ah, fair enough
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58698/new/
https://reviews.llvm.org/D58698
More information about the llvm-commits
mailing list