forked from qt-creator/qt-creator
debugger: polish address display. also remove the mostly unused 'stored' address
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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"));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user