Commit 15b0082b authored by hjk's avatar hjk
Browse files

debugger: fix QObject property dumper for namespaced qt

parent faba06b5
......@@ -669,11 +669,12 @@ def qdump__QObject(d, item):
d.putNumChild(propertyCount)
if d.isExpandedIName(item.iname + ".properties"):
with Children(d, [propertyCount, 500]):
# FIXME: Make this global. Don't leak.
gdb.execute("set $d = (QVariant*)malloc(sizeof(QVariant))")
gdb.execute("set $d.d.is_shared = 0")
# FIXME: Make this global. Don't leak.
variant = "'%sQVariant'" % d.ns
gdb.execute("set $d = (%s*)malloc(sizeof(%s))" % (variant, variant))
gdb.execute("set $d.d.is_shared = 0")
with Children(d, [propertyCount, 500]):
# Dynamic properties.
if dynamicPropertyCount != 0:
dummyType = lookupType("void").pointer().pointer()
......@@ -692,8 +693,8 @@ def qdump__QObject(d, item):
qq = q.cast(valuesType.pointer().pointer())
qq = qq.dereference();
d.putField("addr", cleanAddress(qq))
d.putField("exp", "*('%sQVariant'*)%s"
% (d.ns, cleanAddress(qq)))
d.putField("exp", "*(%s*)%s"
% (variant, cleanAddress(qq)))
name = "%s.properties.%d" % (item.iname, i)
t = qdump__QVariant(d, Item(qq, name))
# Override the "QVariant (foo)" output
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment