Commit 8c1579bf authored by David Schulz's avatar David Schulz
Browse files

Debugger: Use unified locals update in the cdbengine.



Change-Id: I94c8bd554e9e5ee157fd2bc80d3889558d08a8f0
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 0218abf1
......@@ -1831,29 +1831,20 @@ void CdbEngine::handleLocals(const CdbResponse &response, bool newFrame)
watchHandler()->notifyUpdateFinished();
if (boolSetting(VerboseLog))
showMessage(QLatin1String("Locals: ") + QString::fromLatin1(response.extensionReply), LogDebug);
WatchHandler *handler = watchHandler();
GdbMi all;
all.fromString(response.extensionReply);
QTC_ASSERT(all.type() == GdbMi::List, return);
QSet<QByteArray> toDelete;
if (newFrame) {
foreach (WatchItem *item, handler->model()->itemsAtLevel<WatchItem *>(2))
toDelete.insert(item->iname);
}
foreach (const GdbMi &child, all.children()) {
WatchItem *item = new WatchItem(child);
handler->insertItem(item);
toDelete.remove(item->iname);
}
GdbMi data;
data.fromString(response.extensionReply);
QTC_ASSERT(data.type() == GdbMi::List, return);
data.m_name = "data";
handler->purgeOutdatedItems(toDelete);
GdbMi partial;
partial.m_name = "partial";
partial.m_data = QByteArray::number(newFrame ? 0 : 1);
if (newFrame) {
emit stackFrameCompleted();
DebuggerToolTipManager::updateEngine(this);
}
GdbMi all;
all.m_children.push_back(data);
all.m_children.push_back(partial);
updateLocalsView(all);
} else {
showMessage(QString::fromLatin1(response.errorMessage), LogWarning);
}
......
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