summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp')
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 949d6d08488..7b3a6cba176 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -184,9 +184,14 @@ DWARFDebugInfoEntry::FastExtract
// Compile unit address sized values
case DW_FORM_addr :
- case DW_FORM_ref_addr :
form_size = cu->GetAddressByteSize();
break;
+ case DW_FORM_ref_addr :
+ if (cu->GetVersion() <= 2)
+ form_size = cu->GetAddressByteSize();
+ else
+ form_size = 4; // 4 bytes for DWARF 32, 8 bytes for DWARF 64, but we don't support DWARF64 yet
+ break;
// 0 sized form
case DW_FORM_flag_present:
@@ -343,9 +348,14 @@ DWARFDebugInfoEntry::Extract
// Compile unit address sized values
case DW_FORM_addr :
- case DW_FORM_ref_addr :
form_size = cu_addr_size;
break;
+ case DW_FORM_ref_addr :
+ if (cu->GetVersion() <= 2)
+ form_size = cu_addr_size;
+ else
+ form_size = 4; // 4 bytes for DWARF 32, 8 bytes for DWARF 64, but we don't support DWARF64 yet
+ break;
// 0 sized form
case DW_FORM_flag_present:
OpenPOWER on IntegriCloud