diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:48:54 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:48:54 +0000 |
commit | 6bc11b14146b9a41402d0348438ff4edb1e344cd (patch) | |
tree | a3128f15d970747b64d8aaaa66d9fe8c176bef8a /contrib/llvm/include/llvm/DebugInfo | |
parent | 554491ffbdcfe51993d5b436a9bbca7aba388dd3 (diff) | |
parent | 583e75cce441388bc562fa225d23499261a0091e (diff) | |
download | src-6bc11b14146b9a41402d0348438ff4edb1e344cd.tar.gz src-6bc11b14146b9a41402d0348438ff4edb1e344cd.zip |
Notes
Diffstat (limited to 'contrib/llvm/include/llvm/DebugInfo')
-rw-r--r-- | contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h | 11 | ||||
-rw-r--r-- | contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h | 13 |
2 files changed, 14 insertions, 10 deletions
diff --git a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h index 33e24fe3adc9..ee06125ea278 100644 --- a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h +++ b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDie.h @@ -247,16 +247,11 @@ public: /// DW_AT_call_line attribute in this DIE. /// \param CallColumn filled in with non-zero if successful, zero if there is /// no DW_AT_call_column attribute in this DIE. + /// \param CallDiscriminator filled in with non-zero if successful, zero if + /// there is no DW_AT_GNU_discriminator attribute in this DIE. void getCallerFrame(uint32_t &CallFile, uint32_t &CallLine, - uint32_t &CallColumn) const; + uint32_t &CallColumn, uint32_t &CallDiscriminator) const; - /// Get inlined chain for a given address, rooted at the current DIE. - /// Returns empty chain if address is not contained in address range - /// of current DIE. - void - getInlinedChainForAddress(const uint64_t Address, - SmallVectorImpl<DWARFDie> &InlinedChain) const; - class attribute_iterator; /// Get an iterator range to all attributes in the current DIE only. diff --git a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h index 40eb4434bd61..023a0f7b9fb2 100644 --- a/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h +++ b/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h @@ -31,6 +31,7 @@ #include <cstdint> #include <memory> #include <vector> +#include <map> namespace llvm { @@ -134,6 +135,11 @@ class DWARFUnit { uint64_t BaseAddr; // The compile unit debug information entry items. std::vector<DWARFDebugInfoEntry> DieArray; + + // Map from range's start address to end address and corresponding DIE. + // IntervalMap does not support range removal, as a result, we use the + // std::map::upper_bound for address range lookup. + std::map<uint64_t, std::pair<uint64_t, DWARFDie>> AddrDieMap; typedef iterator_range<std::vector<DWARFDebugInfoEntry>::iterator> die_iterator_range; @@ -183,6 +189,9 @@ public: AddrOffsetSectionBase = Base; } + // Recursively update address to Die map. + void updateAddressDieMap(DWARFDie Die); + void setRangesSection(StringRef RS, uint32_t Base) { RangeSection = RS; RangeSectionBase = Base; @@ -339,10 +348,10 @@ private: /// it was actually constructed. bool parseDWO(); - /// getSubprogramForAddress - Returns subprogram DIE with address range + /// getSubroutineForAddress - Returns subprogram DIE with address range /// encompassing the provided address. The pointer is alive as long as parsed /// compile unit DIEs are not cleared. - DWARFDie getSubprogramForAddress(uint64_t Address); + DWARFDie getSubroutineForAddress(uint64_t Address); }; } // end namespace llvm |