This is an archive of the discontinued LLVM Phabricator instance.

[DWARFLibrary] Add support to re-construct cu-index
AbandonedPublic

Authored by ayermolo on Dec 7 2022, 1:58 PM.

Details

Summary

According to DWARF5 specification and gnu specification for DWARF4 the offset
entry in the CU/TU Index is 32 bits. This presents a problem when
.debug_info.dwo in DWP file grows beyond 4GB. The CU Index becomes partially
corrupted.

This diff adds manual parsing of .debug_info.dwo/.debug_abbrev.dwo to
reconstruct CU index in general, and TU index for DWARF5. This is a work around
until DWARF6 spec is finalized.

Next patch will change internal CU/TU struct to 64 bit, and change uses as
necessary. The plan is to land all the patches in one go after all are approved.

This patch originates from the discussion in: https://discourse.llvm.org/t/dwarf-dwp-4gb-limit/63902

Depends on D139577

Diff Detail

Event Timeline

ayermolo created this revision.Dec 7 2022, 1:58 PM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added subscribers: hoy, modimo, wenlei and 3 others. · View Herald Transcript
ayermolo requested review of this revision.Dec 7 2022, 1:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2022, 1:58 PM

Redid D137882 after committing it by mistake.

There's no need to send a new review. The other review still stands, was approved, has all the context - it can be reopened after the revert, if that's useful for you to keep track of the work, etc.

There's no need to send a new review. The other review still stands, was approved, has all the context - it can be reopened after the revert, if that's useful for you to keep track of the work, etc.

oh good to know. Let me re-open those then. Thanks.

ayermolo abandoned this revision.Dec 7 2022, 3:39 PM