This is an archive of the discontinued LLVM Phabricator instance.

[elf2yaml] Fix dumping a debug section whose name is not recognized.
ClosedPublic

Authored by Higuoxing on Sep 8 2020, 11:14 PM.

Details

Summary

If the debug section's name isn't recognized, it should be
dumped as a raw content section.

Diff Detail

Event Timeline

Higuoxing created this revision.Sep 8 2020, 11:14 PM
Herald added a project: Restricted Project. · View Herald Transcript
Higuoxing requested review of this revision.Sep 8 2020, 11:14 PM
grimar added inline comments.Sep 9 2020, 1:18 AM
llvm/test/tools/obj2yaml/ELF/DWARF/unrecognized-debug-section.yaml
2

by obj2yaml?

llvm/tools/obj2yaml/elf2yaml.cpp
423

Couldn't it be just

else
  continue;

?

Higuoxing updated this revision to Diff 290663.Sep 9 2020, 1:36 AM
Higuoxing marked 2 inline comments as done.

Address review comments.

Thanks!

llvm/tools/obj2yaml/elf2yaml.cpp
423

Thanks, it looks much simpler!

Higuoxing edited the summary of this revision. (Show Details)Sep 9 2020, 1:36 AM
Higuoxing edited the summary of this revision. (Show Details)
grimar accepted this revision.Sep 9 2020, 1:38 AM

LGTM

This revision is now accepted and ready to land.Sep 9 2020, 1:38 AM
jhenderson added inline comments.Sep 9 2020, 1:48 AM
llvm/test/tools/obj2yaml/ELF/DWARF/unrecognized-debug-section.yaml
2
4

No need for the --check-prefix. Just use CHECK below.

Higuoxing updated this revision to Diff 290682.Sep 9 2020, 3:07 AM
Higuoxing marked 2 inline comments as done.

Address review comments.

Thanks for reviewing!