Commit 16c4c2ae authored by hjk's avatar hjk
Browse files

Debugger: Improve caching of unnamed structures



Task-number: QTCREATORBUG-9947
Change-Id: I701bb87ecafc4c1260003de51678ab66122aaffa
Reviewed-by: default avatarMitch Curtis <mitch.curtis@digia.com>
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 742c1a71
......@@ -624,6 +624,18 @@ def expensiveDowncast(value):
typeCache = {}
typesToReport = {}
typesReported = {}
def addToCache(type):
global typesReported
global typesToReport
typename = str(type)
if typename in typesReported:
return
typesReported[typename] = True
typesToReport[typename] = type
def lookupType(typestring):
global typeCache
global typesToReport
......@@ -1260,8 +1272,6 @@ registerCommand("bbedit", bbedit)
#
#######################################################################
typesToReport = {}
def bb(args):
global typesToReport
output = Dumper(args).output
......@@ -1853,7 +1863,7 @@ class Dumper:
type = value.type.unqualified()
typeName = str(type)
tryDynamic &= self.useDynamicType
lookupType(typeName) # Fill type cache
addToCache(type) # Fill type cache
if tryDynamic:
self.putAddress(value.address)
......
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