History log of /llvm-project/llvm/tools/llvm-objdump/llvm-objdump.cpp (Results 301 – 325 of 727)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# b48e41be 20-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Fix End in disassemblyObject after rL358806

llvm-svn: 358809


# ce12ea8d 20-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Don't disassemble symbols before SectionAddr

This was caught by UBSAN

tools/llvm-objdump/X86/macho-disassembly-g-dsym.test
tools/llvm-objdump/X86/hex-displacement.test

llvm-svn: 358

[llvm-objdump] Don't disassemble symbols before SectionAddr

This was caught by UBSAN

tools/llvm-objdump/X86/macho-disassembly-g-dsym.test
tools/llvm-objdump/X86/hex-displacement.test

llvm-svn: 358806

show more ...


# 8f28f7a4 20-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Simplify --{start,stop}-address

llvm-svn: 358803


# c82e92bc 17-Apr-2019 Fangrui Song <maskray@google.com>

Change some llvm::{lower,upper}_bound to llvm::bsearch. NFC

llvm-svn: 358564


# fa860ff7 16-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Align instructions to a tab stop in disassembly output

This relands D60376/rL358405, with the difference: sed 'y/\t/ /' -> tr '\t' ' '
BSD sed doesn't support escape characters for th

[llvm-objdump] Align instructions to a tab stop in disassembly output

This relands D60376/rL358405, with the difference: sed 'y/\t/ /' -> tr '\t' ' '
BSD sed doesn't support escape characters for the 'y' command.
I didn't use it in rL358405 because it was not listed at
https://llvm.org/docs/GettingStarted.html#software but it
should be available.

Original description:

In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.

In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.

To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.

llvm-svn: 358474

show more ...


# 051a699e 16-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Simplify PrintHelpMessage() logic

This relands rL358418. It missed one test that should also use -macho
Note, all the other -private-header -exports-trie tests are used
together with

[llvm-objdump] Simplify PrintHelpMessage() logic

This relands rL358418. It missed one test that should also use -macho
Note, all the other -private-header -exports-trie tests are used
together with -macho.

llvm-svn: 358472

show more ...


# d9d0c3e1 15-Apr-2019 Alex Lorenz <arphaman@gmail.com>

Revert r358405: "[llvm-objdump] Align instructions to a tab stop in disassembly output"

The test fails on darwin due to a sed error:

sed: 1: "y/\t/ /": transform strings are not the same length
llv

Revert r358405: "[llvm-objdump] Align instructions to a tab stop in disassembly output"

The test fails on darwin due to a sed error:

sed: 1: "y/\t/ /": transform strings are not the same length
llvm-svn: 358459

show more ...


# 16256123 15-Apr-2019 Alex Lorenz <arphaman@gmail.com>

Revert r358418: "[llvm-objdump] Simplify PrintHelpMessage() logic"

This reverts commit r358418 as it broke `test/Object/objdump-export-list`
on Darwin.

llvm-svn: 358443


# 204339a2 15-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Simplify PrintHelpMessage() logic

llvm-svn: 358418


# 523758ef 15-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Wrap things in namespace llvm

llvm-svn: 358417


# 9d812f44 15-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Reorganize cl::opt variables and move Mach-O specifics to MachODump.cpp

llvm-svn: 358415


# b688a200 15-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Align instructions to a tab stop in disassembly output

Summary:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. Howe

[llvm-objdump] Align instructions to a tab stop in disassembly output

Summary:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.

In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.

To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.

Reviewers: rupprecht, jhenderson, grimar

Reviewed By: jhenderson

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60376

llvm-svn: 358405

show more ...


# 7d4ad143 10-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Don't print trailing space in dumpBytes

In disassembly output, dumpBytes prints a space, followed by a tab
printed by printInstr. Remove the extra space.

llvm-svn: 358045


# 5f2b5cd8 10-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Accept and ignore --wide/-w

This is similar to what we do for llvm-readobj (--wide/-W is for GNU
readelf compatibility).

The test will be added in D60376.

llvm-svn: 358043


# 3f209683 09-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Migrate some functions from std::error_code to Error

llvm-svn: 357965


# f67de6c9 08-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Migrate relocation handling functions from error_code to Error

llvm-svn: 357920


# 996b9093 08-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Fix MC/ARM/arm-macho-calls.s

llvm-svn: 357880


# 32087b65 07-Apr-2019 Fangrui Song <maskray@google.com>

[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

[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.

llvm-svn: 357869

show more ...


# 47a7662e 07-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Fix split of source lines; don't ltrim source lines

If the file does not end with a newline, it may be dropped. Fix the
splitting algorithm.

Also delete an unnecessary SourceCache lo

[llvm-objdump] Fix split of source lines; don't ltrim source lines

If the file does not end with a newline, it may be dropped. Fix the
splitting algorithm.

Also delete an unnecessary SourceCache lookup.

llvm-svn: 357858

show more ...


# e7834bd1 07-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Simplify Expected<T> handling with unwrapOrError

llvm-svn: 357855


# 545ed223 07-Apr-2019 Fangrui Song <maskray@google.com>

[llvm-objdump] Simplify disassembleObject

* Use std::binary_search to replace some std::lower_bound
* Use llvm::upper_bound to replace some std::upper_bound
* Use format_hex and support::endian::rea

[llvm-objdump] Simplify disassembleObject

* Use std::binary_search to replace some std::lower_bound
* Use llvm::upper_bound to replace some std::upper_bound
* Use format_hex and support::endian::read{16,32}

llvm-svn: 357853

show more ...


# 6a0746a9 07-Apr-2019 Fangrui Song <maskray@google.com>

Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef()

llvm-svn: 357852


# 1857edb2 28-Mar-2019 Eric Christopher <echristo@gmail.com>

Fix typoed variable name.

NFCI.

llvm-svn: 357138


# ae672b48 21-Mar-2019 Jordan Rupprecht <rupprecht@google.com>

[llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo -dMreg-names-raw)

Summary:
r354375 added support for most objdump groupings, but didn't add support for -j|--sections, be

[llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo -dMreg-names-raw)

Summary:
r354375 added support for most objdump groupings, but didn't add support for -j|--sections, because that wasn't possible.
r354870 added --disassembler options, but grouping still wasn't available.
r355185 supported values for grouped options.

This just puts the three of them together. This supports -j in modes like `-s -j .foo`, `-sj .foo`, `-sj=.foo`, or `-sj.foo`, and similar for `-M`.

Reviewers: ormris, jhenderson, ikudrin

Reviewed By: jhenderson, ikudrin

Subscribers: javed.absar, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59618

llvm-svn: 356697

show more ...


Revision tags: llvmorg-8.0.0, llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3
# 77fc1f60 27-Feb-2019 Alexey Lapshin <a.v.lapshin@mail.ru>

[DebugInfo] add SectionedAddress to DebugInfo interfaces.

That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
"wrong line number info for obj file compiled with -ffunction

[DebugInfo] add SectionedAddress to DebugInfo interfaces.

That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
"wrong line number info for obj file compiled with -ffunction-sections"
bug. The problem happened with only .o files. If object file contains
several .text sections then line number information showed incorrectly.
The reason for this is that DwarfLineTable could not detect section which
corresponds to specified address(because address is the local to the
section). And as the result it could not select proper sequence in the
line table. The fix is to pass SectionIndex with the address. So that it
would be possible to differentiate addresses from various sections. With
this fix llvm-objdump shows correct line numbers for disassembled code.

Differential review: https://reviews.llvm.org/D58194

llvm-svn: 354972

show more ...


1...<<11121314151617181920>>...30