debugger: replace a few 'template_argument(0)' by the templateArgument wrapper

Makes QSharedPointer & Co. work with gdb 7.2
This commit is contained in:
hjk
2010-11-30 17:14:44 +01:00
parent f03138aa53
commit d3290c3231
2 changed files with 20 additions and 14 deletions

View File

@@ -162,6 +162,16 @@ def cleanAddress(addr):
# that might trigger Unicode encoding errors.
return addr.cast(lookupType("void").pointer())
def templateArgument(type, position, outerLen):
try:
# This fails on stock 7.2 with
# "RuntimeError: No type named myns::QObject.\n"
return type.template_argument(position)
except:
# That's something like "myns::QList<...>"
innerString = str(type.strip_typedefs())
return lookupType(innerString[outerLen + 1 : -1])
# Workaround for gdb < 7.1
def numericTemplateArgument(type, position):
try: