diff options
author | hjk <qtc-committer@nokia.com> | 2010-08-17 15:52:01 +0200 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2010-08-17 16:28:44 +0200 |
commit | 79115280d5e80f34b613fde42d8b0257e6c20805 (patch) | |
tree | e4a5347016894758d1907087982a8fdb5cfb6ba8 | |
parent | 5e6b03924396f49f156bc2be7dd74ce79f750095 (diff) |
debugger: fix display of arrays of types that gdb forgot about
(cherry picked from commit a1f2638c5fd6603c14065bcc0e0ddbe35463fc9b)
Conflicts:
share/qtcreator/gdbmacros/dumper.py
(cherry picked from commit 7788e95ee9a7355018e579c78b0c36e7f41ae16d)
-rw-r--r-- | share/qtcreator/gdbmacros/dumper.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index bd8bd1b9448..d3cb227f96b 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -116,10 +116,15 @@ def lookupType(typestring): try: #warn("LOOKING UP '%s'" % ts) type = gdb.lookup_type(ts) - except: - # Can throw "RuntimeError: No type named class Foo." - #warn("LOOKING UP '%s' FAILED" % ts) - pass + 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: + # Can throw "RuntimeError: No type named class Foo." + pass #warn(" RESULT: '%s'" % type) #if not type is None: # warn(" FIELDS: '%s'" % type.fields()) @@ -806,7 +811,9 @@ def extractFields(type): #warn("TYPE 0: %s" % type) type = stripTypedefs(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) fields = type.fields() #warn("FIELDS: %s" % fields) |