forked from qt-creator/qt-creator
debugger: avoid endless loop created by dumpers that crash before outputting
the child list.
This commit is contained in:
@@ -2902,6 +2902,18 @@ void GdbEngine::runDebuggingHelper(const WatchData &data0, bool dumpChildren)
|
|||||||
}
|
}
|
||||||
WatchData data = data0;
|
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;
|
QByteArray params;
|
||||||
QStringList extraArgs;
|
QStringList extraArgs;
|
||||||
const QtDumperHelper::TypeData td = m_dumperHelper.typeData(data0.type);
|
const QtDumperHelper::TypeData td = m_dumperHelper.typeData(data0.type);
|
||||||
@@ -3531,6 +3543,7 @@ void GdbEngine::updateLocals()
|
|||||||
tryQueryDebuggingHelpers();
|
tryQueryDebuggingHelpers();
|
||||||
|
|
||||||
m_pendingRequests = 0;
|
m_pendingRequests = 0;
|
||||||
|
m_processedNames.clear();
|
||||||
|
|
||||||
PENDING_DEBUG("\nRESET PENDING");
|
PENDING_DEBUG("\nRESET PENDING");
|
||||||
//m_toolTipCache.clear();
|
//m_toolTipCache.clear();
|
||||||
|
@@ -374,6 +374,7 @@ private:
|
|||||||
QString parseDisassembler(const GdbMi &lines);
|
QString parseDisassembler(const GdbMi &lines);
|
||||||
|
|
||||||
int m_pendingRequests;
|
int m_pendingRequests;
|
||||||
|
QSet<QString> m_processedNames;
|
||||||
|
|
||||||
QtDumperHelper m_dumperHelper;
|
QtDumperHelper m_dumperHelper;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user