Bug 174637 - lldb: Add type summary for StringView
Summary: lldb: Add type summary for StringView
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Daniel Bates
Depends on:
Reported: 2017-07-18 12:15 PDT by Daniel Bates
Modified: 2017-07-18 15:54 PDT (History)
4 users (show)

See Also:

Patch (4.50 KB, patch)
2017-07-18 12:19 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 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.
Comment 1 Daniel Bates 2017-07-18 12:19:17 PDT
Created attachment 315813 [details]
Comment 2 Sam Weinig 2017-07-18 14:47:52 PDT
Cool. How does one install these? Do they work in Xcode too?
Comment 3 Daniel Bates 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.
Comment 4 Daniel Bates 2017-07-18 15:54:04 PDT
Comment on attachment 315813 [details]

Clearing flags on attachment: 315813

Committed r219637: <http://trac.webkit.org/changeset/219637>
Comment 5 Daniel Bates 2017-07-18 15:54:05 PDT
All reviewed patches have been landed.  Closing bug.