diff options
author | Greg Clayton <gclayton@apple.com> | 2013-04-03 21:09:33 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-04-03 21:09:33 +0000 |
commit | a75f0ca30e2dfe2cdae66209f7155a95a89216b7 (patch) | |
tree | 7186d53e6b30e7253ed94b1122a5b05bf1989f25 /lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | |
parent | 26cf0b5130bb99a4fef232733c0681eb8e315268 (diff) | |
download | bcm5719-llvm-a75f0ca30e2dfe2cdae66209f7155a95a89216b7.tar.gz bcm5719-llvm-a75f0ca30e2dfe2cdae66209f7155a95a89216b7.zip |
<rdar://problem/13561911>
Modify LLDB to handle DW_FORM_ref_addr attributes for DWARF3 and DWARF4.
llvm-svn: 178696
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp | 14 |
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: |