From a1f2638c5fd6603c14065bcc0e0ddbe35463fc9b Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 17 Aug 2010 15:32:08 +0200 Subject: [PATCH] debugger: fix display of arrays of types that gdb forgot about --- share/qtcreator/gdbmacros/dumper.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py index 39a80c5f6e8..aa213be7a86 100644 --- a/share/qtcreator/gdbmacros/dumper.py +++ b/share/qtcreator/gdbmacros/dumper.py @@ -117,11 +117,14 @@ def lookupType(typestring): #warn("LOOKING UP '%s'" % ts) type = gdb.lookup_type(ts) except RuntimeError, error: - # Can throw "RuntimeError: No type named class Foo." - # See http://sourceware.org/bugzilla/show_bug.cgi?id=11912 #warn("LOOKING UP '%s': %s" % (ts, error)) + # See http://sourceware.org/bugzilla/show_bug.cgi?id=11912 exp = "(class '%s'*)0" % ts - type = parseAndEvaluate(exp).type.target() + try: + type = parseAndEvaluate(exp).type.target() + except: + # Can throw "RuntimeError: No type named class Foo." + pass except: #warn("LOOKING UP '%s' FAILED" % ts) pass