Debugger: Add size to watch data.

Have CDB report it, pass it on to adding watches.
This commit is contained in:
Friedemann Kleint
2011-04-04 16:15:03 +02:00
parent e5f72538d0
commit 122f6a1845
9 changed files with 30 additions and 5 deletions

View File

@@ -1349,6 +1349,16 @@ void setWatchDataAddress(WatchData &data, const GdbMi &mi)
setWatchDataAddressHelper(data, mi.data());
}
void setWatchDataSize(WatchData &data, const GdbMi &mi)
{
if (mi.isValid()) {
bool ok = false;
const unsigned size = mi.data().toUInt(&ok);
if (ok)
data.size = size;
}
}
void setWatchDataAddressHelper(WatchData &data, const QByteArray &addr)
{
if (addr.startsWith("0x")) { // Item model dumpers pull tricks
@@ -1408,6 +1418,7 @@ void parseWatchData(const QSet<QByteArray> &expandedINames,
setWatchDataValue(data, item);
setWatchDataAddress(data, item.findChild("addr"));
setWatchDataSize(data, item.findChild("size"));
setWatchDataExpression(data, item.findChild("exp"));
setWatchDataValueEnabled(data, item.findChild("valueenabled"));
setWatchDataValueEditable(data, item.findChild("valueeditable"));