forked from qt-creator/qt-creator
debugger: fix display of arrays of types that gdb forgot about
(cherry picked from commit a1f2638c5f
)
Conflicts:
share/qtcreator/gdbmacros/dumper.py
This commit is contained in:
@@ -116,9 +116,14 @@ def lookupType(typestring):
|
|||||||
try:
|
try:
|
||||||
#warn("LOOKING UP '%s'" % ts)
|
#warn("LOOKING UP '%s'" % ts)
|
||||||
type = gdb.lookup_type(ts)
|
type = gdb.lookup_type(ts)
|
||||||
|
except RuntimeError, error:
|
||||||
|
#warn("LOOKING UP '%s': %s" % (ts, error))
|
||||||
|
# See http://sourceware.org/bugzilla/show_bug.cgi?id=11912
|
||||||
|
exp = "(class '%s'*)0" % ts
|
||||||
|
try:
|
||||||
|
type = parseAndEvaluate(exp).type.target()
|
||||||
except:
|
except:
|
||||||
# Can throw "RuntimeError: No type named class Foo."
|
# Can throw "RuntimeError: No type named class Foo."
|
||||||
#warn("LOOKING UP '%s' FAILED" % ts)
|
|
||||||
pass
|
pass
|
||||||
#warn(" RESULT: '%s'" % type)
|
#warn(" RESULT: '%s'" % type)
|
||||||
#if not type is None:
|
#if not type is None:
|
||||||
@@ -805,7 +810,9 @@ def extractFields(type):
|
|||||||
#warn("TYPE 0: %s" % type)
|
#warn("TYPE 0: %s" % type)
|
||||||
type = stripTypedefs(type)
|
type = stripTypedefs(type)
|
||||||
#warn("TYPE 1: %s" % type)
|
#warn("TYPE 1: %s" % type)
|
||||||
type = lookupType(str(type))
|
type0 = lookupType(str(type))
|
||||||
|
if not type0 is None:
|
||||||
|
type = type0
|
||||||
#warn("TYPE 2: %s" % type)
|
#warn("TYPE 2: %s" % type)
|
||||||
fields = type.fields()
|
fields = type.fields()
|
||||||
#warn("FIELDS: %s" % fields)
|
#warn("FIELDS: %s" % fields)
|
||||||
|
Reference in New Issue
Block a user