Page MenuHomePhabricator

[obj2yaml] Refactor the .debug_pub* sections dumper.
ClosedPublic

Authored by Higuoxing on Aug 18 2020, 9:01 PM.

Details

Summary

It's good to reuse the DWARF parser in lib/DebugInfo so that we don't
need to maintain a separate parser in client side (obj2yaml). Besides,
A test case is added whose length field is a very huge value which makes
obj2yaml stuck when parsing the section.

Diff Detail

Event Timeline

Higuoxing created this revision.Aug 18 2020, 9:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 18 2020, 9:01 PM
Higuoxing requested review of this revision.Aug 18 2020, 9:01 PM
jhenderson added inline comments.Aug 19 2020, 12:58 AM
llvm/tools/obj2yaml/dwarf2yaml.cpp
10–19

LLVM coding guidelines says not to include includes that aren't necessary (because they are transitively included, I believe). I suspect you don't need to add ArrayRef.h or Error.h, for example. You might need to change your IDE settings.

132

Please add a comment here explaining why it's okay to consumeError and continue.

137

Not sure a hyphen there is appropriate.

Higuoxing updated this revision to Diff 286512.Aug 19 2020, 2:35 AM
Higuoxing marked 3 inline comments as done.

Address comments.

This revision is now accepted and ready to land.Aug 19 2020, 2:37 AM
This revision was landed with ongoing or failed builds.Aug 19 2020, 6:14 AM
This revision was automatically updated to reflect the committed changes.