Commit b5579bba authored by hjk's avatar hjk
Browse files

debugger: make QObject dumper more robust when QtCore has no debug info

parent 0a3805a1
......@@ -1354,18 +1354,13 @@ class Dumper:
.replace("::", "__")
# Is this derived from QObject?
hasMetaObject = False
try:
item.value['staticMetaObject']
hasMetaObject = True
if value.type.code != gdb.TYPE_CODE_PTR:
mo = item.value['staticMetaObject']
hasMetaObject = True
except:
hasMetaObject = False
# Is this derived from QObject?
try:
item.value['staticMetaObject']
hasMetaObject = True
except:
hasMetaObject = False
pass
#warn(" STRIPPED: %s" % nsStrippedType)
#warn(" DUMPERS: %s" % (nsStrippedType in qqDumpers))
......
......@@ -599,8 +599,15 @@ def qdump__QObject(d, item):
# superData = superData.dereference()["d"]["superdata"]
# warn("SUPERDATA: %s" % superData)
privateType = lookupType(d.ns + "QObjectPrivate").pointer()
d_ptr = item.value["d_ptr"]["d"].cast(privateType).dereference()
privateType = lookupType(d.ns + "QObjectPrivate")
if privateType is None:
d.putNumChild(4)
#d.putValue(cleanAddress(item.value.address))
if d.isExpanded(item):
with Children(d):
d.putFields(item)
return
d_ptr = item.value["d_ptr"]["d"].cast(privateType.pointer()).dereference()
#warn("D_PTR: %s " % d_ptr)
objectName = d_ptr["objectName"]
#warn("OBJECTNAME: %s " % objectName)
......
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