diff options
author | hjk <qtc-committer@nokia.com> | 2010-03-23 14:48:07 +0100 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-03-23 14:48:32 +0100 |
commit | 59af793953a8d80aa7e893121e71abac6f0ba132 (patch) | |
tree | a3db8e0c68214700f51018876e86c087c220eb53 | |
parent | a080b8df662e1a6b41bddb9cf54622a5385aaa9b (diff) | |
download | qt-creator-59af793953a8d80aa7e893121e71abac6f0ba132.tar.gz |
debugger: polish address display. also remove the mostly unused 'stored' address
-rw-r--r-- | share/qtcreator/gdbmacros/dumper.py | 12 | ||||
-rw-r--r-- | share/qtcreator/gdbmacros/gdbmacros.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/classicgdbengine.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.cpp | 7 | ||||
-rw-r--r-- | src/plugins/debugger/gdb/gdbengine.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/watchhandler.cpp | 2 | ||||
-rw-r--r-- | src/plugins/debugger/watchhandler.h | 1 | ||||
-rw-r--r-- | src/plugins/debugger/watchutils.cpp | 1 |
8 files changed, 10 insertions, 18 deletions
diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 644f4f9a38..4b265c2eb2 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -1099,6 +1099,10 @@ class Dumper: #for line in tb: # warn("%s" % line) self.putName(item.name) + try: + d.putAddress(item.value.address) + except: + pass self.putValue("<invalid>") self.putType(str(item.value.type)) self.putNumChild(0) @@ -1252,14 +1256,13 @@ class Dumper: self.putItemHelper( Item(item.value.dereference(), item.iname, None, None)) self.childTypes.pop() + self.putValue("@%s" % cleanAddress(value.address)) isHandled = True # Fall back to plain pointer printing. if not isHandled: #warn("GENERIC PLAIN POINTER: %s" % value.type) self.putType(item.value.type) - #self.putValue(str(value)) - self.putValue("") self.putAddress(value.address) self.putNumChild(1) if self.isExpanded(item): @@ -1267,6 +1270,7 @@ class Dumper: self.putItem( Item(item.value.dereference(), item.iname, "*", "*")) self.endChildren() + self.putValue(cleanAddress(value.address)) elif str(type).startswith("<anon"): # Anonymous union. We need a dummy name to distinguish @@ -1289,6 +1293,10 @@ class Dumper: fields = value.type.strip_typedefs().fields() self.putType(item.value.type) + try: + self.putAddress(item.value.address) + except: + pass self.putValue("{...}") if False: diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 7f0462d919..de8aa35052 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -1051,7 +1051,6 @@ static void qDumpInnerValueOrPointer(QDumper &d, if (strippedtype) { if (deref(addr)) { d.putItem("addr", deref(addr)); - d.putItem("saddr", deref(addr)); d.putItem("type", strippedtype, d.currentChildType); qDumpInnerValueHelper(d, strippedtype, deref(addr)); } else { @@ -1668,7 +1667,6 @@ static void qDumpQList(QDumper &d) d.beginHash(); if (innerTypeIsPointer) { void *p = pdata.d->array + i + pdata.d->begin; - d.putItem("saddr", p); if (*(void**)p) { //d.putItem("value","@").put(p); qDumpInnerValue(d, strippedInnerType.data(), deref(p)); diff --git a/src/plugins/debugger/gdb/classicgdbengine.cpp b/src/plugins/debugger/gdb/classicgdbengine.cpp index d0179b6eff..62f2f400f9 100644 --- a/src/plugins/debugger/gdb/classicgdbengine.cpp +++ b/src/plugins/debugger/gdb/classicgdbengine.cpp @@ -756,7 +756,6 @@ void GdbEngine::handleVarListChildrenHelperClassic(const GdbMi &item, setWatchDataType(data, item.findChild("type")); setWatchDataValue(data, item.findChild("value")); setWatchDataAddress(data, item.findChild("addr")); - setWatchDataSAddress(data, item.findChild("saddr")); data.setHasChildren(false); insertData(data); } else if (parent.iname.endsWith('.')) { @@ -780,7 +779,6 @@ void GdbEngine::handleVarListChildrenHelperClassic(const GdbMi &item, setWatchDataType(data, item.findChild("type")); setWatchDataValue(data, item.findChild("value")); setWatchDataAddress(data, item.findChild("addr")); - setWatchDataSAddress(data, item.findChild("saddr")); setWatchDataChildCount(data, item.findChild("numchild")); if (!manager()->watchHandler()->isExpandedIName(data.iname)) data.setChildrenUnneeded(); diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp index 0f7f707f35..c98713de37 100644 --- a/src/plugins/debugger/gdb/gdbengine.cpp +++ b/src/plugins/debugger/gdb/gdbengine.cpp @@ -3184,12 +3184,6 @@ void GdbEngine::setWatchDataAddressHelper(WatchData &data, const QByteArray &add data.exp = "*(" + gdbQuoteTypes(data.type).toLatin1() + "*)" + data.addr; } -void GdbEngine::setWatchDataSAddress(WatchData &data, const GdbMi &mi) -{ - if (mi.isValid()) - data.saddr = mi.data(); -} - void GdbEngine::setAutoDerefPointers(const QVariant &on) { Q_UNUSED(on) @@ -3424,7 +3418,6 @@ void GdbEngine::handleChildren(const WatchData &data0, const GdbMi &item, item.findChild("valueencoded").data().toInt()); setWatchDataAddress(data, item.findChild("addr")); setWatchDataExpression(data, item.findChild("exp")); - setWatchDataSAddress(data, item.findChild("saddr")); setWatchDataValueEnabled(data, item.findChild("valueenabled")); setWatchDataValueEditable(data, item.findChild("valueeditable")); setWatchDataChildCount(data, item.findChild("numchild")); diff --git a/src/plugins/debugger/gdb/gdbengine.h b/src/plugins/debugger/gdb/gdbengine.h index 3d989194eb..0c2de9a7b4 100644 --- a/src/plugins/debugger/gdb/gdbengine.h +++ b/src/plugins/debugger/gdb/gdbengine.h @@ -534,7 +534,6 @@ private: ////////// Convenience Functions ////////// static void setWatchDataExpression(WatchData &data, const GdbMi &mi); static void setWatchDataAddress(WatchData &data, const GdbMi &mi); static void setWatchDataAddressHelper(WatchData &data, const QByteArray &addr); - static void setWatchDataSAddress(WatchData &data, const GdbMi &mi); }; } // namespace Internal diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp index ff7eab54fc..6b92c0de57 100644 --- a/src/plugins/debugger/watchhandler.cpp +++ b/src/plugins/debugger/watchhandler.cpp @@ -134,7 +134,6 @@ bool WatchData::isEqual(const WatchData &other) const && displayedType == other.displayedType && variable == other.variable && addr == other.addr - && saddr == other.saddr && framekey == other.framekey && hasChildren == other.hasChildren && valueEnabled == other.valueEnabled @@ -321,7 +320,6 @@ QString WatchData::toToolTip() const } formatToolTipRow(str, WatchHandler::tr("Value"), val); formatToolTipRow(str, WatchHandler::tr("Object Address"), addr); - formatToolTipRow(str, WatchHandler::tr("Stored Address"), saddr); formatToolTipRow(str, WatchHandler::tr("Internal ID"), iname); formatToolTipRow(str, WatchHandler::tr("Generation"), QString::number(generation)); diff --git a/src/plugins/debugger/watchhandler.h b/src/plugins/debugger/watchhandler.h index d3e4a3df43..2fd672fb43 100644 --- a/src/plugins/debugger/watchhandler.h +++ b/src/plugins/debugger/watchhandler.h @@ -132,7 +132,6 @@ public: QString displayedType;// Displayed type (optional) QByteArray variable; // Name of internal Gdb variable if created QByteArray addr; // Displayed address - QByteArray saddr; // Stored address (pointer in container) QString framekey; // Key for type cache QScriptValue scriptValue; // If needed... bool hasChildren; diff --git a/src/plugins/debugger/watchutils.cpp b/src/plugins/debugger/watchutils.cpp index bcb17050fe..a25568dcec 100644 --- a/src/plugins/debugger/watchutils.cpp +++ b/src/plugins/debugger/watchutils.cpp @@ -1478,7 +1478,6 @@ static void gbdMiToWatchData(const GdbMi &root, if (gdbMiGetByteArrayValue(&b, root, "exp")) w.exp = b; gdbMiGetByteArrayValue(&w.addr, root, "addr"); - gdbMiGetByteArrayValue(&w.saddr, root, "saddr"); gdbMiGetBoolValue(&w.valueEnabled, root, "valueenabled"); gdbMiGetBoolValue(&w.valueEditable, root, "valueeditable"); if (gdbMiGetStringValue(&v, root, "valuetooltip", "valuetooltipencoded")) |