This is an archive of the discontinued LLVM Phabricator instance.

[DWARFYAML] Add support for emitting/dumping the .debug_str.dwo section.
Needs ReviewPublic

Authored by Higuoxing on Feb 19 2022, 4:25 AM.

Details

Reviewers
jhenderson
Summary

Recently, I've seen the requests on generating split dwarf objects using
yaml2obj. This patch helps add support for emitting/dumping the .debug_str.dwo section.

Diff Detail

Event Timeline

Higuoxing created this revision.Feb 19 2022, 4:25 AM
Higuoxing requested review of this revision.Feb 19 2022, 4:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 19 2022, 4:25 AM

Thanks! It's sad to see the code duplication in DWARFEmitter.cpp, but I don't have a good alternative. Just a series of nits to fix.

llvm/lib/ObjectYAML/ELFEmitter.cpp
1131

I'm somewhat surrpised to see SHF_EXCLUDE here. Is this what the compiler generates by default?

llvm/test/tools/obj2yaml/ELF/DWARF/debug-str.yaml
1

I think we should have a test case with both .debug_str and .debug_stro.dwo (non-empty).

152

Shouldn't this be parameterised so that it can be the .dwo name if appropriate?

llvm/test/tools/yaml2obj/ELF/DWARF/debug-str.yaml
41
64
100–101

I think you can avoid needing this comment, by just doing "debug_str[.dwo]" in the previous one, like you've done elsewhere.

126–127

Ditto.

240–242

Ditto.