From 9a7535d9e9aba9aa1a8a2a87db8d8c5054903b22 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Thu, 3 Sep 2020 22:36:54 +0300 Subject: [PATCH] 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 --- share/qtcreator/debugger/dumper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 42dd8e9ba8a..3cca1f1f560 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1187,6 +1187,10 @@ class DumperBase(): nsStrippedType = self.stripNamespaceFromType(typeName)\ .replace('::', '__') + # Strip leading 'struct' for C structs + if nsStrippedType.startswith('struct '): + nsStrippedType = nsStrippedType[7:] + #DumperBase.warn('STRIPPED: %s' % nsStrippedType) # The following block is only needed for D. if nsStrippedType.startswith('_A'):