Page MenuHomePhabricator

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

Authored by Higuoxing on Tue, Sep 8, 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.Tue, Sep 8, 11:14 PM
Herald added a project: Restricted Project. · View Herald Transcript
Higuoxing requested review of this revision.Tue, Sep 8, 11:14 PM
grimar added inline comments.Wed, Sep 9, 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.Wed, Sep 9, 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)Wed, Sep 9, 1:36 AM
Higuoxing edited the summary of this revision. (Show Details)
grimar accepted this revision.Wed, Sep 9, 1:38 AM

LGTM

This revision is now accepted and ready to land.Wed, Sep 9, 1:38 AM
jhenderson added inline comments.Wed, Sep 9, 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.Wed, Sep 9, 3:07 AM
Higuoxing marked 2 inline comments as done.

Address review comments.

Thanks for reviewing!