forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user