diff options
author | hjk <hjk121@nokiamail.com> | 2014-06-25 16:25:34 +0200 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2014-06-26 14:31:47 +0200 |
commit | a253feee77b3808c7f0869f4683d30eee3684bce (patch) | |
tree | adbe75036df84ce4f0b6adcdc1c0ed08fccd6596 /share | |
parent | 06112d13aaf5a50fd0484a4595d74ee0fe1d70cb (diff) | |
download | qt-creator-a253feee77b3808c7f0869f4683d30eee3684bce.tar.gz |
Debugger: Fix display of wchar_t[]
Task-number: QTCREATORBUG-12492
Change-Id: I5668c0727a36a1529d28b36d0361922f7acb3083
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/debugger/dumper.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index f743e97049..9b9c4308b9 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -753,13 +753,19 @@ class DumperBase: self.putType(type) self.putNumChild(1) format = self.currentItemFormat() - isDefault = format == None and str(innerType.unqualified()) == "char" - if isDefault or format == 0 or format == 1 or format == 2: + isDefault1 = format == None and str(innerType.unqualified()) == "char" + isDefault2 = format == None and str(innerType.unqualified()) == "wchar_t" + if isDefault1 or isDefault2 or format == 0 or format == 1 or format == 2: blob = self.readMemory(self.addressOf(value), type.sizeof) - if isDefault: + if isDefault1: # Use Latin1 as default for char []. self.putValue(blob, Hex2EncodedLatin1) + elif isDefault2: + if type.sizeof == 2: + self.putValue(blob, Hex4EncodedLittleEndian) + else: + self.putValue(blob, Hex8EncodedLittleEndian) elif format == 0: # Explicitly requested Latin1 formatting. self.putValue(blob, Hex2EncodedLatin1) |