summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFDebugAranges.cpp
Commit message (Collapse)AuthorAge
* [DWARF parser] Fix broken address ranges construction.Alexey Samsonov2014-06-12
| | | | | | | | | | | | | | | | | | Previous algorithm for constructing [Address ranges]->[Compile Units] mapping was wrong. It somewhat relied on the assumption that address ranges for different compile units may not overlap. It is not so. For example, two compile units may contain the definition of the same linkonce_odr function. These definitions will be merged at link-time, resulting in equivalent .debug_ranges entries for both these units Instead of sorting and merging original address ranges (from .debug_ranges and .debug_aranges), implement a different approach: save endpoints of all ranges, and then use a sweep-line approach to construct the desired mapping. If we find that certain address maps to several compilation units, we just pick any of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210860 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Simplify DWARFDebugAranges generation.Alexey Samsonov2014-04-28
| | | | | | | | | | | There is no need to keep the whole contents of .debug_aranges section in memory when we build address ranges table. Memory optimization that used to be in this code (precalculate the size of vector of ranges before filling it) is not really needed - later we will compact and resize this vector anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207457 91177308-0d34-0410-b5e6-96231b3b80d8
* [DWARF parser] Cleanup code in DWARFDebugAranges.Alexey Samsonov2014-04-25
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207276 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] 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
* [DebugInfo] Further simplify DWARFDebugAranges public interfaceAlexey Samsonov2013-10-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191813 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Simplify and speedup .debug_aranges parsingAlexey Samsonov2013-10-01
| | | | | | | | | | | | Parsing .debug_aranges section now takes O(nlogn) operations instead of O(n^2), where "n" is the number of address ranges. With this change, the time required to symbolize an address from a random large Clang-generated binary drops from 165 seconds to 1.5 seconds. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191781 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Further simplify DWARFDebugAranges. No functionality change.Alexey Samsonov2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191779 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Remove unused functions from DWARFDebugAranges and fix code style.Alexey Samsonov2013-10-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191778 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
* Fix missing std::. Not sure how this compiles for anyone else.Matt Arsenault2013-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177620 91177308-0d34-0410-b5e6-96231b3b80d8
* [DebugInfo] Generate address ranges for compile units even if .debug_aranges ↵Alexey Samsonov2012-11-16
| | | | | | is present: it is often the case that .debug_aranges section contains ranges only for a small subset of compile units. Test cases will be added in separate commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168144 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused typedefs gcc4.8 warns about.Roman Divacky2012-09-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163225 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
* Add more PRI.64 macros for MSVC and use them throughout the codebase.Benjamin Kramer2011-11-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143799 91177308-0d34-0410-b5e6-96231b3b80d8
* DWARF: Reset the state after parsing a line table prologue and remove an ↵Benjamin Kramer2011-09-15
| | | | | | unnecessary lookup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139859 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: 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