forked from qt-creator/qt-creator
Debugger: Improve caching of unnamed structures
Task-number: QTCREATORBUG-9947 Change-Id: I701bb87ecafc4c1260003de51678ab66122aaffa Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user