This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][DWARF] Fix setting DW_AT_ranges offset of Skeleton CU
ClosedPublic

Authored by ayermolo on Aug 2 2023, 6:00 PM.

Details

Summary

Fixed a bug where when Skelton CU had DW_AT_ranges, it the output CU DW_AT_ranges
offset was relative, and not absolute.

Diff Detail

Event Timeline

ayermolo created this revision.Aug 2 2023, 6:00 PM
Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
ayermolo requested review of this revision.Aug 2 2023, 6:00 PM
Herald added a project: Restricted Project. · View Herald Transcript
maksfb accepted this revision.Aug 3 2023, 1:47 AM

LGTM. Please revise the summary before committing.

bolt/lib/Rewrite/DWARFRewriter.cpp
1248

Are you checking DWOId somewhere else? If not, convert to error.

This revision is now accepted and ready to land.Aug 3 2023, 1:47 AM
ayermolo added inline comments.Aug 3 2023, 7:06 AM
bolt/lib/Rewrite/DWARFRewriter.cpp
1248

not in all code paths that can lead to this function execution.

ayermolo retitled this revision from [BOLT][DWARF] Fix handling CU with DW_AT_ranges to [BOLT][DWARF] Fix setting DW_AT_ranges offset of Skeleton CU.Aug 3 2023, 7:28 AM
ayermolo edited the summary of this revision. (Show Details)
ayermolo updated this revision to Diff 546873.Aug 3 2023, 7:47 AM

addressed comments

ayermolo updated this revision to Diff 546877.Aug 3 2023, 7:56 AM

Restored formating in rest of the file