diff options
| author | Ed Maste <emaste@freebsd.org> | 2013-10-23 17:24:15 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@freebsd.org> | 2013-10-23 17:24:15 +0000 |
| commit | 2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00 (patch) | |
| tree | 442b48c0a4f1d80a58ed97d7d7838a211390f229 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp | |
| parent | 325ec89508dfae7af1f4eb48ab8fa034c763abf2 (diff) | |
| download | bcm5719-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/DWARFDebugPubnamesSet.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp index 2df8d525f03..7f8327d7fc1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnamesSet.cpp @@ -84,15 +84,26 @@ DWARFDebugPubnamesSet::Extract(const DataExtractor& data, lldb::offset_t *offset { m_descriptors.clear(); m_offset = *offset_ptr; + 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.die_offset = data.GetU32(offset_ptr); - m_header.die_length = data.GetU32(offset_ptr); + m_header.die_offset = data.GetMaxU64(offset_ptr, dwarf_offset_size); + m_header.die_length = data.GetMaxU64(offset_ptr, dwarf_offset_size); Descriptor pubnameDesc; while (data.ValidOffset(*offset_ptr)) { - pubnameDesc.offset = data.GetU32(offset_ptr); + pubnameDesc.offset = data.GetMaxU64(offset_ptr, dwarf_offset_size); if (pubnameDesc.offset) { |

