Bug 174637

Summary: lldb: Add type summary for StringView
Product: WebKit Reporter: Daniel Bates <dbates>
Component: Tools / TestsAssignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: jer.noble, jfbastien, lforschler, sam
Priority: P2    
Version: WebKit Local Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Daniel Bates
Reported 2017-07-18 12:15:23 PDT
We should add a type summary for StringView objects to print the length and contents of the StringView similar to what we do for other string types. Currently you can get the effect of pretty printing a StringView by converting it to String using StringView.toString() and then printing the string in lldb. It would be more convenient to support pretty printing a StringView directly.
Attachments
Patch (4.50 KB, patch)
2017-07-18 12:19 PDT, Daniel Bates
no flags
Daniel Bates
Comment 1 2017-07-18 12:19:17 PDT
Sam Weinig
Comment 2 2017-07-18 14:47:52 PDT
Cool. How does one install these? Do they work in Xcode too?
Daniel Bates
Comment 3 2017-07-18 15:52:35 PDT
(In reply to Sam Weinig from comment #2) > Cool. How does one install these? Installation instructions are at the top of the file: <https://trac.webkit.org/browser/trunk/Tools/lldb/lldb_webkit.py?rev=216701#L24>. If you don't want to always have these type summaries enabled and just want to try them out in a single lldb/Xcode debug session just execute: command script import {Path to WebKit Root}/Tools/lldb/lldb_webkit.py in your lldb/Xcode lldb session. > Do they work in Xcode too? Yes, it works in an Xcode lldb session.
Daniel Bates
Comment 4 2017-07-18 15:54:04 PDT
Comment on attachment 315813 [details] Patch Clearing flags on attachment: 315813 Committed r219637: <http://trac.webkit.org/changeset/219637>
Daniel Bates
Comment 5 2017-07-18 15:54:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.