summaryrefslogtreecommitdiff
path: root/tools/llvm-objdump
Commit message (Collapse)AuthorAge
* llvm-objdump: Detach symbol listing from section enumeration for mach-o.Benjamin Kramer2011-09-21
| | | | | | This reduces memory usage as we don't add the same symbol multiple times anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140278 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Take the data from the right object when there's no dSYM around.Benjamin Kramer2011-09-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140269 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Fix use after free.Benjamin Kramer2011-09-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140237 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Output line info next to the disassembly if available.Benjamin Kramer2011-09-21
| | | | | | | | | | | | MachO-only at the moment, sorry. Usage: $ llvm-objdump -d -m -g -dsym=a.out.dSYM/Contents/Resources/DWARF/a.out a.out _main: 100000e90: 55 pushq %rbp ## test.c:11:3 … git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140224 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: factor code better, add comments.Benjamin Kramer2011-09-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140153 91177308-0d34-0410-b5e6-96231b3b80d8
* Nope, there's another one!Benjamin Kramer2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140045 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed one instance of implicit pointer conversion.Benjamin Kramer2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140044 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to make MSVC 2010 happy.Benjamin Kramer2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140042 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a MachO-specific "mode" to llvm-objdump, that, if enabled, gathers ↵Benjamin Kramer2011-09-19
| | | | | | | | | additional information that are only available on MachO. - It can take FunctionStarts from a binary to find entry points more accurately. - Symbol offsets in executables are correct now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140028 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-15
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: make the following changes into SymbolRefBenjamin Kramer2011-09-14
| | | | | | | | | | | - Add enum SymbolType and function getSymbolType() - Add function isGlobal() - it's returns true for symbols that can be used in another objects, such as library functions. - Rename function getAddress() to getOffset() and add new function getAddress(), because currently getAddress() returns section offset of symbol first byte. new getAddress() return symbol address. - Change usage SymbolRef::getAddress() to getOffset() in tools/llvm-nm and tools/llvm-objdump. Patch by Danil Malyshev! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139683 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-07
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139237 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
* Some refactoring so TargetRegistry.h no longer has to include any filesEvan Cheng2011-08-23
| | | | | | | from MC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138367 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCInstrAnalysis class. This allows the targets to specify own versions ↵Benjamin Kramer2011-08-08
| | | | | | | | | of MCInstrDescs functions. - Add overrides for ARM. - Teach llvm-objdump to use this instead of plain MCInstrDesc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137059 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: disassembly enhancementsBenjamin Kramer2011-08-08
| | | | | | | - Indent simple loops - Print unreachable blocks as .byte directives git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137058 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Use help of CFG to print assembly when --cfg is passed.Benjamin Kramer2011-08-08
| | | | | | This way we can avoid printing unreachable code (data). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137057 91177308-0d34-0410-b5e6-96231b3b80d8
* I will save before I commit.Benjamin Kramer2011-07-25
| | | | | | | | I will save before I commit. I will save before I commit. I will save before I commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136007 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Ignore unreachable blocks when printing the CFG.Benjamin Kramer2011-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136000 91177308-0d34-0410-b5e6-96231b3b80d8
* Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2011-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135974 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2011-07-25
| | | | | | TargetMachine's anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135963 91177308-0d34-0410-b5e6-96231b3b80d8
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-22
| | | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135812 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Don't ignore errors from raw_fd_ostream.Benjamin Kramer2011-07-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135787 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Skip branches that leave the current function.Benjamin Kramer2011-07-22
| | | | | | | In "normal" code these only happen when disassembling data, so we won't lose anything if we just drop them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135786 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the registered target printing in version strings completely out ofChandler Carruth2011-07-22
| | | | | | | | | | | | | | | | | the Support library. Now its part of the TargetRegistry, and the three commands that care about this explicitly register this extra bit of version information. The set of commands which care was computed by intersecting those which use the Support library's version string printing and those that initialize all the registered targets in a way that produces a meaningful list. The only odd ball out is that 'clang -cc1as -version' no longer prints the registered targets. I don't think anyone is really interested in that (especially as the fact that llvm-mc does so is under a FIXME), but if someone really does want this back I'll happily apply the same patch there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135757 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the MSVC build. Since the "next" function already exists in the MSVC ↵Francois Pichet2011-07-20
| | | | | | headers, we need the explicit llvm:: qualifier to prevent a conflict. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135623 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix cmake.Benjamin Kramer2011-07-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135609 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch out an CFG reconstruction mode for llvm-objdump.Benjamin Kramer2011-07-20
| | | | | | | | | | | | | - Not great yet, but it's a start. - Requires an object file with a symbol table. (I really want to fix this, but it'll need a whole new algorithm) - ELF and COFF won't work at the moment due to libObject shortcomings. To try it out run $ llvm-objdump -d --cfg foo.o This will create a graphviz file for every symbol in the object file's text section containing a CFG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135608 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix off-by-one.Benjamin Kramer2011-07-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135533 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MCCodeGenInfo, which keeps information that can affect codegenEvan Cheng2011-07-19
| | | | | | | | (including compilation, assembly). Move relocation model Reloc::Model from TargetMachine to MCCodeGenInfo so it's accessible even without TargetMachine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135468 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach llvm-objdump to disassemble sections symbol by symbol.Benjamin Kramer2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135289 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename createAsmInfo to createMCAsmInfo and move registration code to ↵Evan Cheng2011-07-14
| | | | | | MCTargetDesc to prepare for next round of changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135219 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some unnecessary includes.Eli Friedman2011-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134528 91177308-0d34-0410-b5e6-96231b3b80d8
* createMCInstPrinter doesn't need TargetMachine anymore.Evan Cheng2011-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134525 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name toEvan Cheng2011-06-30
| | | | | | | | | | | be the first encoded as the first feature. It then uses the CPU name to look up features / scheduling itineray even though clients know full well the CPU name being used to query these properties. The fix is to just have the clients explictly pass the CPU name! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134127 91177308-0d34-0410-b5e6-96231b3b80d8
* Object: Add proper error handling.Michael J. Spencer2011-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133872 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused STL header includes.Jay Foad2011-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
* We need to pass the TargetMachine object to the InstPrinter if we are printingBill Wendling2011-03-21
| | | | | | | | | | the alias of an InstAlias instead of the thing being aliased. Because we need to know the features that are valid for an InstAlias. This is part of a work-in-progress. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127986 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-objdump: Remove redundant includes.Michael J. Spencer2011-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123902 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-nm: Fix warning.Michael J. Spencer2011-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123901 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm-objdumpMichael J. Spencer2011-01-20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123898 91177308-0d34-0410-b5e6-96231b3b80d8