This is an archive of the discontinued LLVM Phabricator instance.

[GSYM] Add Split Dwarf Support to DwarfTransformer
ClosedPublic

Authored by ayermolo on Jan 28 2022, 5:34 PM.

Details

Summary

The convert only worked on CUs in main binary.
If it's a skeleton CU it will now use the DWO CU
when invoking handleDie.

Test Plan:
llvm-lit

Diff Detail

Event Timeline

ayermolo created this revision.Jan 28 2022, 5:34 PM
ayermolo requested review of this revision.Jan 28 2022, 5:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 28 2022, 5:34 PM
clayborg requested changes to this revision.Jan 28 2022, 10:20 PM

I can help come up with a test for this before we commit it.

llvm/lib/DebugInfo/GSYM/DwarfTransformer.cpp
440

Fix indent per pre-merge above

This revision now requires changes to proceed.Jan 28 2022, 10:20 PM

So we need a test for this. All we need to do is to create a .o file with .dwo sections inlined into it and then test that we can successfully run llvm-gsymutil on it. So if we can get a .o file with .dwo inlined, then we run obj2yaml and verify that yaml2obj successfully reconstructs the .o file intact (hoping that obj2yaml handles all DWARF sections including the ones for .dwo), then we can make a test case very similar to this one:

llvm/test/tools/llvm-gsymutil/X86/elf-dwarf.yaml

This test has the yaml inlined into it and then runs FileCheck on the resulting llvm-gsymutil invocations.

ayermolo updated this revision to Diff 405757.Feb 3 2022, 1:09 PM

added test

clayborg accepted this revision.Feb 3 2022, 1:36 PM

Thanks for adding the test!

This revision is now accepted and ready to land.Feb 3 2022, 1:36 PM
This revision was landed with ongoing or failed builds.Feb 3 2022, 1:40 PM
This revision was automatically updated to reflect the committed changes.