forked from qt-creator/qt-creator
Debugger: Use unified locals update in the cdbengine.
Change-Id: I94c8bd554e9e5ee157fd2bc80d3889558d08a8f0 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
@@ -1831,29 +1831,20 @@ void CdbEngine::handleLocals(const CdbResponse &response, bool newFrame)
|
|||||||
watchHandler()->notifyUpdateFinished();
|
watchHandler()->notifyUpdateFinished();
|
||||||
if (boolSetting(VerboseLog))
|
if (boolSetting(VerboseLog))
|
||||||
showMessage(QLatin1String("Locals: ") + QString::fromLatin1(response.extensionReply), LogDebug);
|
showMessage(QLatin1String("Locals: ") + QString::fromLatin1(response.extensionReply), LogDebug);
|
||||||
WatchHandler *handler = watchHandler();
|
|
||||||
|
GdbMi data;
|
||||||
|
data.fromString(response.extensionReply);
|
||||||
|
QTC_ASSERT(data.type() == GdbMi::List, return);
|
||||||
|
data.m_name = "data";
|
||||||
|
|
||||||
|
GdbMi partial;
|
||||||
|
partial.m_name = "partial";
|
||||||
|
partial.m_data = QByteArray::number(newFrame ? 0 : 1);
|
||||||
|
|
||||||
GdbMi all;
|
GdbMi all;
|
||||||
all.fromString(response.extensionReply);
|
all.m_children.push_back(data);
|
||||||
QTC_ASSERT(all.type() == GdbMi::List, return);
|
all.m_children.push_back(partial);
|
||||||
|
updateLocalsView(all);
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
handler->purgeOutdatedItems(toDelete);
|
|
||||||
|
|
||||||
if (newFrame) {
|
|
||||||
emit stackFrameCompleted();
|
|
||||||
DebuggerToolTipManager::updateEngine(this);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
showMessage(QString::fromLatin1(response.errorMessage), LogWarning);
|
showMessage(QString::fromLatin1(response.errorMessage), LogWarning);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user