summaryrefslogtreecommitdiff
path: root/tools/llvm-dwarfdump
Commit message (Collapse)AuthorAge
* Pass a std::unique_ptr& to the create??? methods is lib/Object.Rafael Espindola2014-06-23
| | | | | | | | This makes the buffer ownership on error conditions very natural. The buffer is only moved out of the argument if an object is constructed that now owns the buffer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211546 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210876 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-12
| | | | | | This should make sure that most new uses use the std prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210835 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove system_error.h.Rafael Espindola2014-06-12
| | | | | | | This is a minimal change to remove the header. I will remove the occurrences of "using std::error_code" in a followup patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210803 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill symbolization functionality in llvm-dwarfdump. We have llvm-symbolizer ↵Alexey Samsonov2014-05-19
| | | | | | for that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209152 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier.Alexey Samsonov2014-05-15
| | | | | | | | | | | | | It is more appropriate than the current situation, when one flag (AbsoluteFilePath) is relevant only if another flag is set. This refactoring would also simplify fetching the short function name (stored in DW_AT_name) instead of a linkage name returned currently. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208921 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Turn DILineInfo into a struct.Alexey Samsonov2014-04-18
| | | | | | | | | | | Immutable DILineInfo doesn't bring any benefits and complicates code. Also, use std::string instead of SmallString<16> for file and function names - their length can vary significantly. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206654 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Support debug_loc under fissionDavid Blaikie2014-03-25
| | | | | | | | | | | | | | | | | | | | | | Implement debug_loc.dwo, as well as llvm-dwarfdump support for dumping this section. Outlined in the DWARF5 spec and http://gcc.gnu.org/wiki/DebugFission the debug_loc.dwo section has more variation than the standard debug_loc, allowing 3 different forms of entry (plus the end of list entry). GCC seems to, and Clang certainly, only use one form, so I've just implemented dumping support for that for now. It wasn't immediately obvious that there was a good refactoring to share the implementation of dumping support between debug_loc and debug_loc.dwo, so they're separate for now - ideas welcome or I may come back to it at some point. As per a comment in the code, we could choose different forms that may reduce the number of debug_addr entries we emit, but that will require further study. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204697 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-06
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Support for debug_line.dwo section for file names for type ↵David Blaikie2014-02-24
| | | | | | units under fission. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202091 91177308-0d34-0410-b5e6-96231b3b80d8
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199776 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: type unit dwo supportDavid Blaikie2014-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198850 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196908 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: support for emitting only the debug_types section using ↵David Blaikie2013-11-19
| | | | | | -debug-dump git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195063 91177308-0d34-0410-b5e6-96231b3b80d8
* Add gnu pubsections as options to llvm-dwarfdump.Eric Christopher2013-09-25
| | | | | | Argument spelling feedback welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191409 91177308-0d34-0410-b5e6-96231b3b80d8
* Dump the normal dwarf pubtypes section as well.Eric Christopher2013-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191408 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Add support for dumping the .debug_loc sectionDavid Blaikie2013-06-19
| | | | | | | | | This is a basic implementation - we still don't have any support (that I know of) for dumping DWARF expressions in a meaningful way, so the location information itself is just printed as a sequence of bytes as we do elsewhere. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184361 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the pubnames section to llvm-dwarfdump.Krzysztof Parzyszek2013-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174976 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for DWARF CFI parsing and dumping in LLVMEli Bendersky2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174463 91177308-0d34-0410-b5e6-96231b3b80d8
* When encountering an unknown file format, ObjectFile::createObjectFile shouldEli Bendersky2013-01-25
| | | | | | | | | | | politely report it instead of running into llvm_unreachable. Also patch llvm-dwarfdump to actually check whether the file it's attempting to dump is a valid object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173489 91177308-0d34-0410-b5e6-96231b3b80d8
* Add command-line flags for DWARF dumping.Eli Bendersky2013-01-25
| | | | | | | | | Flags for dumping specific DWARF sections added in lib/DebugInfo and llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173480 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename variable to be more comprehensible and follow naming conventionEli Bendersky2013-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173460 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for tools/...Chandler Carruth2012-12-04
| | | | | | | | Again, tools are trickier to pick the main module header for than library source files. I've started to follow the pattern of using LLVMContext.h when it is included as a stub for program source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169252 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite DIContext interface to take an object. Update all callers.Eric Christopher2012-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167757 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in ↵Alexey Samsonov2012-11-12
| | | | | | DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167728 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a relocation visitor to lib object. This works via caching relocatedEric Christopher2012-11-07
| | | | | | | values in a map that can be passed to consumers. Add a testcase that ensures this works for llvm-dwarfdump. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167558 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting and 80-col.Eric Christopher2012-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166075 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for fetching inlining context (stack of source code locations)Alexey Samsonov2012-09-04
| | | | | | | | | | | | by instruction address from DWARF. Add --inlining flag to llvm-dwarfdump to demonstrate and test this functionality, so that "llvm-dwarfdump --inlining --address=0x..." now works much like "addr2line -i 0x...", provided that the binary has debug info (Clang's -gline-tables-only *is* enough). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163128 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic support for .debug_ranges section to LLVM's DebugInfo library.Alexey Samsonov2012-08-27
| | | | | | | | | | | | This section (introduced in DWARF-3) is used to define instruction address ranges for functions that are not contiguous and can't be described by low_pc/high_pc attributes (this is the usual case for inlined subroutines). The patch is the first step to support fetching complete inlining info from DWARF. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162657 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo library: add support for fetching absolute paths to source filesAlexey Samsonov2012-07-19
| | | | | | | | | (instead of basenames) from DWARF. Use this behavior in llvm-dwarfdump tool. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160496 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch extends the libLLVMDebugInfo which contains a minimalistic DWARF ↵Alexey Samsonov2012-07-02
| | | | | | | | | | parser: 1) DIContext is now able to return function name for a given instruction address (besides file/line info). 2) llvm-dwarfdump accepts flag --functions that prints the function name (if address is specified by --address flag). 3) test case that checks the basic functionality of llvm-dwarfdump added git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159512 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146409 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVMBuild: Add description files for the LLVM tools.Daniel Dunbar2011-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144417 91177308-0d34-0410-b5e6-96231b3b80d8
* build: Tidy up a bunch of tool Makefiles, and simplify where possible using theDaniel Dunbar2011-10-18
| | | | | | new all-targets pseudo-component. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142401 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a few changes I missed.Michael J. Spencer2011-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141392 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Add an option to print out line info for a specific addressBenjamin Kramer2011-09-15
| | | | | | | | Usage: $ llvm-dwarfdump -address=0x0000000100000ed4 a.out.dSYM/Contents/Resources/DWARF/a.out xxx.c:6:0 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139850 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: wire up .debug_str dumping.Benjamin Kramer2011-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139799 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Add basic support for line tables.Benjamin Kramer2011-09-15
| | | | | | The llvm-dwarfdump output isn't very verbose yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139771 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Make the "is debug info section" heuristic stricter so it ↵Benjamin Kramer2011-09-14
| | | | | | | | | | doesn't accidentaly picks up the wrong section. Also add some validation code to the aranges section parser. Fixes PR10926. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139701 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Port support for parsing .debug_aranges section from LLDB and wire it ↵Benjamin Kramer2011-09-14
| | | | | | | | | up to llvm-dwarfdump. This is only one half of it, the part that caches address ranges from the DIEs when .debug_aranges is not available will be ported soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139680 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch out a DWARF parser.Benjamin Kramer2011-09-13
This introduces a new library to LLVM: libDebugInfo. It will provide debug information parsing to LLVM. Much of the design and some of the code is taken from the LLDB project. It also contains an llvm-dwarfdump tool that can dump the abbrevs and DIEs from an object file. It can be used to write tests for DWARF input and output easily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139627 91177308-0d34-0410-b5e6-96231b3b80d8