This is an archive of the discontinued LLVM Phabricator instance.

Add -bare option to llvm-objdump
Needs ReviewPublic

Authored by srking on Sep 9 2014, 4:16 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This is the first in a series of expected patches to improve disassembly of llvm-objdump.

The -bare option prevents symbolizing disassembly. -bare is a precursor to symbolizing disassembly by default and future disassembler improvements.
Because r216983 removes symbolizing support, -bare currently does nothing.

Changes in this patch

  1. Add -bare command line option to llvm-objdump
  2. Add -bare to all tests using llvm-objdump disassembly
  3. Change disassembly tests to use -d consistently, instead of a random mix of -d, -disassemble, --disassemble

Diff Detail

Event Timeline

srking updated this revision to Diff 13500.Sep 9 2014, 4:16 PM
srking retitled this revision from to Add -bare option to llvm-objdump.
srking updated this object.
srking edited the test plan for this revision. (Show Details)
srking added a subscriber: Unknown Object (MLST).
silvas added a subscriber: silvas.Sep 9 2014, 5:53 PM

Let's wait until we have a symbolizer before we add a -bare option.

  1. Change disassembly tests to use -d consistently, instead of a random mix of -d, -disassemble, --disassemble

Please make this a separate patch.

test/tools/llvm-objdump/ARM/macho-mcpu-arm.test
1

What's the harm of running all these tests without -bare? Seems like this patch is creating a lot of churn for no good reason. It would be better to update the tests to use the more readable non-bare output, no? That's what all future tests will be using since not-bare is going to be the default.

tools/llvm-objdump/llvm-objdump.cpp
94–95

Why are you moving all this stuff around? Please put that in a separate patch.

The -bare option keeps objdump output consistent with test expectations regardless of host platform. As discussed on the list, default llvm-objdump output could change per host: GNU style for Linux, otools for Apple, etc. Diagnostic tests cannot depend on the per-host default. Tests only need updating (a tedious process) if -bare output changes.

If this is agreeable, I'd like to keep the -bare option and -d consistency patches unified since both touch the same line in large number of diagnostic test files.

srking updated this revision to Diff 13560.Sep 10 2014, 2:31 PM

New patch file: reduce source churn by not alphabetizing llvm-objdump command line option definitions.
'make check' for all targets passes.