From 70c4889ac9a0d75c93809dd5bb321fcb2272a202 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Fri, 26 Jun 2020 13:04:30 +0200 Subject: Debugger: Show text representation for 'char *' typedefs etc 'tryPutSimpleFormattedPointer' takes care of nicely showing the actual string representation of character arrays if the innerType is one of 'char', 'signed char', unsigned char', 'CHAR'. To make this work for typedefs of those types as well, first resolve the typedef before passing the value to 'tryPutSimpleFormattedPointer' from 'putFormattedPointerX'. This e.g. improves the display of variables of type 'const gchar *'. Fixes: QTCREATORBUG-24264 Change-Id: I477b6d7552f9c30c12d819aa5f37e64e4f444969 Reviewed-by: hjk --- share/qtcreator/debugger/dumper.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'share') diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index f8db816729..5e211885ce 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -1336,7 +1336,10 @@ class DumperBase(): return displayFormat = self.currentItemFormat(value.type.name) + innerType = value.type.target() # .unqualified() + if innerType.code == TypeCode.Typedef: + innerType = innerType.ltarget if innerType.name == 'void': #DumperBase.warn('VOID POINTER: %s' % displayFormat) -- cgit v1.2.3