From 230adfa96c487e08b0bcc539b7bf0cb669ccee8c Mon Sep 17 00:00:00 2001 From: George Rimar Date: Fri, 12 Oct 2018 09:46:15 +0000 Subject: [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 --- .../Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lldb/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp') 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; } -- cgit v1.2.3