forked from qt-creator/qt-creator
Debugger: Improve caching of unnamed structures
Task-number: QTCREATORBUG-9947
Cherry-picked from 16c4c2ae64
Change-Id: I901bb87ecafc4c1260003de51678ab66122aaffa
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -624,6 +624,18 @@ def expensiveDowncast(value):
|
|||||||
|
|
||||||
typeCache = {}
|
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):
|
def lookupType(typestring):
|
||||||
global typeCache
|
global typeCache
|
||||||
global typesToReport
|
global typesToReport
|
||||||
@@ -1260,8 +1272,6 @@ registerCommand("bbedit", bbedit)
|
|||||||
#
|
#
|
||||||
#######################################################################
|
#######################################################################
|
||||||
|
|
||||||
typesToReport = {}
|
|
||||||
|
|
||||||
def bb(args):
|
def bb(args):
|
||||||
global typesToReport
|
global typesToReport
|
||||||
output = Dumper(args).output
|
output = Dumper(args).output
|
||||||
@@ -1853,7 +1863,7 @@ class Dumper:
|
|||||||
type = value.type.unqualified()
|
type = value.type.unqualified()
|
||||||
typeName = str(type)
|
typeName = str(type)
|
||||||
tryDynamic &= self.useDynamicType
|
tryDynamic &= self.useDynamicType
|
||||||
lookupType(typeName) # Fill type cache
|
addToCache(type) # Fill type cache
|
||||||
if tryDynamic:
|
if tryDynamic:
|
||||||
self.putAddress(value.address)
|
self.putAddress(value.address)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user