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>
This commit is contained in:
Michael Weghorn
2020-06-26 13:04:30 +02:00
parent 1522dc98c1
commit 70c4889ac9

View File

@@ -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)