forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user