Bug 136760

Summary: lldb_webkit.py:btjs doesn't work with release builds
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: Tools / TestsAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
jer.noble: review+
Patch with suggested check for entry points jer.noble: review+

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>