diff options
author | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-07-30 14:58:39 +0000 |
---|---|---|
committer | Ashok Thirumurthi <ashok.thirumurthi@intel.com> | 2013-07-30 14:58:39 +0000 |
commit | 0b864ee64c72ea578f7351a9d6284ed5d712b9f0 (patch) | |
tree | c8d827f5ce1d25771a2dfb205e7b091f825b1333 | |
parent | 8c2dc0ed580bf17b93431f8aca0ad7a89b594066 (diff) | |
download | lldb-0b864ee64c72ea578f7351a9d6284ed5d712b9f0.tar.gz |
Updates the DW_AT_data_member_location handlers for the LLDB DWARF plugin
to handle the case of an integer constant (DWARF 3 and later).
- Fixes tests that assert in RecordLayoutBuilder::updateExternalFieldOffset
because LLDB was providing an external AST source with missing member offsets.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@187423 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index d80236c5f..aa79d291a 100644 --- a/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -1780,6 +1780,13 @@ SymbolFileDWARF::ParseChildMembers member_byte_offset = memberOffset.ResolveValue(NULL).UInt(); } } + else + { + // With DWARF 3 and later, if the value is an integer constant, + // this form value is the offset in bytes from the beginning + // of the containing entity. + member_byte_offset = form_value.Unsigned(); + } break; case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType (form_value.Unsigned()); break; @@ -2164,16 +2171,28 @@ SymbolFileDWARF::ParseChildMembers member_byte_offset = memberOffset.ResolveValue(NULL).UInt(); } } + else + { + // With DWARF 3 and later, if the value is an integer constant, + // this form value is the offset in bytes from the beginning + // of the containing entity. + member_byte_offset = form_value.Unsigned(); + } break; case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned()); break; - case DW_AT_virtuality: is_virtual = form_value.Boolean(); break; - default: + case DW_AT_virtuality: + is_virtual = form_value.Boolean(); + break; + case DW_AT_sibling: break; + + default: + break; } } } @@ -2620,7 +2639,7 @@ SymbolFileDWARF::ResolveClangOpaqueTypeDefinition (ClangASTType &clang_type) assert(false && "not a forward clang type decl!"); break; } - return NULL; + return false; } Type* |