forked from qt-creator/qt-creator
Debugger: Simplify GdbEngine::updateWatchData
The removed parts were only used with the non-Python engine. Change-Id: Ia6858517b011c6f7ace8b2521beafdb4b03efc89 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -3727,36 +3727,9 @@ void GdbEngine::reloadLocals()
|
|||||||
|
|
||||||
void GdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags)
|
void GdbEngine::updateWatchData(const WatchData &data, const WatchUpdateFlags &flags)
|
||||||
{
|
{
|
||||||
// This should only be called for fresh expanded items, not for
|
|
||||||
// items that had their children retrieved earlier.
|
|
||||||
//qDebug() << "\nUPDATE WATCH DATA: " << data.toString() << "\n";
|
|
||||||
if (data.iname.endsWith("."))
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Avoid endless loops created by faulty dumpers.
|
|
||||||
QByteArray processedName = "1-" + data.iname;
|
|
||||||
//qDebug() << "PROCESSED NAMES: " << processedName << m_processedNames;
|
|
||||||
if (m_processedNames.contains(processedName)) {
|
|
||||||
showMessage(_("<Breaking endless loop for " + data.iname + '>'), LogMiscInput);
|
|
||||||
auto item = new WatchItem(data);
|
|
||||||
item->d.setAllUnneeded();
|
|
||||||
item->d.setValue(_("<unavailable>"));
|
|
||||||
item->d.setHasChildren(false);
|
|
||||||
watchHandler()->insertItem(item);
|
|
||||||
rebuildWatchModel();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_processedNames.insert(processedName);
|
|
||||||
|
|
||||||
// FIXME: Is this sufficient when "external" changes are
|
|
||||||
// triggered e.g. by manually entered command in the gdb console?
|
|
||||||
//qDebug() << "TRY PARTIAL: " << flags.tryIncremental
|
|
||||||
// << (m_pendingBreakpointRequests == 0);
|
|
||||||
|
|
||||||
UpdateParameters params;
|
UpdateParameters params;
|
||||||
params.tryPartial = flags.tryIncremental && m_pendingBreakpointRequests == 0;
|
params.tryPartial = flags.tryIncremental && m_pendingBreakpointRequests == 0;
|
||||||
params.varList = data.iname;
|
params.varList = data.iname;
|
||||||
|
|
||||||
updateLocalsPython(params);
|
updateLocalsPython(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4740,7 +4713,6 @@ void GdbEngine::updateLocalsPython(const UpdateParameters ¶ms)
|
|||||||
{
|
{
|
||||||
//m_pendingWatchRequests = 0;
|
//m_pendingWatchRequests = 0;
|
||||||
m_pendingBreakpointRequests = 0;
|
m_pendingBreakpointRequests = 0;
|
||||||
m_processedNames.clear();
|
|
||||||
|
|
||||||
DebuggerCommand cmd("showData");
|
DebuggerCommand cmd("showData");
|
||||||
watchHandler()->appendFormatRequests(&cmd);
|
watchHandler()->appendFormatRequests(&cmd);
|
||||||
|
@@ -417,7 +417,6 @@ protected:
|
|||||||
|
|
||||||
void setLocals(const QList<GdbMi> &locals);
|
void setLocals(const QList<GdbMi> &locals);
|
||||||
|
|
||||||
QSet<QByteArray> m_processedNames;
|
|
||||||
struct TypeInfo
|
struct TypeInfo
|
||||||
{
|
{
|
||||||
TypeInfo(uint s = 0) : size(s) {}
|
TypeInfo(uint s = 0) : size(s) {}
|
||||||
|
Reference in New Issue
Block a user