summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFDebugInfoEntry.cpp
Commit message (Collapse)AuthorAge
* [DWARF parser] Use distinction between DW_AT_ranges_base and ↵Alexey Samsonov2014-06-13
| | | | | | DW_AT_GNU_ranges_base instead of DWARF version git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210945 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Teach DIContext to fetch short (non-linkage) function names ↵Alexey Samsonov2014-05-17
| | | | | | | | | | | for a given address. Change --functions option in llvm-symbolizer tool to accept values "none", "short" or "linkage". Update the tests and docs accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209050 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
* DebugInfo: Remove some initializer lists to make MSVC happy again.Benjamin Kramer2014-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206632 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Refactor fetching DIE address ranges.Alexey Samsonov2014-04-18
| | | | | | | | | | | Add a helper method to get address ranges specified in a DIE (either by DW_AT_low_pc/DW_AT_high_pc, or by DW_AT_ranges). Use it to untangle and simplify the code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206624 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-15
| | | | | | instead of comparing to nullptr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206252 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++11] Convert DWARF parser to range-based for loopsAlexey Samsonov2014-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203766 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.Alexey Samsonov2013-10-28
| | | | | | | | Complicated CU-DIE-specific logic in the latter was never used, and it makes sense to have safety checks for broken dwarf in the former. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193563 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: Use ArrayRef to represent form sizes and simplify ↵Alexey Samsonov2013-10-28
| | | | | | DWARFDIE::extractFast() interface. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing ↵Alexey Samsonov2013-10-28
| | | | | | function size git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193555 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Introduce the notion of "form classes"Alexey Samsonov2013-10-28
| | | | | | | | | | | | | | | | | | Summary: Use DWARF4 table of form classes to fetch attributes from DIE in a more consistent way. This shouldn't change the functionality and serves as a refactoring for upcoming change: DW_AT_high_pc has different semantics depending on its form class. Reviewers: dblaikie, echristo Reviewed By: echristo CC: echristo, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1961 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Delete dead code, simplify and fix code style for some existing ↵Alexey Samsonov2013-10-17
| | | | | | code. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192894 91177308-0d34-0410-b5e6-96231b3b80d8
* Exract most of DWARFCompileUnit into a new DWARFUnit to prepare for the ↵David Blaikie2013-09-23
| | | | | | coming DWARFTypeUnit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191233 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for DebugFission to DWARF parserAlexey Samsonov2013-08-27
| | | | | | | | | | | | | | | | | | | Summary: 1) Make llvm-symbolizer properly symbolize files with split debug info (by using stanalone .dwo files). 2) Make DWARFCompileUnit parse and store corresponding .dwo file, if necessary. 3) Make bits of DWARF parsing more CompileUnit-oriented. Reviewers: echristo Reviewed By: echristo CC: bkramer, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1164 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189329 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-dwarfdump: Do not include address offsets for attributes, only for tagsDavid Blaikie2013-08-19
| | | | | | | | | This reduces the noise in diffs making it more likely that, at least for LLVM revision-over-revision, diffs will actually yield usable results. This is consistent with objdump's DWARF dumping behavior. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188650 91177308-0d34-0410-b5e6-96231b3b80d8
* Store compile unit corresponding to each chain of inlined debug info ↵Alexey Samsonov2013-08-06
| | | | | | entries. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187792 91177308-0d34-0410-b5e6-96231b3b80d8
* Create a stub for DWARF parser unittestsAlexey Samsonov2013-04-17
| | | | | | | | Moves one DWARF-specific header to include/llvm/DebugInfo from lib/. Add a short unittest for r179095. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179678 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF parser: remove duplicated code and fix code style in DIE extractors.Alexey Samsonov2013-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179023 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the assembly and dissassembly of DW_FORM_sec_offset. Found this byEric Christopher2013-01-17
| | | | | | | | | changing both the string of the dwo_name to be correct and the type of the statement list. Testcases all around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172699 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for separating strings for the split debug info DWARF5Eric Christopher2013-01-07
| | | | | | | | | | | | | proposal. This leaves the strings in the skeleton die as strp, but in all dwo files they're accessed now via DW_FORM_GNU_str_index. Add support for dumping these sections and modify the fission-cu.ll testcase to have the correct strings and form. Fix a small bug in the fixed form sizes routine that involved out of array accesses for the table and add a FIXME in the extractFast routine to fix this up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171779 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment.Eric Christopher2013-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171689 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the dumping infrastructure to deal with additionalEric Christopher2013-01-02
| | | | | | | | | | | | sections for debug info. These are some of the dwo sections from the DWARF5 split debug info proposal. Update the fission-cu.ll testcase to show what we should be able to dump more of now. Work in progress: Ultimately the relocations will be gone for the dwo section and the strings will be a different form (as well as the rest of the sections will be included). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171428 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat and 80-column this. It's not strictly conformingEric Christopher2012-10-30
| | | | | | | yet, but it's better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167053 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 support for some missing DW_FORM_*.Eric Christopher2012-08-24
| | | | | | TODO: Fix code duplication and coding style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162525 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting.Eric Christopher2012-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162524 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-col.Eric Christopher2012-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162422 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve behavior of DebugInfoEntryMinimal::getSubprogramName() introduced in ↵Alexey Samsonov2012-07-17
| | | | | | | | | | | | r159512. To fetch a subprogram name we should not only inspect the DIE for this subprogram, but optionally inspect its specification, or its abstract origin (even if there is no inlining), or even specification of an abstract origin. Reviewed by Benjamin Kramer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160365 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
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148578 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the offsets in DwarfDebugInfoEntry to 32 bit, they're printed with %x andBenjamin Kramer2011-11-05
| | | | | | | | that breaks on big-endian machines. I have to clean up the 32/64 bit confusion in libDebugInfo some day. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143812 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: Make DIE printing more bulletproof.Benjamin Kramer2011-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139786 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Generate the address lookup table from the DIE tree if .debug_aranges ↵Benjamin Kramer2011-09-14
| | | | | | | | is not available. Ported from LLDB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139732 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Improve indentation of DIE dumping so it's easier to see the structure.Benjamin Kramer2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139705 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Don't print DIEs multiple times.Benjamin Kramer2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139671 91177308-0d34-0410-b5e6-96231b3b80d8
* Style & indentation tweaks.Benjamin Kramer2011-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139646 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