[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

commit-queue at webkit.org commit-queue at webkit.org
Wed Dec 22 14:36:09 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit fa9c08f7ef5a67ae5b5e06798c4a75723af0059f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Oct 13 23:42:55 2010 +0000

    2010-10-13  Yi Shen  <yi.4.shen at nokia.com>
    
            Reviewed by Tony Chang.
    
            [gdb] Add pretty-print supports for UString, Identifier and JSString
            https://bugs.webkit.org/show_bug.cgi?id=47601
    
            * gdb/webkit.py:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69713 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 9b93523..1c20c26 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-13  Yi Shen  <yi.4.shen at nokia.com>
+
+        Reviewed by Tony Chang.
+
+        [gdb] Add pretty-print supports for UString, Identifier and JSString
+        https://bugs.webkit.org/show_bug.cgi?id=47601
+
+        * gdb/webkit.py:
+
 2010-10-13  Adam Barth  <abarth at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/gdb/webkit.py b/WebKitTools/gdb/webkit.py
index 2d3b47a..95c3d9c 100644
--- a/WebKitTools/gdb/webkit.py
+++ b/WebKitTools/gdb/webkit.py
@@ -100,6 +100,36 @@ class WTFStringPrinter(StringPrinter):
                                  self.get_length())
 
 
+class JSCUStringPrinter(StringPrinter):
+    "Print a JSC::UString"
+    def get_length(self):
+        if not self.val['m_impl']['m_ptr']:
+            return 0
+        return self.val['m_impl']['m_ptr']['m_length']
+
+    def to_string(self):
+        if self.get_length() == 0:
+            return ''
+
+        return ustring_to_string(self.val['m_impl']['m_ptr']['m_data'],
+                                 self.get_length())
+
+
+class JSCIdentifierPrinter(StringPrinter):
+    "Print a JSC::Identifier"
+    def to_string(self):
+        return JSCUStringPrinter(self.val['m_string']).to_string()
+
+
+class JSCJSStringPrinter(StringPrinter):
+    "Print a JSC::JSString"
+    def to_string(self):
+        if self.val['m_length'] == 0:
+            return ''
+
+        return JSCUStringPrinter(self.val['m_value']).to_string()
+
+
 class WebCoreQualifiedNamePrinter(StringPrinter):
     "Print a WebCore::QualifiedName"
 
@@ -198,13 +228,15 @@ class WTFVectorPrinter:
     def display_hint(self):
         return 'array'
 
-
 def add_pretty_printers():
     pretty_printers_dict = {
         re.compile("^WTF::Vector<.*>$"): WTFVectorPrinter,
         re.compile("^WTF::AtomicString$"): WTFAtomicStringPrinter,
         re.compile("^WTF::String$"): WTFStringPrinter,
         re.compile("^WebCore::QualifiedName$"): WebCoreQualifiedNamePrinter,
+        re.compile("^JSC::UString$"): JSCUStringPrinter,
+        re.compile("^JSC::Identifier$"): JSCIdentifierPrinter,
+        re.compile("^JSC::JSString$"): JSCJSStringPrinter,
     }
 
     def lookup_function(val):

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list