From 4a06df95b958ae4aef9f1b4c43c2a8e1d3eb72be Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Tue, 8 Apr 2014 15:12:07 +0000 Subject: [PATCH] Accept DWARF version 2 and 3 in debug_line tables Issue reported by Matthew Gardiner. Further work is necessary to synchronize LLDB's DWARF classes with the derivatives now in LLVM. llvm-svn: 205771 --- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index f7eb613034dd..46f77902cba4 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -418,7 +418,7 @@ DWARFDebugLine::ParsePrologue(const DWARFDataExtractor& debug_line_data, lldb::o const char * s; prologue->total_length = debug_line_data.GetDWARFInitialLength(offset_ptr); prologue->version = debug_line_data.GetU16(offset_ptr); - if (prologue->version != 2) + if (prologue->version < 2 || prologue->version > 3) return false; prologue->prologue_length = debug_line_data.GetDWARFOffset(offset_ptr); @@ -486,7 +486,7 @@ DWARFDebugLine::ParseSupportFiles (const lldb::ModuleSP &module_sp, (void)debug_line_data.GetDWARFInitialLength(&offset); const char * s; uint32_t version = debug_line_data.GetU16(&offset); - if (version != 2) + if (version < 2 || version > 3) return false; const dw_offset_t end_prologue_offset = debug_line_data.GetDWARFOffset(&offset) + offset;