debugger: fix QTCREATORBUG-814

(cherry picked from commit 99adbf1582)
This commit is contained in:
hjk
2010-08-11 11:26:04 +02:00
parent 1c095f88d0
commit b751543bc2

View File

@@ -1811,6 +1811,8 @@ def qdump__std__set(d, item):
def qdump__std__string(d, item):
data = item.value["_M_dataplus"]["_M_p"]
baseType = item.value.type.unqualified().strip_typedefs()
if baseType.code == gdb.TYPE_CODE_REF:
baseType = baseType.target().unqualified().strip_typedefs()
charType = baseType.template_argument(0)
repType = lookupType("%s::_Rep" % baseType).pointer()
rep = (data.cast(repType) - 1).dereference()