summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2013-10-23 17:24:15 +0000
committerEd Maste <emaste@freebsd.org>2013-10-23 17:24:15 +0000
commit2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00 (patch)
tree442b48c0a4f1d80a58ed97d7d7838a211390f229 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
parent325ec89508dfae7af1f4eb48ab8fa034c763abf2 (diff)
downloadbcm5719-llvm-2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00.tar.gz
bcm5719-llvm-2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00.zip
64-Bit DWARF support for .debug_aranges and .debug_pubnames
llvm-svn: 193250
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
index b1eb27299ef..7dc32127313 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugArangeSet.cpp
@@ -183,9 +183,20 @@ DWARFDebugArangeSet::Extract(const DataExtractor &data, lldb::offset_t *offset_p
// descriptor on the target system. This header is followed by a series
// of tuples. Each tuple consists of an address and a length, each in
// the size appropriate for an address on the target architecture.
+ size_t dwarf_offset_size = 4;
m_header.length = data.GetU32(offset_ptr);
+ if (m_header.length == 0xffffffff)
+ {
+ dwarf_offset_size = 8;
+ m_header.length = data.GetU64(offset_ptr);
+ }
+ else if (m_header.length >= 0xffffff00)
+ {
+ // Reserved.
+ return false;
+ }
m_header.version = data.GetU16(offset_ptr);
- m_header.cu_offset = data.GetU32(offset_ptr);
+ m_header.cu_offset = data.GetMaxU64(offset_ptr, dwarf_offset_size);
m_header.addr_size = data.GetU8(offset_ptr);
m_header.seg_size = data.GetU8(offset_ptr);
OpenPOWER on IntegriCloud