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
This commit is contained in:
Ed Maste 2014-04-08 15:12:07 +00:00
parent 97a70e4f7e
commit 4a06df95b9
1 changed files with 2 additions and 2 deletions

View File

@ -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;