diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-06-13 22:31:03 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-06-13 22:31:03 +0000 |
commit | 869d3efac9f13b12e36255aaf5ae88c8e05347df (patch) | |
tree | f5851aeedd20133b1f68a6f4a9e750191053d885 /lib/DebugInfo/DWARFDebugInfoEntry.cpp | |
parent | 9907af99d44487d51cf8631476f3d2284361483e (diff) | |
download | llvm-869d3efac9f13b12e36255aaf5ae88c8e05347df.tar.gz llvm-869d3efac9f13b12e36255aaf5ae88c8e05347df.tar.bz2 llvm-869d3efac9f13b12e36255aaf5ae88c8e05347df.tar.xz |
[DWARF parser] Use distinction between DW_AT_ranges_base and 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
Diffstat (limited to 'lib/DebugInfo/DWARFDebugInfoEntry.cpp')
-rw-r--r-- | lib/DebugInfo/DWARFDebugInfoEntry.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/DebugInfo/DWARFDebugInfoEntry.cpp b/lib/DebugInfo/DWARFDebugInfoEntry.cpp index b811ed7064..2e7a54aeb8 100644 --- a/lib/DebugInfo/DWARFDebugInfoEntry.cpp +++ b/lib/DebugInfo/DWARFDebugInfoEntry.cpp @@ -210,6 +210,16 @@ uint64_t DWARFDebugInfoEntryMinimal::getAttributeValueAsSectionOffset( return Result.hasValue() ? Result.getValue() : FailValue; } +uint64_t +DWARFDebugInfoEntryMinimal::getRangesBaseAttribute(const DWARFUnit *U, + uint64_t FailValue) const { + uint64_t Result = + getAttributeValueAsSectionOffset(U, DW_AT_ranges_base, -1ULL); + if (Result != -1ULL) + return Result; + return getAttributeValueAsSectionOffset(U, DW_AT_GNU_ranges_base, FailValue); +} + bool DWARFDebugInfoEntryMinimal::getLowAndHighPC(const DWARFUnit *U, uint64_t &LowPC, uint64_t &HighPC) const { |