summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/MachODump.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't return error_code from function that never fails.Rafael Espindola2015-06-291-18/+9
| | | | llvm-svn: 241021
* Rename getObjectFile to getObject for consistency.Rafael Espindola2015-06-261-3/+3
| | | | llvm-svn: 240785
* Simplify getSymbolType.Rafael Espindola2015-06-261-11/+6
| | | | | | | | This is still a really odd function. Most calls are in object format specific contexts and should probably be replaced with a more direct query, but at least now this is not too obnoxious to use. llvm-svn: 240777
* Change how symbol sizes are handled in lib/Object.Rafael Espindola2015-06-241-6/+5
| | | | | | | | | | | | | | COFF and MachO only define symbol sizes for common symbols. Reflect that in the class hierarchy by having a method for common symbols only in the base and a general one in ELF. This avoids the need of using a magic value for the size, which had a few problems * Most callers didn't check for it. * The ones that did could not tell the magic value from a file actually having that value. llvm-svn: 240529
* Fix "the the" in comments.Eric Christopher2015-06-191-1/+1
| | | | llvm-svn: 240112
* [objdump] Moving PrintImmHex out of MachODump and in to llvm-objdump and ↵Colin LeMahieu2015-06-071-4/+0
| | | | | | setting instprinter appropriately. llvm-svn: 239265
* [Object, MachO] Introduce MachOObjectFile::load_commands() range iterator.Alexey Samsonov2015-06-031-65/+18
| | | | | | | | | | | | | | | | | | Summary: Now users don't have to manually deal with getFirstLoadCommandInfo() / getNextLoadCommandInfo(), calculate the number of load segments, etc. No functionality change. Test Plan: regression test suite Reviewers: rafael, lhames, loladiro Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10144 llvm-svn: 238983
* [llvm] Parameterizing the output stream for dumpbytes and outputting ↵Colin LeMahieu2015-05-281-8/+8
| | | | | | directly to stream. llvm-svn: 238453
* Make it easier to use DwarfContext with MCJITKeno Fischer2015-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This supersedes http://reviews.llvm.org/D4010, hopefully properly dealing with the JIT case and also adds an actual test case. DwarfContext was basically already usable for the JIT (and back when we were overwriting ELF files it actually worked out of the box by accident), but in order to resolve relocations correctly it needs to know the load address of the section. Rather than trying to get this out of the ObjectFile or requiring the user to create a new ObjectFile just to get some debug info, this adds the capability to pass in that info directly. As part of this I separated out part of the LoadedObjectInfo struct from RuntimeDyld, since it is now required at a higher layer. Reviewers: lhames, echristo Reviewed By: echristo Subscribers: vtjnash, friss, rafael, llvm-commits Differential Revision: http://reviews.llvm.org/D6961 llvm-svn: 237961
* For llvm-objdump, with the -archive-headers and -macho options, use the ↵Kevin Enderby2015-04-301-4/+10
| | | | | | | | | | -non-verbose option to print the archive headers using raw numeric values. Also add the -archive-member-offsets for use with these to also trigger printing of the offset of the archive member from the start of the archive. llvm-svn: 236252
* Move DIContext.h to common DebugInfo location.Zachary Turner2015-04-231-2/+3
| | | | | | | | | | This will enable us to create a PDBContext so as to expose some amount of debug info functionality through a common interace. Differential Revision: http://reviews.llvm.org/D9205 Reviewed by: Alexey Samsonov llvm-svn: 235612
* For llvm-objdump, dump the (__OBJC,__protocol) section for Objc1 32-bit ↵Kevin Enderby2015-04-161-0/+52
| | | | | | | | Mach-O files with the -section option as objc_protocol_t structs. llvm-svn: 235141
* [NFC] [MachO] remove extra semicolonsJingyue Wu2015-04-161-4/+4
| | | | llvm-svn: 235130
* For llvm-objdump added support for printing Objc1 32-bit runtime meta dataKevin Enderby2015-04-161-11/+836
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 235119
* Fix failure on builder clang-cmake-mips where it was printing a 32-bit addressKevin Enderby2015-04-061-1/+2
| | | | | | | incorrectly because it came from an expression using S.getAddress() which always returns a 64-bit value. llvm-svn: 234251
* For llvm-objdump added support for printing Objc2 32-bit runtime meta dataKevin Enderby2015-04-061-20/+887
| | | | | | with the existing -objc-meta-data and -macho options for Mach-O files. llvm-svn: 234185
* Fix sanitizer-x86_64-linux-fast failure that was not deleting the bindtable.Kevin Enderby2015-04-011-0/+3
| | | | llvm-svn: 233856
* Add the option -objc-meta-data to llvm-objdump used with -macho toKevin Enderby2015-04-011-11/+1228
| | | | | | | | | | print the Objective-C runtime meta data for Mach-O files. There are three types of Objective-C runtime meta data, Objc2 64-bit, Objc2 32-bit and Objc1 32-bit. This prints the first of these types. The changes to print the others will follow next. llvm-svn: 233840
* Replace the MCSubtargetInfo parameter with a Triple when creatingEric Christopher2015-03-311-3/+3
| | | | | | | an MCInstPrinter. Update all callers and use where we wanted a Triple previously. llvm-svn: 233648
* [Objdump] Pass the correct subtarget to printInst.Akira Hatanaka2015-03-281-2/+2
| | | | | | This fixes a bug I introduced in r233411. llvm-svn: 233484
* [MCInstPrinter] Enable MCInstPrinter to change its behavior based on theAkira Hatanaka2015-03-271-3/+3
| | | | | | | | | | | | | | | | | | | | per-function subtarget. Currently, code-gen passes the default or generic subtarget to the constructors of MCInstPrinter subclasses (see LLVMTargetMachine::addPassesToEmitFile), which enables some targets (AArch64, ARM, and X86) to change their instprinter's behavior based on the subtarget feature bits. Since the backend can now use different subtargets for each function, instprinter has to be changed to use the per-function subtarget rather than the default subtarget. This patch takes the first step towards enabling instprinter to change its behavior based on the per-function subtarget. It adds a bit "PassSubtarget" to AsmWriter which tells table-gen to pass a reference to MCSubtargetInfo to the various print methods table-gen auto-generates. I will follow up with changes to instprinters of AArch64, ARM, and X86. llvm-svn: 233411
* Add a -raw option to the -section mode of llvm-objdump.Adrian Prantl2015-03-271-3/+13
| | | | llvm-svn: 233390
* Refactor: simplify boolean expressions in llvm-objdumpDavid Blaikie2015-03-231-235/+224
| | | | | | | | | | | | | | | | Simplify boolean expressions involving `true` and `false` with `clang-tidy`. Actually upon inspection a bunch of these boolean variables could be factored away entirely anyway - using find_if and then testing the result before using it. This also helps reduce indentation in the code anyway - and a bunch of other related simplification fell out nearby so I just committed all of that. Patch by Richard Thomson (legalize@xmission.com) Differential Revision: http://reviews.llvm.org/D8517 llvm-svn: 232984
* [Objdump] DumpBytes of uint8_t from ArrayRef<uint8_t> instead of char from ↵Colin LeMahieu2015-03-181-15/+10
| | | | | | StringRef. Removing reinterpret_casts. llvm-svn: 232659
* Add the option -no-symbolic-operands to llvm-objdump used with -macho andKevin Enderby2015-03-171-3/+7
| | | | | | -disassemble to not symbolic operands when disassembling. llvm-svn: 232558
* Add the option, -no-leading-addr llvm-objdump used with -macho andKevin Enderby2015-03-171-20/+28
| | | | | | -disassemble or -section to not print the leading addresses on each line. llvm-svn: 232547
* Add the option, -dis-symname to llvm-objdump used with -macho andKevin Enderby2015-03-171-0/+15
| | | | | | -disassemble to disassemble just one symbol’s instructions. llvm-svn: 232503
* Add the options, -dylibs-used and -dylib-id to llvm-objdump used with -machoKevin Enderby2015-03-161-1/+68
| | | | | | | to print the Mach-O dynamic shared libraries used by a linked image or the library id of a shared library. llvm-svn: 232406
* Add the option, -non-verbose to llvm-objdump used with -macho to print thingsKevin Enderby2015-03-131-16/+23
| | | | | | | | | | using numeric values and not their symbolic constant names. The routines that print Mach-O stuff already had a verbose parameter and this change is just changing the passing true to passing !NonVerbose. With just a couple of fixes and a bunch of test case updates. llvm-svn: 232182
* Add the option, -info-plist to llvm-objdump used with -macho to print theKevin Enderby2015-03-111-0/+29
| | | | | | Mach-O info plist section as strings. llvm-svn: 231974
* Make helper functions static.Benjamin Kramer2015-03-091-22/+25
| | | | | | Found by -Wmissing-prototypes. NFC. llvm-svn: 231664
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-171-18/+196
| | | | | | | | | | | literal pointer sections with the Mach-O S_LITERAL_POINTERS section type. Also fix the printing of the leading addresses for literal sections to be consistent and not print the 0x prefix. Updated test cases to match. llvm-svn: 229548
* Add code to llvm-objdump so the -section option with -macho will dump literalKevin Enderby2015-02-061-6/+134
| | | | | | sections with the Mach-O S_{4,8,16}BYTE_LITERALS section types. llvm-svn: 228465
* Identical code for different branches (CID 1254883)Sylvestre Ledru2015-02-051-27/+11
| | | | | | | | | | | | Reviewers: kledzik, rafael Reviewed By: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6303 llvm-svn: 228313
* revert 228308. The code has changed since the reviewSylvestre Ledru2015-02-051-11/+26
| | | | llvm-svn: 228309
* Identical code for different branches (CID 1254883)Sylvestre Ledru2015-02-051-26/+11
| | | | | | | | | | | | Reviewers: kledzik, rafael Reviewed By: rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6303 llvm-svn: 228308
* Add code to llvm-objdump so the -section option with -macho will dump ↵Kevin Enderby2015-02-041-0/+22
| | | | | | | | ‘C’ string sections with the Mach-O S_CSTRING_LITERALS section type. llvm-svn: 228198
* Add code to llvm-objdump so the -section option with -macho will disassemble ↵Kevin Enderby2015-02-041-24/+23
| | | | | | | | sections that have attributes indicating they contain instructions. llvm-svn: 228101
* Add the -section option to llvm-objdump used with -macho that takes the argumentKevin Enderby2015-01-311-24/+200
| | | | | | | | | | segname,sectname to specify a Mach-O section to print. The printing is based on the section type or section attributes. The printing of the module initialization and termination section types is printed with this change. Printing of other section types will be added next. llvm-svn: 227649
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-301-1/+1
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* dd the option, -link-opt-hints to llvm-objdump used with -macho to print theKevin Enderby2015-01-271-1/+66
| | | | | | Mach-O AArch64 linker optimization hints for ADRP code optimization. llvm-svn: 227246
* Fix the problem with llvm-objdump and -archive-headers in printing the ↵Kevin Enderby2015-01-231-1/+1
| | | | | | | | archive header size field. This problem showed up with the clang-cmake-armv7-a15-full bot. Thanks to Renato Golin for his help. llvm-svn: 226936
* Add the option, -data-in-code, to llvm-objdump used with -macho to print the ↵Kevin Enderby2015-01-231-1/+50
| | | | | | Mach-O data in code table. llvm-svn: 226921
* Add the option, -indirect-symbols, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-221-2/+133
| | | | | | indirect symbol table to llvm-objdump. llvm-svn: 226848
* For llvm-objdump, hook up existing options to work when using -macho (the ↵Kevin Enderby2015-01-201-14/+10
| | | | | | Mach-O parser). llvm-svn: 226612
* unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizerDavid Blaikie2015-01-181-2/+2
| | | | llvm-svn: 226416
* Fix the Archive::Child::getRawSize() method used by llvm-objdump’s ↵Kevin Enderby2015-01-161-1/+1
| | | | | | | | -archive-headers option and tweak its use in llvm-objdump. Add back the test case for the -archive-headers option. llvm-svn: 226332
* Add the option, -archive-headers, used with -macho to print the Mach-O ↵Kevin Enderby2015-01-151-2/+115
| | | | | | archive headers to llvm-objdump. llvm-svn: 226228
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-141-1/+1
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Fix an ASAN failure introduced with r225537 (adding the -universal-headers ↵Kevin Enderby2015-01-091-5/+5
| | | | | | | | to llvm-obdump). And a fly by fix to some formatting issues with the same commit. llvm-svn: 225550
OpenPOWER on IntegriCloud