OSDN Git Service

[llvm-objdump] Split disassembleObject and simplify --{start,stop}-address handling
authorFangrui Song <maskray@google.com>
Sun, 7 Apr 2019 16:33:24 +0000 (16:33 +0000)
committerFangrui Song <maskray@google.com>
Sun, 7 Apr 2019 16:33:24 +0000 (16:33 +0000)
commitddfe71d047de66dcbb90144cc35b001a9eb63b7b
tree5bf7f7311b730aaa900434ddd8abb63d0c700911
parent2dd25b04131905e65c931ffb415a6a8a31d3749e
[llvm-objdump] Split disassembleObject and simplify --{start,stop}-address handling

The main disassembly loop is hard to read due to special handling of ARM
ELF data & ELF data. Split off the logic into two functions
dumpARMELFData and dumpELFData. Hoist some checks outside of the loop.

--start-address --stop-address have redundant checks and minor off-by-1
issues. Fix them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357869 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-objdump/llvm-objdump.cpp