Title: [127965] trunk/Tools
- Revision
- 127965
- Author
- [email protected]
- Date
- 2012-09-08 00:36:18 -0700 (Sat, 08 Sep 2012)
Log Message
webkit.py gdb pretty printer can't print CString
https://bugs.webkit.org/show_bug.cgi?id=96068
Reviewed by Tony Chang.
Update WTFCStringPrinter to follow r126191.
* gdb/webkit.py:
(WTFCStringPrinter.to_string):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (127964 => 127965)
--- trunk/Tools/ChangeLog 2012-09-08 07:31:59 UTC (rev 127964)
+++ trunk/Tools/ChangeLog 2012-09-08 07:36:18 UTC (rev 127965)
@@ -1,3 +1,15 @@
+2012-09-08 Kenichi Ishibashi <[email protected]>
+
+ webkit.py gdb pretty printer can't print CString
+ https://bugs.webkit.org/show_bug.cgi?id=96068
+
+ Reviewed by Tony Chang.
+
+ Update WTFCStringPrinter to follow r126191.
+
+ * gdb/webkit.py:
+ (WTFCStringPrinter.to_string):
+
2012-09-07 Benjamin Poulain <[email protected]>
Rename the ustring() accessor to string()
Modified: trunk/Tools/gdb/webkit.py (127964 => 127965)
--- trunk/Tools/gdb/webkit.py 2012-09-08 07:31:59 UTC (rev 127964)
+++ trunk/Tools/gdb/webkit.py 2012-09-08 07:36:18 UTC (rev 127965)
@@ -115,10 +115,10 @@
class WTFCStringPrinter(StringPrinter):
"Print a WTF::CString"
def to_string(self):
- # The CString holds a buffer, which is a refptr to a WTF::Vector of chars.
- vector = self.val['m_buffer']['m_ptr']['m_vector']
- # The vector has two more layers of buffer members.
- return vector['m_buffer']['m_buffer']
+ # The CString holds a buffer, which is a refptr to a WTF::CStringBuffer.
+ data = ""
+ length = self.val['m_buffer']['m_ptr']['m_length']
+ return ''.join([chr((data + i).dereference()) for i in xrange(length)])
class WTFStringImplPrinter(StringPrinter):
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes