diff options
author | George Rimar <grimar@accesssoftek.com> | 2018-10-12 09:46:15 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2018-10-12 09:46:15 +0000 |
commit | 230adfa96c487e08b0bcc539b7bf0cb669ccee8c (patch) | |
tree | c06ee220b7c5dc5d3db87e0f4f13015765b66f88 /lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp | |
parent | 487780678fcaf2662aa820bd50364addb935dfe8 (diff) | |
download | bcm5719-llvm-230adfa96c487e08b0bcc539b7bf0cb669ccee8c.tar.gz bcm5719-llvm-230adfa96c487e08b0bcc539b7bf0cb669ccee8c.zip |
[LLDB] - Add support for DW_FORM_implicit_const.
LLDB does not support this DWARF5 form atm.
At least gcc emits it in some cases when doing optimization
for abbreviations.
As far I can tell, clang does not support it yet, though
the rest LLVM code already knows about it.
The patch adds the support.
Differential revision: https://reviews.llvm.org/D52689
llvm-svn: 344328
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp index a765be0b46d..d78b9ab10f5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp @@ -41,9 +41,13 @@ bool DWARFAbbreviationDeclaration::Extract(const DWARFDataExtractor &data, while (data.ValidOffset(*offset_ptr)) { dw_attr_t attr = data.GetULEB128(offset_ptr); dw_form_t form = data.GetULEB128(offset_ptr); + DWARFFormValue::ValueType val; + + if (form == DW_FORM_implicit_const) + val.value.sval = data.GetULEB128(offset_ptr); if (attr && form) - m_attributes.push_back(DWARFAttribute(attr, form)); + m_attributes.push_back(DWARFAttribute(attr, form, val)); else break; } |