⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246222 in webkit


Ignore:
Timestamp:
Jun 7, 2019, 3:52:34 PM (7 years ago)
Author:
dbates@webkit.org
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):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r246221 r246222  
     12019-06-07  Daniel Bates  <dabates@apple.com>
     2
     3        [lldb-webkit] Pretty-print all kinds of Documents
     4        https://bugs.webkit.org/show_bug.cgi?id=198620
     5
     6        Reviewed by Simon Fraser.
     7
     8        Register formatters for all classes derived from WebCore::Document so we get nice summaries
     9        without having to drill down in Xcode- or casting- to the base class, Document.
     10
     11        Older LLDB versions use to do this automatically, but this functionality was removed in newer
     12        versions:
     13            [[
     14                Warning: previous versions of LLDB defined cascading to mean not only going through typedef
     15                chains, but also through inheritance chains. This feature has been removed since it
     16                significantly degrades performance. You need to set up your formatters for every type in
     17                inheritance chains to which you want the formatter to apply.
     18            ]]
     19            <https://lldb.llvm.org/use/variable.html> (as of 06/06/2019)
     20
     21        * lldb/lldb_webkit.py:
     22        (__lldb_init_module):
     23
    1242019-06-07  Jonathan Bedard  <jbedard@apple.com>
    225
  • trunk/Tools/lldb/lldb_webkit.py

    r246164 r246222  
    8686    debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreSecurityOrigin_SummaryProvider WebCore::SecurityOrigin')
    8787    debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreFrame_SummaryProvider WebCore::Frame')
    88     debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreDocument_SummaryProvider WebCore::Document')
     88
     89    for className in ['Document', 'FTPDirectoryDocument', 'HTMLDocument', 'ImageDocument', 'MediaDocument', 'PluginDocument', 'SVGDocument', 'SinkDocument', 'TextDocument', 'XMLDocument']:
     90        debugger.HandleCommand('type summary add -F lldb_webkit.WebCoreDocument_SummaryProvider WebCore::' + className)
    8991
    9092    # synthetic types (see <https://lldb.llvm.org/varformats.html>)
Note: See TracChangeset for help on using the changeset viewer.