Debugger: Support C structs in dumpers

The lookup for qdump function was done by "struct Foo" instead of just
"Foo".

Change-Id: I325d00910a0c13c5e67692737033531e18392247
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Orgad Shaneh
2020-09-03 22:36:54 +03:00
committed by Orgad Shaneh
parent 3b415f5ebd
commit 9a7535d9e9

View File

@@ -1187,6 +1187,10 @@ class DumperBase():
nsStrippedType = self.stripNamespaceFromType(typeName)\ nsStrippedType = self.stripNamespaceFromType(typeName)\
.replace('::', '__') .replace('::', '__')
# Strip leading 'struct' for C structs
if nsStrippedType.startswith('struct '):
nsStrippedType = nsStrippedType[7:]
#DumperBase.warn('STRIPPED: %s' % nsStrippedType) #DumperBase.warn('STRIPPED: %s' % nsStrippedType)
# The following block is only needed for D. # The following block is only needed for D.
if nsStrippedType.startswith('_A'): if nsStrippedType.startswith('_A'):