diff options
Diffstat (limited to 'lib/DebugInfo')
-rw-r--r-- | lib/DebugInfo/DWARF/DWARFContext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/DebugInfo/DWARF/DWARFContext.cpp b/lib/DebugInfo/DWARF/DWARFContext.cpp index 5893f223c07..414959c7a5c 100644 --- a/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/lib/DebugInfo/DWARF/DWARFContext.cpp @@ -357,12 +357,16 @@ void DWARFContext::dump( // Verbose dumping is done during parsing and not on the intermediate // representation. OS << "debug_line[" << format("0x%8.8x", Offset) << "]\n"; + unsigned OldOffset = Offset; if (DumpOpts.Verbose) { LineTable.parse(LineData, &Offset, U, &OS); } else { LineTable.parse(LineData, &Offset, U); LineTable.dump(OS); } + // Check for unparseable prologue, to avoid infinite loops. + if (OldOffset == Offset) + break; } } |