Commit 83b14ec3 authored by hjk's avatar hjk Committed by hjk

Debugger: Fix std::map dumper for XCode 8

Change-Id: I7536d65355d69f4b8c31bc5adeb582d9b4eb1b33
Reviewed-by: default avatarhjk <hjk@qt.io>
parent da00b020
......@@ -2690,7 +2690,8 @@ class DumperBase:
return self.extractField(field)
def extractField(self, field):
self.dumper.check(self.type.code != TypeCodeTypedef)
if self.type.code == TypeCodeTypedef:
return self.cast(self.type.stripTypedefs()).extractField(field)
if not isinstance(field, self.dumper.Field):
error("BAD INDEX TYPE %s" % type(field))
......
......@@ -245,6 +245,7 @@ class Dumper(DumperBase):
#warn("BASE NAMES: %s" % baseNames)
#warn("VIRTUAL NAMES: %s" % virtualNames)
#warn("FIELD BITS: %s" % fieldBits)
fieldParentType = self.fromNativeType(nativeType).stripTypedefs()
# This does not list empty base entries.
for i in xrange(dummyValue.GetNumChildren()):
......@@ -262,7 +263,7 @@ class Dumper(DumperBase):
child.name = fieldName
field = self.Field(self)
field.value = child
field.parentType = self.fromNativeType(nativeType)
field.parentType = fieldParentType
field.ltype = self.fromNativeType(fieldType)
field.nativeIndex = i
field.name = fieldName
......@@ -295,7 +296,7 @@ class Dumper(DumperBase):
field.value = child
field.isBaseClass = True
field.baseIndex = baseNames[fieldName]
field.parentType = self.fromNativeType(nativeType)
field.parentType = fieldParentType
field.ltype = self.fromNativeType(fieldType)
field.name = fieldName
field.lbitsize = 0
......
......@@ -486,6 +486,17 @@ def qform__std____1__multimap():
def qdump__std____1__multimap(d, value):
qdump__std____1__map(d, value)
def qdump__std____1__map__iterator(d, value):
d.putEmptyValue()
if d.isExpanded():
with Children(d):
node = value['__i_']['__ptr_'].dereference()['__value_']['__cc']
d.putSubItem('first', node['first'])
d.putSubItem('second', node['second'])
def qdump__std____1__map__const_iterator(d, value):
qdump__std____1__map__iterator(d, value)
def qdump__std__stack(d, value):
d.putItem(value["c"])
d.putBetterType(value.type)
......
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