Commit 8cf70c8c authored by hjk's avatar hjk Committed by hjk
Browse files

debugger: fix display of dynamic type



Change-Id: Ib8844e4b9cbfef52f9717572086d1e3bdda257ce
Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 6cac1111
...@@ -1524,6 +1524,23 @@ class Dumper: ...@@ -1524,6 +1524,23 @@ class Dumper:
warn("WRONG ASSUMPTION HERE: %s " % type.code) warn("WRONG ASSUMPTION HERE: %s " % type.code)
check(False) check(False)
fields = extractFields(type)
#fields = type.fields()
# The dynamic type is a better type.
if len(fields):
field = fields[0]
#warn("FIELD: %s" % field.name)
if field.name.startswith("_vptr."):
p = value[field.name]
if long(p.dereference()) != 0:
func = str(p.dereference())
pos1 = func.find('<')
if pos1 != -1:
pos2 = func.find('::~')
if pos2 != -1:
self.putBetterType(func[pos1 + 1 : pos2])
if self.useFancy and (format is None or format >= 1): if self.useFancy and (format is None or format >= 1):
self.putAddress(value.address) self.putAddress(value.address)
self.putType(typeName) self.putType(typeName)
...@@ -1549,8 +1566,6 @@ class Dumper: ...@@ -1549,8 +1566,6 @@ class Dumper:
#warn("INAME: %s " % self.currentIName) #warn("INAME: %s " % self.currentIName)
#warn("INAMES: %s " % self.expandedINames) #warn("INAMES: %s " % self.expandedINames)
#warn("EXPANDED: %s " % (self.currentIName in self.expandedINames)) #warn("EXPANDED: %s " % (self.currentIName in self.expandedINames))
fields = extractFields(type)
#fields = type.fields()
self.putType(typeName) self.putType(typeName)
self.putAddress(value.address) self.putAddress(value.address)
......
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