Commit 3a2c3483 authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: display vtables

Change-Id: I5e3f6b4d92712f0ff9957bb902fd2d999b1c8249
Reviewed-on: http://codereview.qt.nokia.com/3401

Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 54129b9c
......@@ -1033,6 +1033,7 @@ class Dumper:
qqQObjectCache[name] = True
return True
fields = type.strip_typedefs().fields()
#fields = extractFields(type)
if len(fields) == 0:
qqQObjectCache[name] = False
return False
......@@ -1438,7 +1439,6 @@ class Dumper:
with SubItem(self, "*"):
self.put('name="*",')
self.putItem(value.dereference())
self.putAddress(value)
self.putPointerValue(value.address)
return
......@@ -1453,7 +1453,7 @@ class Dumper:
return
if type.code != StructCode:
warning("WRONG ASSUMPTION HERE: %s " % type.code)
warn("WRONG ASSUMPTION HERE: %s " % type.code)
check(False)
# Is this derived from QObject?
......@@ -1548,6 +1548,21 @@ class Dumper:
# Ignore vtable pointers for virtual inheritance.
if field.name.startswith("_vptr."):
with SubItem(self, "[vptr]"):
# int (**)(void)
n = 20
self.putType(" ")
self.putValue(value[field.name])
self.putNumChild(n)
if self.isExpanded():
with Children(self):
p = value[field.name]
for i in xrange(n):
if long(p.dereference()) != 0:
with SubItem(self, i):
self.putItem(p.dereference())
self.putType(" ")
p = p + 1
continue
#warn("FIELD NAME: %s" % field.name)
......
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