Debugger: Some parser code consolidation

Change-Id: Icd3afb632cb935fdd95f13db91c9c11a3dea732e
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
hjk
2015-01-29 13:53:15 +01:00
parent 0d0a6d119a
commit bea159a701
5 changed files with 21 additions and 32 deletions

View File

@@ -4958,25 +4958,11 @@ void GdbEngine::handleStackFramePython(const GdbResponse &response)
}
foreach (const GdbMi &child, data.children()) {
QByteArray iname = child["iname"].data();
QString name;
GdbMi wname = child["wname"];
if (wname.isValid()) // Happens (only) for watched expressions.
name = QString::fromUtf8(QByteArray::fromHex(wname.data()));
else
name = _(child["name"].data());
WatchItem *item = new WatchItem(iname, name);
item->parseWatchData(child);
WatchItem *item = new WatchItem(child);
const TypeInfo ti = m_typeInfoCache.value(item->d.type);
if (ti.size)
item->d.size = ti.size;
if (wname.isValid())
item->d.exp = name.toUtf8();
handler->insertItem(item);
toDelete.remove(item->d.iname);
}