Debugger: Make dynamic type lookup more robust

... in builds without debug information.

Change-Id: I3842736aebe5b7c6b46d0ea1eec540dc3c088920
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2016-11-10 21:28:23 +01:00
parent 77ba40603a
commit 75be7de6f4

View File

@@ -1068,6 +1068,8 @@ class Dumper(DumperBase):
def nativeDynamicTypeName(self, address, baseType):
# Needed for Gdb13393 test.
nativeType = self.lookupNativeType(baseType.name)
if nativeType is None:
return None
nativeTypePointer = nativeType.pointer()
nativeValue = gdb.Value(address).cast(nativeTypePointer).dereference()
val = nativeValue.cast(nativeValue.dynamic_type)
@@ -1088,6 +1090,8 @@ class Dumper(DumperBase):
def nativeDynamicType(self, address, baseType):
# Needed for Gdb13393 test.
nativeType = self.lookupNativeType(baseType.name)
if nativeType is None:
return baseType
nativeTypePointer = nativeType.pointer()
nativeValue = gdb.Value(address).cast(nativeTypePointer).dereference()
return self.fromNativeType(nativeValue.dynamic_type)