[PATCH] D52444: [DWARF] Make llvm-dwarfdump display the .debug_loc.dwo section (fixes PR38991)

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 25 13:55:20 PDT 2018


dblaikie added a comment.

In https://reviews.llvm.org/D52444#1245403, @wolfgangp wrote:

> In https://reviews.llvm.org/D52444#1244247, @dblaikie wrote:
>
> > Should the address size be required/used for parsing the debug_loc.dwo
> >  section? I would think there shouldn't be any addresses, or otherwise
> >  address-size-dependent there?
>
>
> Yes, but currently DWARFExpression is oblivious to DWO and insists on having a valid Address Size. This would have to be fixed before we can omit the address size.


Is that sufficiently expensive to be worth doing this workaround in the interim?

What if the address size was hardcoded to 4 here, for example? What would go wrong in that case?

(could leave a fixit that this shouldn't be needed - maybe use Optional for the address size, so it asserts if someone doesn't provide an address size but it ends up being needed down the line)


https://reviews.llvm.org/D52444





More information about the llvm-commits mailing list