[PATCH] D70081: DWARFDebugLoclists: add location list "interpretation" logic
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 11 16:18:52 PST 2019
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:61-63
+ Optional<SectionedAddress> LowPC = LookupAddr(E.Value0);
+ if (!LowPC)
+ return createResolverError(E.Value0, E.Kind);
----------------
This error misses an opportunity to say why the indirect address resolution failed - was it because the section is missing entirely, or because the index provided is outside the range of the addresses present in the address pool. "nice to have/at some point" but if the mood strikes you/you see a nice way to support that better (Error<SectionedAddress> rather than Optional<SectionedAddress> from the lookup callback, I guess - it could be then stitched together - taking the stringified version of that error and adding it into a string that has the local context here, the LLE and anything else that might be useful (offset in the section, though that isn't preserved - no worries))
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp:126
+ OS << " => ";
+ Loc.get()->Range->dump(OS, Data.getAddressSize(), DumpOpts);
+ }
----------------
Future change: should we roll the DWARFFormValue::dumpAddressSection from DWARFDie.cpp::dumpRanges into DWARFAddressRange::dump to get the pretty printing of section name/number in here too?
(currently probably not super important - I don't think we ever produce location lists for globals, and locals are all in one function which is currently one section - but with Propeller it'd be possible to have a location list across multiple sections so dumping the section name/number would be useful then)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70081/new/
https://reviews.llvm.org/D70081
More information about the llvm-commits
mailing list