#
9e484220 |
| 16-Mar-2020 |
Nico Weber <thakis@chromium.org> |
Revert "[llvm-objdump] Display locations of variables alongside disassembly"
Makes tests fail on Windows, see https://reviews.llvm.org/D70720#1924542
This reverts commit 3a5ddedadb671e485ce5c638142
Revert "[llvm-objdump] Display locations of variables alongside disassembly"
Makes tests fail on Windows, see https://reviews.llvm.org/D70720#1924542
This reverts commit 3a5ddedadb671e485ce5c638142817879ac14a8c, and follow-ups: f4cb9c919e28276222873453cf85de9e5a3c7be5 042eb0482aa758057c4f77616a4696cdb21b4fcc c0cf5f5da9a7bf1bdf43ed53287b0f634fc53045 18649f48139932377c2a2909f1fb600bf5cf6e57 f62b898c1f5dd77e68b53570dc2679877bcbe4c2
show more ...
|
#
042eb048 |
| 16-Mar-2020 |
Martin Storsjö <martin@martin.st> |
[llvm-objdump] Add llvm_unreachable to silence GCC warning. NFC.
GCC 7 warned about control reaching the end of the non-void function, despite all 7 LineChar values being handled in the switch.
|
Revision tags: llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3 |
|
#
3a5ddeda |
| 09-Dec-2019 |
Oliver Stannard <oliver.stannard@linaro.org> |
[llvm-objdump] Display locations of variables alongside disassembly
This adds the --debug-vars option to llvm-objdump, which prints locations (registers/memory) of source-level variables alongside t
[llvm-objdump] Display locations of variables alongside disassembly
This adds the --debug-vars option to llvm-objdump, which prints locations (registers/memory) of source-level variables alongside the disassembly based on DWARF info. A vertical line is printed for each live-range, with a label at the top giving the variable name and location, and the position and length of the line indicating the program counter range in which it is valid.
Currently, this only works for object files, not executables or shared libraries.
Differential revision: https://reviews.llvm.org/D70720
show more ...
|
#
5c3ec7dc |
| 15-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] Require long options to use double-dash --long-option
As announced here: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
|
#
7c504548 |
| 14-Mar-2020 |
Michael Liao <michael.hliao@gmail.com> |
Fix `-Wunused-variable`. NFC.
|
#
7b74b0d4 |
| 07-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] --syms: print 'u' for STB_GNU_UNIQUE
GCC when configured with --enable-gnu-unique (default on glibc>=2.11) emits STB_GNU_UNIQUE for certain objects which are otherwise emitted as STT_
[llvm-objdump] --syms: print 'u' for STB_GNU_UNIQUE
GCC when configured with --enable-gnu-unique (default on glibc>=2.11) emits STB_GNU_UNIQUE for certain objects which are otherwise emitted as STT_OBJECT, such as an inline function's static local variable or its guard variable, and a static data member of a template.
Clang does not implement -fgnu-unique.
Implementing it as a binding is strange and the feature itself is considered by some as a misfeature.
Reviewed By: grimar, jhenderson
Differential Revision: https://reviews.llvm.org/D75797
show more ...
|
#
e799405e |
| 07-Mar-2020 |
Fangrui Song <i@maskray.me> |
[llvm-objdump] --syms: print 'i' for STT_GNU_IFUNC
Reviewed By: grimar, Higuoxing, jhenderson
Differential Revision: https://reviews.llvm.org/D75793
|
#
0d673be1 |
| 07-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] Rename --disassemble-functions to --disassemble-symbols
https://bugs.llvm.org/show_bug.cgi?id=41910
The feature can disassemble data and the new option name reflects its more generic
[llvm-objdump] Rename --disassemble-functions to --disassemble-symbols
https://bugs.llvm.org/show_bug.cgi?id=41910
The feature can disassemble data and the new option name reflects its more generic usage.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D75816
show more ...
|
#
71e2ca6e |
| 05-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:`
The new behavior matches GNU objdump. A pair of angle brackets makes tests slightly easier.
`.foo:` is not unique and thus cann
[llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:`
The new behavior matches GNU objdump. A pair of angle brackets makes tests slightly easier.
`.foo:` is not unique and thus cannot be used in a `CHECK-LABEL:` directive. Without `-LABEL`, the CHECK line can match the `Disassembly of section` line and causes the next `CHECK-NEXT:` to fail.
``` Disassembly of section .foo:
0000000000001634 .foo: ```
Bdragon: <> has metalinguistic connotation. it just "feels right"
Reviewed By: rupprecht
Differential Revision: https://reviews.llvm.org/D75713
show more ...
|
#
f9a00560 |
| 05-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] --syms: make flags closer to GNU objdump
This fixes several issues. The behavior changes are:
A SHN_COMMON symbol does not have the 'g' flag. An undefined symbol does not have 'g' or
[llvm-objdump] --syms: make flags closer to GNU objdump
This fixes several issues. The behavior changes are:
A SHN_COMMON symbol does not have the 'g' flag. An undefined symbol does not have 'g' or 'l' flag. A STB_GLOBAL SymbolRef::ST_Unknown symbol has the 'g' flag. A STB_LOCAL SymbolRef::ST_Unknown symbol has the 'l' flag.
Reviewed By: rupprecht
Differential Revision: https://reviews.llvm.org/D75659
show more ...
|
#
c72d60d4 |
| 04-Mar-2020 |
Fangrui Song <maskray@google.com> |
[llvm-objdump] --syms: print st_size as "%016" PRIx64 instead of "%08" PRIx64 for 64-bit objects
This is GNU objdump's behavior and it is reasonable to match.
Reviewed By: grimar
Differential Revi
[llvm-objdump] --syms: print st_size as "%016" PRIx64 instead of "%08" PRIx64 for 64-bit objects
This is GNU objdump's behavior and it is reasonable to match.
Reviewed By: grimar
Differential Revision: https://reviews.llvm.org/D75588
show more ...
|
#
266877a2 |
| 21-Feb-2020 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objdump] Print method name from debug info in disassembly output.
Summary: GNU objdump prints the method name in disassembly output, and upon further investigation this seems to come from debu
[llvm-objdump] Print method name from debug info in disassembly output.
Summary: GNU objdump prints the method name in disassembly output, and upon further investigation this seems to come from debug info, not the symbol table.
Some additional refactoring is necessary to make this work even when the line number is 0/the filename is unknown. The added test case includes a note for this scenario.
See http://llvm.org/PR41341 for more info.
Reviewers: dblaikie, MaskRay, jhenderson
Reviewed By: MaskRay
Subscribers: ormris, jvesely, aprantl, kerbowa, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74507
show more ...
|
#
60a8a504 |
| 11-Feb-2020 |
Jordan Rupprecht <rupprecht@google.com> |
[llvm-objdump] Print file format in lowercase to match GNU output.
Summary: GNU objdump prints the file format in lowercase, e.g. `elf64-x86-64`. llvm-objdump prints `ELF64-x86-64` right now, even t
[llvm-objdump] Print file format in lowercase to match GNU output.
Summary: GNU objdump prints the file format in lowercase, e.g. `elf64-x86-64`. llvm-objdump prints `ELF64-x86-64` right now, even though piping that into llvm-objcopy refuses that as a valid arch to use.
As an example of a problem this causes, see: https://github.com/ClangBuiltLinux/linux/issues/779
Reviewers: MaskRay, jhenderson, alexshap
Reviewed By: MaskRay
Subscribers: tpimh, sbc100, grimar, jvesely, nhaehnle, kerbowa, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D74433
show more ...
|
#
740bc366 |
| 11-Feb-2020 |
Liad Mordekoviz <liad.mordekoviz@gmail.com> |
[llvm-objdump] Add column headers for relocation printing
This allows us better readability and compatibility with what GNU objdump prints.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43941
Review
[llvm-objdump] Add column headers for relocation printing
This allows us better readability and compatibility with what GNU objdump prints.
Fixes https://bugs.llvm.org/show_bug.cgi?id=43941
Reviewed by: jhenderson, MaskRay
Differential Revision: https://reviews.llvm.org/D72992
show more ...
|
#
9c1a88c9 |
| 11-Feb-2020 |
diggerlin <digger.llvm@gmail.com> |
[NFC] Refactor the tuple of symbol information with structure for llvm-objdump
SUMMARY:
address the comment of https://reviews.llvm.org/D74240#inline-676127 https://reviews.llvm.org/D74240#inline-
[NFC] Refactor the tuple of symbol information with structure for llvm-objdump
SUMMARY:
address the comment of https://reviews.llvm.org/D74240#inline-676127 https://reviews.llvm.org/D74240#inline-675875
Reviewers: daltenty, jason liu, xiangling liao Subscribers: wuzish, nemanjai, hiraditya
Differential Revision: https://reviews.llvm.org/D74240
show more ...
|
#
09d26b79 |
| 11-Feb-2020 |
diggerlin <digger.llvm@gmail.com> |
[NFC] Refactor the tuple of symbol information with structure for llvm-objdump
SUMMARY:
refator the std::tuple<uint64_t, StringRef, uint8_t> to structor
Reviewers: daltenty Subscribers: wuzish, ne
[NFC] Refactor the tuple of symbol information with structure for llvm-objdump
SUMMARY:
refator the std::tuple<uint64_t, StringRef, uint8_t> to structor
Reviewers: daltenty Subscribers: wuzish, nemanjai, hiraditya
Differential Revision: https://reviews.llvm.org/D74240
show more ...
|
#
0ad18bf3 |
| 29-Jan-2020 |
Michael Trent <mtrent@apple.com> |
[llvm-objdump] Suppress spurious warnings when parsing Mach-O binaries.
Summary: llvm-objdump started warning when asked to disassemble a section that isn't present in the input files, in Yuanfang C
[llvm-objdump] Suppress spurious warnings when parsing Mach-O binaries.
Summary: llvm-objdump started warning when asked to disassemble a section that isn't present in the input files, in Yuanfang Chen's change: d16c162c9453db855503134fe29ae4a3c0bec936. The problem is that the logic was restricted only to the generic llvm-objdump parser, not to the Mach-O-specific parser used for Apple toolchain compatibility. The solution is to log section names from the Mach-O parser.
The macho-cstring-dump.test has been updated to fail if it encounters this new warning in the future.
Reviewers: pete, ab, lhames, jhenderson, grimar, MaskRay, ychen
Reviewed By: jhenderson, grimar
Subscribers: rupprecht, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D73586
show more ...
|
#
24f0b6b6 |
| 31-Jan-2020 |
Sjoerd Meijer <sjoerd.meijer@arm.com> |
[llvm-objdump] avoid crash disassembling unknown instruction
Disassembly of instructions can fail when llvm-objdump is not given the right set of architecture features, for example when the source i
[llvm-objdump] avoid crash disassembling unknown instruction
Disassembly of instructions can fail when llvm-objdump is not given the right set of architecture features, for example when the source is compiled with:
clang -march=..+ext1+ext2
and disassembly is attempted with:
llvm-objdump -mattr=+ext1
This patch avoids further analysing unknown instructions (as was happening before) when disassembly has failed.
Differential Revision: https://reviews.llvm.org/D73531
show more ...
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
#
6fdd6a7b |
| 11-Jan-2020 |
Fangrui Song <maskray@google.com> |
[Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction()
The argument is llvm::null() everywhere except llvm::errs() in llvm-objdump in -DLLVM_ENABLE_ASSERTIONS=On builds. It
[Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction()
The argument is llvm::null() everywhere except llvm::errs() in llvm-objdump in -DLLVM_ENABLE_ASSERTIONS=On builds. It is used by no target but X86 in -DLLVM_ENABLE_ASSERTIONS=On builds.
If we ever have the needs to add verbose log to disassemblers, we can record log with a member function, instead of passing it around as an argument.
show more ...
|
#
aa708763 |
| 03-Jan-2020 |
Fangrui Song <maskray@google.com> |
[MC] Add parameter `Address` to MCInstPrinter::printInst
printInst prints a branch/call instruction as `b offset` (there are many variants on various targets) instead of `b address`.
It is a conven
[MC] Add parameter `Address` to MCInstPrinter::printInst
printInst prints a branch/call instruction as `b offset` (there are many variants on various targets) instead of `b address`.
It is a convention to use address instead of offset in most external symbolizers/disassemblers. This difference makes `llvm-objdump -d` output unsatisfactory.
Add `uint64_t Address` to printInst(), so that it can pass the argument to printInstruction(). `raw_ostream &OS` is moved to the last to be consistent with other print* methods.
The next step is to pass `Address` to printInstruction() (generated by tablegen from the instruction set description). We can gradually migrate targets to print addresses instead of offsets.
In any case, downstream projects which don't know `Address` can pass 0 as the argument.
Reviewed By: jhenderson
Differential Revision: https://reviews.llvm.org/D72172
show more ...
|
#
f72d001e |
| 12-Dec-2019 |
Michael Trent <mtrent@apple.com> |
llvm-objdump should ignore Mach-O stab symbols for disassembly.
Summary: llvm-objdump will commonly error out when disassembling a Mach-O binary with stab symbols, or when printing a Mach-O symbol t
llvm-objdump should ignore Mach-O stab symbols for disassembly.
Summary: llvm-objdump will commonly error out when disassembling a Mach-O binary with stab symbols, or when printing a Mach-O symbol table that includesstab symbols. That is because the Mach-O N_OSO symbol has been modified to include the bottom 8-bit value of the Mach-O's cpusubtype value in the section field. In general, one cannot blindly assume a stab symbol's section field is valid unless one has actually consulted the specification for the specific stab.
Since objdump mostly just walks the symbol table to get mnemonics for code disassembly it's best for objdump to just ignore stab symbols. llvm-nm will do a more complete and correct job of displaying Mach-O symbol table contents.
Reviewers: pete, lhames, ab, thegameg, jhenderson, MaskRay
Reviewed By: thegameg, MaskRay
Subscribers: MaskRay, rupprecht, seiya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D71394
show more ...
|
Revision tags: llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
4b63ca13 |
| 23-Oct-2019 |
Mirko Brkusanin <Mirko.Brkusanin@rt-rk.com> |
[Mips] Use appropriate private label prefix based on Mips ABI
MipsMCAsmInfo was using '$' prefix for Mips32 and '.L' for Mips64 regardless of -target-abi option. By passing MCTargetOptions to MCAsmI
[Mips] Use appropriate private label prefix based on Mips ABI
MipsMCAsmInfo was using '$' prefix for Mips32 and '.L' for Mips64 regardless of -target-abi option. By passing MCTargetOptions to MCAsmInfo we can find out Mips ABI and pick appropriate prefix.
Tags: #llvm, #clang, #lldb
Differential Revision: https://reviews.llvm.org/D66795
show more ...
|
#
2bf01dcb |
| 21-Oct-2019 |
George Rimar <grimar@accesssoftek.com> |
[llvm/Object] - Make ELFObjectFile::getRelocatedSection return Expected<section_iterator>
It returns just a section_iterator currently and have a report_fatal_error call inside. This change adds a w
[llvm/Object] - Make ELFObjectFile::getRelocatedSection return Expected<section_iterator>
It returns just a section_iterator currently and have a report_fatal_error call inside. This change adds a way to return errors and handle them on caller sides.
The patch also changes/improves current users and adds test cases.
Differential revision: https://reviews.llvm.org/D69167
llvm-svn: 375408
show more ...
|
#
98a2ae7d |
| 17-Oct-2019 |
Jordan Rupprecht <rupprecht@google.com> |
Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
This relands r374931 (reverted in r375088). It fixes 32-bit builds by using the right format string specifier fo
Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
This relands r374931 (reverted in r375088). It fixes 32-bit builds by using the right format string specifier for uint64_t (PRIu64) instead of `%d`.
Original description:
When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).
While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.
Reviewers: grimar, jhenderson, espindola
Reviewed By: grimar
Subscribers: emaste, sbc100, arichardson, aheejin, arphaman, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68848
llvm-svn: 375178
show more ...
|