Add LLDB-Python scripts to support WebKit data types.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2012 19:16:08 +0000 (19:16 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Nov 2012 19:16:08 +0000 (19:16 +0000)
commit34dda6374333f2542845c825e45af2cd56c4c33d
tree5b2e803cadff417be8e093513bd180427addaac1
parent2296dd38cac4d8e4f8b44f5586b2d960a1b83986
Add LLDB-Python scripts to support WebKit data types.
https://bugs.webkit.org/show_bug.cgi?id=100898

Reviewed by Anders Carlsson.

Add Summary providers for common WebKit string types.

* lldb/lldb_webkit.py: Added.
(__lldb_init_module): Register these providers with the debugger.
(WTFString_SummaryProvider): Wrapper around WTFStringProvider.
(WTFStringImpl_SummaryProvider): Wrapper around WTFStringImplProvider.
(WTFAtomicString_SummaryProvider): Ditto.
(guess_string_length): Walk through the string looking for a null-byte(s).
(ustring_to_string): Walk through the string, extracting two-byte values, and concatenate them.
(lstring_to_string): Walk through the string, extracting byte values, and concatenate them.
(WTFStringImplProvider):
(WTFStringImplProvider.__init__):
(WTFStringImplProvider.get_length): Extract the m_length variable.
(WTFStringImplProvider.get_data8): Extract the m_data8 variable.
(WTFStringImplProvider.get_data16): Extract the m_data16 variable.
(WTFStringImplProvider.to_string): Pass the appropriate data variable to {u,l}string_to_string.
(WTFStringImplProvider.is_8bit): Check the m_hashAndFlags variable.
(WTFStringProvider):
(WTFStringProvider.__init__):
(WTFStringProvider.stringimpl): Extract the m_impl variable.
(WTFStringProvider.get_length): Pass through to WTFStringImplProvider.
(WTFStringProvider.to_string): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/lldb/lldb_webkit.py [new file with mode: 0644]