Commit 7347587d authored by hjk's avatar hjk

debugger: take a few string comparisons off the critical path

parent 2f009a30
......@@ -55,7 +55,6 @@ verbosity = 1
# Some "Enums"
# Encodings
Unencoded8Bit, \
Base64Encoded8BitWithQuotes, \
Base64Encoded16BitWithQuotes, \
......@@ -88,7 +87,7 @@ def isGoodGdb():
def hasInferiorThreadList():
return False
try:
a= gdb.inferiors()[0].threads()
a = gdb.inferiors()[0].threads()
return True
except:
return False
......@@ -205,6 +204,7 @@ def templateArgument(type, position):
# That's something like "myns::QList<...>"
return lookupType(extractTemplateArgument(type.strip_typedefs(), position))
# Workaround for gdb < 7.1
def numericTemplateArgument(type, position):
try:
......@@ -214,6 +214,7 @@ def numericTemplateArgument(type, position):
msg = str(error)
return int(msg[14:-1])
def parseAndEvaluate(exp):
if isGoodGdb():
return gdb.parse_and_eval(exp)
......@@ -380,7 +381,7 @@ class Children:
if not self.childType is None:
childType = stripClassTag(str(self.childType))
self.d.put('childtype="%s",' % childType)
if isSimpleType(self.childType) or isStringType(self.d, self.childType):
if isSimpleType(self.childType):
self.d.put('childnumchild="0",')
childNumChild = 0
elif self.childType.code == gdb.TYPE_CODE_PTR:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment