Debugger: Display {un}signed char* similar char*

Task-number: QTCREATORBUG-17236
Change-Id: Ibbc58807572c6d1785f20948992f7a2c0dcc87f8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2016-11-10 22:29:27 +01:00
parent a6d16f85c4
commit 8fce605913

View File

@@ -1147,7 +1147,7 @@ class DumperBase:
n = arrayByteSize // innerType.size()
p = value.address()
if displayFormat != RawFormat and p:
if innerType.name in ('char', 'wchar_t'):
if innerType.name in ('char', 'wchar_t', 'unsigned char', 'signed char'):
self.putCharArrayHelper(p, n, innerType, self.currentItemFormat(),
makeExpandable = False)
else:
@@ -1226,7 +1226,7 @@ class DumperBase:
# This is shared by pointer and array formatting.
def tryPutSimpleFormattedPointer(self, ptr, typeName, innerType, displayFormat, limit):
if displayFormat == AutomaticFormat:
if innerType.name == 'char':
if innerType.name in ('char', 'signed char', 'unsigned char'):
# Use UTF-8 as default for char *.
self.putType(typeName)
(elided, shown, data) = self.readToFirstZero(ptr, 1, limit)