aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2020-06-26 13:04:30 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2020-06-26 14:14:23 +0000
commit70c4889ac9a0d75c93809dd5bb321fcb2272a202 (patch)
treeb065eec2c2ef8bd38b95bc0bbd1357b95551eeac /share
parent1522dc98c136b3db94c594486135ba76ec46b208 (diff)
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 <hjk@qt.io>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/dumper.py3
1 files changed, 3 insertions, 0 deletions
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)