Commit 8d613fe1 authored by hjk's avatar hjk Committed by con

debugger: avoid endless loop created by dumpers that crash before outputting

the child list.
(cherry picked from commit 698b5ff2)
parent 190f0ab1
......@@ -2901,6 +2901,18 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
}
WatchData data = data0;
// Avoid endless loops created by faulty dumpers
if (m_processedNames.contains(data.iname)) {
emit gdbInputAvailable(LogStatus,
_("<Breaking endless loop for %1>").arg(data.iname));
data.setAllUnneeded();
data.setValue(_("<unavailable>"));
data.setHasChildren(false);
insertData(data);
return;
}
m_processedNames.insert(data.iname);
QByteArray params;
QStringList extraArgs;
const QtDumperHelper::TypeData td = m_dumperHelper.typeData(data0.type);
......@@ -3530,6 +3542,7 @@ void GdbEngine::updateLocals()
tryQueryDebuggingHelpers();
m_pendingRequests = 0;
m_processedNames.clear();
PENDING_DEBUG("\nRESET PENDING");
//m_toolTipCache.clear();
......
......@@ -374,6 +374,7 @@ private:
QString parseDisassembler(const GdbMi &lines);
int m_pendingRequests;
QSet<QString> m_processedNames;
QtDumperHelper m_dumperHelper;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment