Debugger: Use GetName instead of GetDisplayTypeName

In the newest version of LLDB, they remove anonymous and inline
namespaces from their display name, which breaks all debugger helper
code on Macs with the newest version of Xcode, since Qt Creator logic
determines libc++ vs. libstdc++ by the presence of the "__1" inline
namespace.

Change-Id: I139d0654ffbc9dec2e42b40eaad92ea2e3c067c0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Jeremy Ephron
2020-09-29 20:12:25 -07:00
committed by Jeremy Barenholtz
parent efce9b04fc
commit b9323cccc0

View File

@@ -546,9 +546,9 @@ class Dumper(DumperBase):
return targs
def typeName(self, nativeType):
if hasattr(nativeType, 'GetDisplayTypeName'):
return nativeType.GetDisplayTypeName() # Xcode 6 (lldb-320)
return nativeType.GetName() # Xcode 5 (lldb-310)
# Don't use GetDisplayTypeName since LLDB removed the inline namespace __1
# https://reviews.llvm.org/D74478
return nativeType.GetName()
def nativeTypeId(self, nativeType):
name = self.typeName(nativeType)
@@ -804,7 +804,7 @@ class Dumper(DumperBase):
typeobjlist = self.target.FindTypes(nonPrefixedName)
if typeobjlist.IsValid():
for typeobj in typeobjlist:
n = self.canonicalTypeName(self.removeTypePrefix(typeobj.GetDisplayTypeName()))
n = self.canonicalTypeName(self.removeTypePrefix(typeobj.GetName()))
if n == nonPrefixedName:
#DumperBase.warn('FOUND TYPE USING FindTypes : %s' % typeobj)
self.typeCache[name] = typeobj