aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-03-16[llvm-objdump] Add llvm_unreachable to silence GCC warning. NFC.Martin Storsjö1-0/+1
GCC 7 warned about control reaching the end of the non-void function, despite all 7 LineChar values being handled in the switch.
2020-03-16[llvm-objdump] Display locations of variables alongside disassemblyOliver Stannard1-66/+471
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
2020-03-15[llvm-objdump] Require long options to use double-dash --long-optionFangrui Song1-1/+3
As announced here: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html
2020-03-13Fix `-Wunused-variable`. NFC.Michael Liao1-1/+1
2020-03-13[llvm-objdump] --syms: print 'u' for STB_GNU_UNIQUEFangrui Song1-0/+2
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
2020-03-13[llvm-objdump] --syms: print 'i' for STT_GNU_IFUNCFangrui Song1-1/+6
Reviewed By: grimar, Higuoxing, jhenderson Differential Revision: https://reviews.llvm.org/D75793
2020-03-09[llvm-objdump] Rename --disassemble-functions to --disassemble-symbolsFangrui Song1-18/+16
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
2020-03-05[llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:`Fangrui Song1-1/+1
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
2020-03-05[llvm-objdump] --syms: make flags closer to GNU objdumpFangrui Song1-1/+1
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
2020-03-04[llvm-objdump] --syms: print st_size as "%016" PRIx64 instead of "%08" ↵Fangrui Song1-1/+1
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
2020-02-21[llvm-objdump] Print method name from debug info in disassembly output.Jordan Rupprecht1-24/+54
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
2020-02-12[llvm-objdump] Print file format in lowercase to match GNU output.Jordan Rupprecht1-1/+1
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
2020-02-12[llvm-objdump] Add column headers for relocation printingLiad Mordekoviz1-2/+8
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
2020-02-11[NFC] Refactor the tuple of symbol information with structure for llvm-objdumpdiggerlin1-10/+0
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
2020-02-10[NFC] Refactor the tuple of symbol information with structure for llvm-objdumpdiggerlin1-18/+26
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
2020-02-03[llvm-objdump] Suppress spurious warnings when parsing Mach-O binaries.Michael Trent1-1/+1
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
2020-01-31[llvm-objdump] avoid crash disassembling unknown instructionSjoerd Meijer1-0/+8
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
2020-01-28Make llvm::StringRef to std::string conversions explicit.Benjamin Kramer1-3/+3
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.
2020-01-11[Disassembler] Delete the VStream parameter of MCDisassembler::getInstruction()Fangrui Song1-9/+2
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.
2020-01-06[MC] Add parameter `Address` to MCInstPrinter::printInstFangrui Song1-4/+4
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
2019-12-20llvm-objdump should ignore Mach-O stab symbols for disassembly.Michael Trent1-2/+31
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
2019-10-23[Mips] Use appropriate private label prefix based on Mips ABIMirko Brkusanin1-1/+3
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
2019-10-21[llvm/Object] - Make ELFObjectFile::getRelocatedSection return ↵George Rimar1-4/+19
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
2019-10-17Reland [llvm-objdump] Use a counter for llvm-objdump -h instead of the ↵Jordan Rupprecht1-12/+41
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
2019-10-17Revert r374931 "[llvm-objdump] Use a counter for llvm-objdump -h instead of ↵Hans Wennborg1-41/+12
the section index." This broke llvm-objdump in 32-bit builds, see e.g. http://lab.llvm.org:8011/builders/clang-cmake-armv7-quick/builds/10925 > Summary: > 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: 375088
2019-10-15[llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.Jordan Rupprecht1-12/+41
Summary: 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: 374931
2019-10-14[llvm-objdump] Adjust spacing and field width for --section-headersJordan Rupprecht1-15/+33
Summary: - Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer. - Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit) - Fix trailing spaces Reviewers: grimar, jhenderson, espindola Reviewed By: grimar Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay Tags: #llvm Differential Revision: https://reviews.llvm.org/D68730 llvm-svn: 374795
2019-10-03[llvm-objdump] Further rearrange llvm-objdump sections for compatabilityJordan Rupprecht1-17/+22
Summary: rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more. I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump: * Archive headers * File headers * Section headers * Symbol table * Dwarf debugging * Relocations (if `--disassemble` is not used) * Section contents * Disassembly Reviewers: jhenderson, justice_adams, grimar, ychen, espindola Reviewed By: jhenderson Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay Tags: #llvm Differential Revision: https://reviews.llvm.org/D68066 llvm-svn: 373671
2019-09-13[llvm-objdump] Fix llvm-objdump --all-headers output orderGeorge Rimar1-2/+2
Patch by Justice Adams! Made llvm-objdump --all-headers output match the order of GNU objdump for compatibility reasons. Old order of the headers output: * file header * section header table * symbol table * program header table * dynamic section New order of the headers output (GNU compatible): * file header information * program header table * dynamic section * section header table * symbol table (Relevant BugZilla Bug: https://bugs.llvm.org/show_bug.cgi?id=41830) Differential revision: https://reviews.llvm.org/D67357 llvm-svn: 371826
2019-08-27[llvm-objdump] - Remove one overload of reportError. NFCI.George Rimar1-19/+9
There is a problem with reportError we have. Declaration says we have ArchiveName that follows the FileName: reportError(Error E, StringRef FileName, StringRef ArchiveName,... Though implementation have them reversed. I cleaned it up and removed an excessive reportError(Error E, StringRef File) version. Rebased on top of D66418. Differential revision: https://reviews.llvm.org/D66517 llvm-svn: 370034
2019-08-21[llvm-objdump] - Cleanup the error reporting.George Rimar1-94/+87
The error reporting function are not consistent. Before this change: * They had inconsistent naming (e.g. 'error' vs 'report_error'). * Some of them reported the object name, others - dont. * Some of them accepted the case when there was no error. (i.e. error code or Error had a success value). This patch tries to cleanup it a bit. It also renames report_error -> reportError, report_warning -> reportWarning and removes a full stop from messages. Differential revision: https://reviews.llvm.org/D66418 llvm-svn: 369515
2019-08-20[llvm-objdump] - Remove one of `report_error` functions and improve the ↵George Rimar1-15/+14
error reporting. One of the report_error functions was taking object::Archive::Child as an argument. It feels excessive, this patch removes it and introduce a helper function instead. Also I fixed a "TODO" in this patch what improved the message printed. Differential revision: https://reviews.llvm.org/D66468 llvm-svn: 369382
2019-08-15[llvm-objdump] Add warning messages if disassembly + source for problematic ↵Michael Pozulp1-25/+51
inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: RKSimon, MaskRay, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 llvm-svn: 368963
2019-08-14Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return ↵George Rimar1-21/+36
Expected<>" Changes: no changes. A fix for the clang code will be landed right on top. Original commit message: SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits. For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.) This patch makes a change for all users to switch to Expected<> version. Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them). Differential revision: https://reviews.llvm.org/D66089 llvm-svn: 368826
2019-08-14Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return ↵George Rimar1-36/+21
Expected<>" It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455 llvm-svn: 368813
2019-08-14[llvm/Object] - Convert SectionRef::getName() to return Expected<>George Rimar1-21/+36
SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits. For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.) This patch makes a change for all users to switch to Expected<> version. Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them). Differential revision: https://reviews.llvm.org/D66089 llvm-svn: 368812
2019-08-05Revert "[llvm-objdump] Re-commit r367284."Michael Pozulp1-50/+25
This reverts r367776 (git commit d34099926e909390cb0254bebb4b7f5cf15467c7). My changes to llvm-objdump tests caused them to fail on windows: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/27368 llvm-svn: 367816
2019-08-04[llvm-objdump] Re-commit r367284.Michael Pozulp1-25/+50
Add warning messages if disassembly + source for problematic inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 llvm-svn: 367776
2019-07-30Revert "[llvm-objdump] Add warning messages if disassembly + source for ↵Michael Pozulp1-50/+25
problematic inputs" This reverts r367284 (git commit b1cbe51bdf44098c74f5c74b7bcd8c041a7c6772). My changes to LLVMSymbolizer caused a test to fail: http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29488 llvm-svn: 367286
2019-07-30[llvm-objdump] Add warning messages if disassembly + source for problematic ↵Michael Pozulp1-25/+50
inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 llvm-svn: 367284
2019-07-25[llvm-objdump][NFC] Make the PrettyPrinter::printInst() output bufferedSeiya Nuta1-16/+12
Summary: Every time PrettyPrinter::printInst is called, stdout is flushed and it makes llvm-objdump slow. This patches adds a string buffer to prevent stdout from being flushed. Benchmark results (./llvm-objdump-master: without this patch, ./bin/llvm-objcopy: with this patch): $ hyperfine --warmup 10 './llvm-objdump-master -d ./bin/llvm-objcopy' './bin/llvm-objdump -d ./bin/llvm-objcopy' Benchmark #1: ./llvm-objdump-master -d ./bin/llvm-objcopy Time (mean ± σ): 2.230 s ± 0.050 s [User: 1.533 s, System: 0.682 s] Range (min … max): 2.115 s … 2.278 s 10 runs Benchmark #2: ./bin/llvm-objdump -d ./bin/llvm-objcopy Time (mean ± σ): 386.4 ms ± 13.0 ms [User: 376.6 ms, System: 6.1 ms] Range (min … max): 366.1 ms … 407.0 ms 10 runs Summary './bin/llvm-objdump -d ./bin/llvm-objcopy' ran 5.77 ± 0.23 times faster than './llvm-objdump-master -d ./bin/llvm-objcopy' Reviewers: alexshap, Bigcheese, jhenderson, rupprecht, grimar, MaskRay Reviewed By: jhenderson, MaskRay Subscribers: dexonsmith, jhenderson, javed.absar, kristof.beyls, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64969 llvm-svn: 366984
2019-07-24[llvm-objdump] Emit warning if --start-address/--stop-address specify range ↵Yuanfang Chen1-0/+37
outside file's address range. NB: the warning is about the input file itself regardless of the options used such as `-r`, `-s` etc.. https://bugs.llvm.org/show_bug.cgi?id=41911 Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D64779 llvm-svn: 366923
2019-07-09[llvm-objdump] Keep warning for --disassemble-functions in correct order.Yuanfang Chen1-1/+5
relative to normal output when dumping archive files. prepare for PR35351. Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: MaskRay, jhenderson Differential Revision: https://reviews.llvm.org/D64165 llvm-svn: 365564
2019-07-08Teach the symbolizer lib symbolize objects directly.Yuanfang Chen1-2/+1
Currently, the symbolizer lib can only symbolize a file on disk. This patch teaches the symbolizer lib to symbolize objects. llvm-objdump needs this to support archive disassembly with source info. https://bugs.llvm.org/show_bug.cgi?id=41871 Reviewed by: jhenderson, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D63521 llvm-svn: 365376
2019-07-02[llvm-objdump] Warn if no user specified sections (-j) are not found.Yuanfang Chen1-3/+26
Match GNU objdump. https://bugs.llvm.org/show_bug.cgi?id=41898 Reviewers: jhenderson, grimar, MaskRay, rupprecht Reviewed by: jhenderson, grimar, MaskRay Differential Revision: https://reviews.llvm.org/D63779 llvm-svn: 364955
2019-06-30Cleanup: llvm::bsearch -> llvm::partition_point after r364719Fangrui Song1-17/+18
llvm-svn: 364720
2019-06-24[llvm-objdump] Match GNU objdump on symbol types shown in disassemblyYuanfang Chen1-6/+13
output. STT_OBJECT and STT_COMMON are dumped as data, not disassembled. https://bugs.llvm.org/show_bug.cgi?id=41947 Differential Revision: https://reviews.llvm.org/D62964 llvm-svn: 364211
2019-06-22[llvm-objdump] Allow --disassemble-functions to take demangled namesYuanfang Chen1-9/+10
The --disassemble-functions switch takes demangled names when --demangle is specified, otherwise the switch takes mangled names. https://bugs.llvm.org/show_bug.cgi?id=41908 Reviewers: jhenderson, grimar, MaskRay, rupprecht Differential Revision: https://reviews.llvm.org/D63524 llvm-svn: 364121
2019-06-22[llvm-objdump] Move --start-address >= --stop-address check out of theYuanfang Chen1-3/+3
-d code. Summary: Move it into `main` function so the checking is effective for all actions user may do with llvm-objdump; notably, -r and -s in addition to existing -d. Match GNU behavior. Reviewers: jhenderson, grimar, MaskRay, rupprecht Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63631 llvm-svn: 364118
2019-06-21[binutils] Add response file option to help and docsJames Henderson1-0/+3
Many LLVM-based tools already support response files (i.e. files containing a list of options, specified with '@'). This change simply updates the documentation and help text for some of these tools to include it. I haven't attempted to fix all tools, just a selection that I am interested in. I've taken the opportunity to add some tests for --help behaviour, where they were missing. We could expand these tests, but I don't think that's within scope of this patch. This fixes https://bugs.llvm.org/show_bug.cgi?id=42233 and https://bugs.llvm.org/show_bug.cgi?id=42236. Reviewed by: grimar, MaskRay, jkorous Differential Revision: https://reviews.llvm.org/D63597 llvm-svn: 364036