Title: [246222] trunk/Tools
Revision
246222
Author
[email protected]
Date
2019-06-07 15:52:34 -0700 (Fri, 07 Jun 2019)

Log Message

[lldb-webkit] Pretty-print all kinds of Documents
https://bugs.webkit.org/show_bug.cgi?id=198620

Reviewed by Simon Fraser.

Register formatters for all classes derived from WebCore::Document so we get nice summaries
without having to drill down in Xcode- or casting- to the base class, Document.

Older LLDB versions use to do this automatically, but this functionality was removed in newer
versions:
    [[
        Warning: previous versions of LLDB defined cascading to mean not only going through typedef
        chains, but also through inheritance chains. This feature has been removed since it
        significantly degrades performance. You need to set up your formatters for every type in
        inheritance chains to which you want the formatter to apply.
    ]]
    <https://lldb.llvm.org/use/variable.html> (as of 06/06/2019)

* lldb/lldb_webkit.py:
(__lldb_init_module):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (246221 => 246222)


--- trunk/Tools/ChangeLog	2019-06-07 22:50:10 UTC (rev 246221)
+++ trunk/Tools/ChangeLog	2019-06-07 22:52:34 UTC (rev 246222)
@@ -1,3 +1,26 @@
+2019-06-07  Daniel Bates  <[email protected]>
+
+        [lldb-webkit] Pretty-print all kinds of Documents
+        https://bugs.webkit.org/show_bug.cgi?id=198620
+
+        Reviewed by Simon Fraser.
+
+        Register formatters for all classes derived from WebCore::Document so we get nice summaries
+        without having to drill down in Xcode- or casting- to the base class, Document.
+
+        Older LLDB versions use to do this automatically, but this functionality was removed in newer
+        versions:
+            [[
+                Warning: previous versions of LLDB defined cascading to mean not only going through typedef
+                chains, but also through inheritance chains. This feature has been removed since it
+                significantly degrades performance. You need to set up your formatters for every type in
+                inheritance chains to which you want the formatter to apply.
+            ]]
+            <https://lldb.llvm.org/use/variable.html> (as of 06/06/2019)
+
+        * lldb/lldb_webkit.py:
+        (__lldb_init_module):
+
 2019-06-07  Jonathan Bedard  <[email protected]>
 
         webkitpy: Support reporting results for uncommon test configurations

Modified: trunk/Tools/lldb/lldb_webkit.py (246221 => 246222)


--- trunk/Tools/lldb/lldb_webkit.py	2019-06-07 22:50:10 UTC (rev 246221)
+++ trunk/Tools/lldb/lldb_webkit.py	2019-06-07 22:52:34 UTC (rev 246222)
@@ -85,8 +85,10 @@
 
     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreSecurityOrigin_SummaryProvider WebCore::SecurityOrigin')
     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreFrame_SummaryProvider WebCore::Frame')
-    debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreDocument_SummaryProvider WebCore::Document')
 
+    for className in ['Document', 'FTPDirectoryDocument', 'HTMLDocument', 'ImageDocument', 'MediaDocument', 'PluginDocument', 'SVGDocument', 'SinkDocument', 'TextDocument', 'XMLDocument']:
+        debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreDocument_SummaryProvider WebCore::' + className)
+
     # synthetic types (see <https://lldb.llvm.org/varformats.html>)
     debugger.HandleCommand('type synthetic add -x "^WTF::Vector<.+>$" --python-class lldb_webkit.WTFVectorProvider')
     debugger.HandleCommand('type synthetic add -x "^WTF::HashTable<.+>$" --python-class lldb_webkit.WTFHashTableProvider')
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to