Bug 136760 - lldb_webkit.py:btjs doesn't work with release builds
Summary: lldb_webkit.py:btjs doesn't work with release builds
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-11 15:05 PDT by Michael Saboff
Modified: 2014-09-11 18:04 PDT (History)
0 users

See Also:


Attachments
Patch (2.29 KB, patch)
2014-09-11 15:12 PDT, Michael Saboff
jer.noble: review+
Details | Formatted Diff | Diff
Patch with suggested check for entry points (3.29 KB, patch)
2014-09-11 17:07 PDT, Michael Saboff
jer.noble: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2014-09-11 15:05:37 PDT
Due to the lack of debugging information, btjs cannot call into the the WebProcess via JSC::CallFrame::describeFrame().
Comment 1 Michael Saboff 2014-09-11 15:12:00 PDT
Created attachment 237989 [details]
Patch
Comment 2 Jer Noble 2014-09-11 15:48:41 PDT
Comment on attachment 237989 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=237989&action=review

r=me, with nit:

> Tools/lldb/lldb_webkit.py:135
> +                JSFrameDescription = frame.EvaluateExpression("(char*)_ZN3JSC9ExecState13describeFrameEv(0x%x)" % frame.GetFP()).GetSummary()

It may make sense to add an "assert" which looks up that symbol and prints a sensible error message if it can't be found.
Comment 3 Michael Saboff 2014-09-11 16:01:14 PDT
(In reply to comment #2)
> (From update of attachment 237989 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=237989&action=review
> 
> r=me, with nit:
> 
> > Tools/lldb/lldb_webkit.py:135
> > +                JSFrameDescription = frame.EvaluateExpression("(char*)_ZN3JSC9ExecState13describeFrameEv(0x%x)" % frame.GetFP()).GetSummary()
> 
> It may make sense to add an "assert" which looks up that symbol and prints a sensible error message if it can't be found.

I believe that EvaluateExpression() will return None if it has any problem evaluating whatever is in the quotes, including if the symbol can't be found.  If the symbol isn't found or the call for some other reason, it just silently outputs the PC address.

I'll create a check for both the symbols and output a once per btjs message that says JS annotated back traces isn't possible if neither form of the symbol can be found.  I'll post the updated patch shortly.
Comment 4 Michael Saboff 2014-09-11 17:07:18 PDT
Created attachment 238000 [details]
Patch with suggested check for entry points
Comment 5 Michael Saboff 2014-09-11 18:04:24 PDT
Committed r173550: <http://trac.webkit.org/changeset/173550>