This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][DWARF] Fix gdb index section
ClosedPublic

Authored by ayermolo on Jan 26 2022, 10:52 AM.

Details

Summary

Since we now re-write .debug_info the DWARF CU Offsets can change.
Just like for .debug_aranges the GDB Index will need to be updated.

Diff Detail

Event Timeline

ayermolo created this revision.Jan 26 2022, 10:52 AM
ayermolo requested review of this revision.Jan 26 2022, 10:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 10:52 AM
maksfb accepted this revision.Jan 26 2022, 10:53 AM

LGTM

This revision is now accepted and ready to land.Jan 26 2022, 10:53 AM

Please add a test.

maksfb requested changes to this revision.Jan 26 2022, 11:48 AM
This revision now requires changes to proceed.Jan 26 2022, 11:48 AM
ayermolo updated this revision to Diff 403383.Jan 26 2022, 1:00 PM

Added Test, fixed small bug.

maksfb accepted this revision.Jan 26 2022, 1:06 PM
This revision is now accepted and ready to land.Jan 26 2022, 1:06 PM
yota9 added inline comments.Jan 26 2022, 1:07 PM
bolt/test/X86/gdbindex.test
2

Just curious is this necessary? Also is the %T (directory) meant?
Also should we convert binaries to yaml?

ayermolo added inline comments.Jan 26 2022, 1:10 PM
bolt/test/X86/gdbindex.test
2

Yes %t refers to a directory. It's nice to start with in clean state I think.
I think it's fine. This is basically re-purposed test from llvm/test/DebugInfo

Amir requested changes to this revision.Jan 26 2022, 2:55 PM

Let me try to refactor the test so that we don't check in the binary.

This revision now requires changes to proceed.Jan 26 2022, 2:55 PM
ayermolo updated this revision to Diff 403421.Jan 26 2022, 3:46 PM

Changed test from using a binary

ayermolo updated this revision to Diff 403422.Jan 26 2022, 3:47 PM

minor nit

Amir accepted this revision.Jan 26 2022, 4:09 PM

Thanks for removing the binary from the test!

This revision is now accepted and ready to land.Jan 26 2022, 4:09 PM
This revision was landed with ongoing or failed builds.Jan 27 2022, 12:08 PM
This revision was automatically updated to reflect the committed changes.