Debugger: avoid recursive pointer type lookup

the std::nullptr_t gets reported as a pointer type with std::nullptr_t
as the target type. In order to avoid a recursive lookup check whether
the target type name is identical to the pointer type name.

Fixes: QTCREATORBUG-29291
Change-Id: I25373bf56b5538b9e5c14c34b9a5e501b5803fea
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2023-06-19 14:54:30 +02:00
parent 1193473f46
commit c7b8ed520d

View File

@@ -147,11 +147,12 @@ class Dumper(DumperBase):
code = nativeType.code()
if code == TypeCode.Pointer:
if not nativeType.name().startswith('<function>'):
if nativeType.name().startswith('<function>'):
code = TypeCode.Function
elif nativeType.targetName() != nativeType.name():
targetType = self.lookupType(nativeType.targetName(), nativeType.moduleId())
if targetType is not None:
if targetType is not None and targetType is not nativeType:
return self.createPointerType(targetType)
code = TypeCode.Function
if code == TypeCode.Array:
# cdb reports virtual function tables as arrays those ar handled separetly by