Commit 698b5ff2 authored by hjk's avatar hjk

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

the child list.
parent a43bda60
......@@ -2902,6 +2902,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);
......@@ -3531,6 +3543,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