This is an archive of the discontinued LLVM Phabricator instance.

[dwarfdump] Add -show-form
ClosedPublic

Authored by JDevlieghere on Oct 2 2017, 7:36 AM.

Details

Summary

This enables printing of DWARF form types after the DWARF attribute
types. Feature parity with dwarfdump-classic.

Diff Detail

Repository
rL LLVM

Event Timeline

JDevlieghere created this revision.Oct 2 2017, 7:36 AM
aprantl edited edge metadata.Oct 2 2017, 8:49 AM

Thanks!

include/llvm/DebugInfo/DIContext.h
144 ↗(On Diff #117346)

At some point we should convert this to a bitfield or into an enum bitfield.

test/tools/llvm-dwarfdump/X86/form.test
14 ↗(On Diff #117346)

I find the naming confusing, I would expect FORM to check the case where -F is specified.

41 ↗(On Diff #117346)

why not: FORM-NOT: DW_FORM_ and be done with it?

tools/llvm-dwarfdump/llvm-dwarfdump.cpp
174 ↗(On Diff #117346)

please add all new options to the tools/llvm-dwarfdump/cmdline.test testcase, too, it catches bugs such as the wrong option category.

aprantl accepted this revision.Oct 2 2017, 8:50 AM

LGTM with outstanding issues addressed.

This revision is now accepted and ready to land.Oct 2 2017, 8:50 AM
This revision was automatically updated to reflect the committed changes.
JDevlieghere marked 3 inline comments as done.

At some point we should convert this to a bitfield or into an enum bitfield.

I agree, I will keep this for an separate NFC commit!