summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF
diff options
context:
space:
mode:
authorWolfgang Pieb <Wolfgang.Pieb@sony.com>2019-02-01 17:11:58 +0000
committerWolfgang Pieb <Wolfgang.Pieb@sony.com>2019-02-01 17:11:58 +0000
commit58513b7761a92da26be08daa77329c5bc5b1a675 (patch)
tree4c352f9af83d85965ccba07a6b3582ecd4a60aaf /llvm/lib/DebugInfo/DWARF
parent18886db211939c965a843efc6472f3c6b2abf65d (diff)
downloadbcm5719-llvm-58513b7761a92da26be08daa77329c5bc5b1a675.tar.gz
bcm5719-llvm-58513b7761a92da26be08daa77329c5bc5b1a675.zip
[DWARF v5] Fix DWARF emitter and consumer to produce/expect a uleb for a location description's length.
Reviewer: davide, JDevliegere Differential Revision: https://reviews.llvm.org/D57550 llvm-svn: 352889
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
index a9e8d930a18..54e0e8e18fa 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
@@ -183,7 +183,8 @@ DWARFDebugLoclists::parseOneLocationList(DataExtractor Data, unsigned *Offset,
}
if (Kind != dwarf::DW_LLE_base_address) {
- unsigned Bytes = Data.getU16(Offset);
+ unsigned Bytes =
+ Version >= 5 ? Data.getULEB128(Offset) : Data.getU16(Offset);
// A single location description describing the location of the object...
StringRef str = Data.getData().substr(*Offset, Bytes);
*Offset += Bytes;
OpenPOWER on IntegriCloud