Commit e56e6b0c authored by hjk's avatar hjk

Debugger: Handle wchar_t* equally special as char*

Task-number: QTCREATORBUG-16034
Change-Id: Ic1aed8cef2d8eea9ceaf4123b0b0b7da08e6c86b
Reviewed-by: default avatarRobert Loehning <robert.loehning@theqtcompany.com>
Reviewed-by: default avatarhjk <hjk@theqtcompany.com>
parent 276f4c48
......@@ -1043,12 +1043,23 @@ class DumperBase:
# This is shared by pointer and array formatting.
def tryPutSimpleFormattedPointer(self, value, typeName, innerTypeName, displayFormat, limit):
if displayFormat == AutomaticFormat and innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
(elided, data) = self.encodeCArray(value, 1, limit)
self.putValue(data, "latin1", elided=elided)
return True
if displayFormat == AutomaticFormat:
if innerTypeName == "char":
# Use Latin1 as default for char *.
self.putType(typeName)
(elided, data) = self.encodeCArray(value, 1, limit)
self.putValue(data, "latin1", elided=elided)
return True
if innerTypeName == "wchar_t":
self.putType(typeName)
charSize = self.lookupType('wchar_t').sizeof
(elided, data) = self.encodeCArray(value, charSize, limit)
if charSize == 2:
self.putValue(data, "utf16", elided=elided)
else:
self.putValue(data, "ucs4", elided=elided)
return True
if displayFormat == Latin1StringFormat:
self.putType(typeName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment