diff options
author | David Blaikie <dblaikie@gmail.com> | 2019-10-01 00:29:13 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2019-10-01 00:29:13 +0000 |
commit | 5ca306666c485b56866c4ed95472e55ee59ab35d (patch) | |
tree | 0994a2880f3b86dfac951b8ca9a3c03c9b53bf80 /llvm/lib | |
parent | d0727ec2113a0af4cdc27674c521d9959c461b71 (diff) | |
download | bcm5719-llvm-5ca306666c485b56866c4ed95472e55ee59ab35d.tar.gz bcm5719-llvm-5ca306666c485b56866c4ed95472e55ee59ab35d.zip |
DebugInfo: Add parsing support for debug_loc base address specifiers
llvm-svn: 373278
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp index 5507448ff59..f25431321bb 100644 --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp @@ -101,6 +101,7 @@ DWARFDebugLoc::parseOneLocationList(const DWARFDataExtractor &Data, if (Error Err = C.takeError()) return std::move(Err); + // The end of any given location list is marked by an end of list entry, // which consists of a 0 for the beginning address offset and a 0 for the // ending address offset. @@ -109,9 +110,12 @@ DWARFDebugLoc::parseOneLocationList(const DWARFDataExtractor &Data, return LL; } - unsigned Bytes = Data.getU16(C); - // A single location description describing the location of the object... - Data.getU8(C, E.Loc, Bytes); + if (E.Begin != (AddressSize == 4 ? -1U : -1ULL)) { + unsigned Bytes = Data.getU16(C); + // A single location description describing the location of the object... + Data.getU8(C, E.Loc, Bytes); + } + LL.Entries.push_back(std::move(E)); } } |