forked from qt-creator/qt-creator
Debugger: Check type cache before creating array/pointer type
Change-Id: I334c8d9a7ae365f28a8b070b0ccef943b5db3c59 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -140,19 +140,20 @@ class Dumper(DumperBase):
|
||||
|
||||
def fromNativeType(self, nativeType):
|
||||
self.check(isinstance(nativeType, cdbext.Type))
|
||||
code = nativeType.code()
|
||||
typeId = self.nativeTypeId(nativeType)
|
||||
if self.typeData.get(typeId, None) is not None:
|
||||
return self.Type(self, typeId)
|
||||
|
||||
if nativeType.name().startswith('void'):
|
||||
nativeType = FakeVoidType(nativeType.name(), self)
|
||||
|
||||
code = nativeType.code()
|
||||
if code == TypeCodePointer:
|
||||
return self.createPointerType(self.lookupType(nativeType.targetName(), nativeType.moduleId()))
|
||||
|
||||
if code == TypeCodeArray:
|
||||
return self.createArrayType(self.lookupType(nativeType.targetName(), nativeType.moduleId()), nativeType.arrayElements())
|
||||
|
||||
typeId = self.nativeTypeId(nativeType)
|
||||
if self.typeData.get(typeId, None) is None:
|
||||
tdata = self.TypeData(self)
|
||||
tdata.name = nativeType.name()
|
||||
tdata.typeId = typeId
|
||||
|
Reference in New Issue
Block a user