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