summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
authorPaul Robinson <paul.robinson@sony.com>2017-12-01 18:25:30 +0000
committerPaul Robinson <paul.robinson@sony.com>2017-12-01 18:25:30 +0000
commitab69b477a9c6f43784b48e080cc10ef38c37656d (patch)
tree3c4df809f063741a95f3320633236efbc29f4b74 /llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
parentb70824c1b84296eba4a6e209820b82829a10f534 (diff)
downloadbcm5719-llvm-ab69b477a9c6f43784b48e080cc10ef38c37656d.tar.gz
bcm5719-llvm-ab69b477a9c6f43784b48e080cc10ef38c37656d.zip
[DebugInfo] Bail out if making no progress dumping line tables.
llvm-svn: 319564
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 5893f223c07..414959c7a5c 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/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;
}
}
OpenPOWER on IntegriCloud