[Lldb-commits] [lldb] r356284 - Abbreviation declarations are required to have non-null tags.
Zachary Turner via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 15 11:00:43 PDT 2019
Author: zturner
Date: Fri Mar 15 11:00:43 2019
New Revision: 356284
URL: http://llvm.org/viewvc/llvm-project?rev=356284&view=rev
Log:
Abbreviation declarations are required to have non-null tags.
Treat a null tag as an error.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp?rev=356284&r1=356283&r2=356284&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFAbbreviationDeclaration.cpp Fri Mar 15 11:00:43 2019
@@ -34,11 +34,9 @@ DWARFAbbreviationDeclaration::extract(co
m_attributes.clear();
m_tag = data.GetULEB128(offset_ptr);
- if (m_tag == DW_TAG_null) {
- // FIXME: According to the DWARF spec this may actually be malformed.
- // Should this return an error instead?
- return DWARFEnumState::Complete;
- }
+ if (m_tag == DW_TAG_null)
+ return llvm::make_error<llvm::object::GenericBinaryError>(
+ "abbrev decl requires non-null tag.");
m_has_children = data.GetU8(offset_ptr);
More information about the lldb-commits
mailing list