summaryrefslogtreecommitdiff
path: root/share/qtcreator/debugger/misctypes.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2016-06-28 16:47:33 +0200
committerAlexandru Croitor <alexandru.croitor@theqtcompany.com>2016-07-06 07:49:06 +0000
commitbe72a944729145b20266c9dad3756fab13d67455 (patch)
tree4f4ff222484cf5bb17abc090a8928f773b24ce7d /share/qtcreator/debugger/misctypes.py
parent9205ea08b837c8d9f0776ad458321daa4de4febd (diff)
downloadqt-creator-be72a944729145b20266c9dad3756fab13d67455.tar.gz
Debugger: Show formatted contents of WebKit strings in local view
Change-Id: I616c19be20bf32789ab052fdec2b228e145e6be2 Reviewed-by: hjk <hjk@theqtcompany.com>
Diffstat (limited to 'share/qtcreator/debugger/misctypes.py')
-rw-r--r--share/qtcreator/debugger/misctypes.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/share/qtcreator/debugger/misctypes.py b/share/qtcreator/debugger/misctypes.py
index 0b8c877d09..49bb5d46b8 100644
--- a/share/qtcreator/debugger/misctypes.py
+++ b/share/qtcreator/debugger/misctypes.py
@@ -346,3 +346,28 @@ def qdump__KDSoapValue(d, value):
p = (value.cast(lookupType("char*")) + 4).dereference().cast(lookupType("QString"))
d.putStringValue(p)
d.putPlainChildren(value["d"]["d"].dereference())
+
+#######################################################################
+#
+# Webkit
+#
+#######################################################################
+
+def qdump__WTF__String(d, value):
+ # WTF::String -> WTF::RefPtr<WTF::StringImpl> -> WTF::StringImpl*
+ data = value['m_impl']['m_ptr']
+ d.checkPointer(data)
+
+ stringLength = int(data['m_length'])
+ d.check(0 <= stringLength and stringLength <= 100000000)
+
+ # WTF::StringImpl* -> WTF::StringImpl -> sizeof(WTF::StringImpl)
+ offsetToData = data.type.target().sizeof
+ bufferPtr = data.cast(d.charPtrType()) + offsetToData
+
+ is8Bit = data['m_is8Bit']
+ charSize = 1
+ if not is8Bit:
+ charSize = 2
+
+ d.putCharArrayHelper(bufferPtr, stringLength, charSize)