forked from qt-creator/qt-creator
Debugger: Use direct access to WatchItems in PDB engine
Change-Id: I4229cab0304160f1b47ee17f25fa7d30414bbe85 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -800,16 +800,20 @@ void PdbEngine::handleListLocals(const PdbResponse &response)
|
|||||||
//qDebug() << "ALL: " << all.toString();
|
//qDebug() << "ALL: " << all.toString();
|
||||||
|
|
||||||
//GdbMi data = all.findChild("data");
|
//GdbMi data = all.findChild("data");
|
||||||
QList<WatchData> list;
|
|
||||||
WatchHandler *handler = watchHandler();
|
WatchHandler *handler = watchHandler();
|
||||||
|
|
||||||
|
QSet<QByteArray> toDelete;
|
||||||
|
foreach (WatchItem *item, handler->model()->treeLevelItems<WatchItem *>(2))
|
||||||
|
toDelete.insert(item->d.iname);
|
||||||
|
|
||||||
foreach (const GdbMi &child, all.children()) {
|
foreach (const GdbMi &child, all.children()) {
|
||||||
WatchData dummy;
|
WatchItem *item = new WatchItem(child["iname"].data(), _(child["name"].data()));
|
||||||
dummy.iname = child["iname"].data();
|
item->parseWatchData(handler->expandedINames(), child);
|
||||||
dummy.name = _(child["name"].data());
|
handler->insertItem(item);
|
||||||
//qDebug() << "CHILD: " << child.toString();
|
toDelete.remove(item->d.iname);
|
||||||
parseWatchData(handler->expandedINames(), dummy, child, &list);
|
|
||||||
}
|
}
|
||||||
handler->insertData(list);
|
|
||||||
|
handler->purgeOutdatedItems(toDelete);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PdbEngine::hasCapability(unsigned cap) const
|
bool PdbEngine::hasCapability(unsigned cap) const
|
||||||
@@ -822,6 +826,5 @@ DebuggerEngine *createPdbEngine(const DebuggerStartParameters &startParameters)
|
|||||||
return new PdbEngine(startParameters);
|
return new PdbEngine(startParameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
Reference in New Issue
Block a user