[PATCH] D146662: DebugInfo: Rebuild dwp debug_info index column from v5 indexes more robustly

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 14:32:51 PDT 2023


dblaikie created this revision.
dblaikie added a reviewer: ayermolo.
Herald added subscribers: arphaman, JDevlieghere, hiraditya.
Herald added a project: All.
dblaikie requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

the v4 rebuilding is a best-effort because it's not possible to reliably
parse the DWO ID as it requires the abbrev section (& if the index isn't
trustworthy then there's no way to find the associated abbrev section
contribution for a given info section contribution)

But in v5 the DWO ID/type signature is in the header and can be rebuilt
losslessly (only at the cost of performance of rescanning/parsing the
headers of all the units), so let's implement that.

the testing isn't /ideal/ - I think the testing should've been
implemented as a hardcoded dwp file with a corrupted/incorrect index,
then the test could've demonstrated that reparsing the index produces
the right answer - but this is a quick port of the existing v5 test back
to v4 so that we don't lose coverage on the v4 codepath now that it's
separated from the v5 codepath.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146662

Files:
  llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
  llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v4.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146662.507512.patch
Type: text/x-patch
Size: 8544 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230322/a7a98607/attachment-0001.bin>


More information about the llvm-commits mailing list