Commit 49296ae1 authored by hjk's avatar hjk

debugger: fix merge errors

parent 46a1c260
......@@ -866,6 +866,7 @@ class Item:
qqFormats = {}
qqDumpers = {}
qqNs = ""
qqQObjectCache = {}
class SetupCommand(gdb.Command):
......@@ -1134,6 +1135,24 @@ class Dumper:
#print('data=[' + locals + sep + watchers + '],bkpts=[' + breakpoints + ']\n')
def checkForQObjectBase(self, type):
if type.code != gdb.TYPE_CODE_STRUCT:
return False
name = str(type)
if name in qqQObjectCache:
return qqQObjectCache[name]
if name == self.ns + "QObject":
qqQObjectCache[name] = True
return True
fields = type.strip_typedefs().fields()
if len(fields) == 0:
qqQObjectCache[name] = False
return False
base = fields[0].type.strip_typedefs()
result = self.checkForQObjectBase(base)
qqQObjectCache[name] = result
return result
def handleWatch(self, exp, iname):
exp = str(exp)
......
......@@ -704,8 +704,6 @@ def qdump__QObject(d, item):
# Static properties.
propertyData = metaData[7]
for i in xrange(staticPropertyCount):
for property in xrange(propertyCount):
with SubItem(d):
offset = propertyData + 3 * i
propertyName = extractCString(metaStringData, metaData[offset])
......
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