Bug 134276 - Provide javascript aware backtrace script for lldb
Summary: Provide javascript aware backtrace script for lldb
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: 134278
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-24 15:53 PDT by Michael Saboff
Modified: 2014-06-25 10:36 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.32 KB, patch)
2014-06-25 10:27 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-06-24 15:53:39 PDT
lldb provides the ability to augment lldb functionality via python scripts.  This can be used to make backtraces JavaScript aware.  Consider the backtrace while running deltablue.js from jsc:

(lldb) bt
* thread #1: tid = 0x2c103b, 0x000025c288a61720, queue = 'com.apple.main-thread, stop reason = signal SIGSTOP
    frame #0: 0x000025c288a61720
    frame #1: 0x000025c288a57c40
    frame #2: 0x000025c288a6e050
    frame #3: 0x000025c288a5d654
    frame #4: 0x0000000100647550 JavaScriptCore`llint_entry + 25930
    frame #5: 0x0000000100640d94 JavaScriptCore`callToJavaScript + 356
...

A more informative backtrace could be:
(lldb) bt
* thread \#1: tid = 0x2c103b, 0x000025c288a61720, queue = 'com.apple.main-thread, stop reason = signal SIGSTOP
    frame #0: 0x000025c288a61720 chooseMethod#EmCrCd [DFG](Cell[Object ID: 448]: 0x10994ca70, 97)
    frame #1: 0x000025c288a57c40 satisfy#A7Z1GK [FTL](Cell[Object ID: 448]: 0x10994ca70, 97)
    frame #2: 0x000025c288a6e050 chainTest#BRCzIm [DFG](Cell[global ID: 353]: 0x101cdf970, 100)
    frame #3: 0x000025c288a5d654 deltaBlue#DNE2LT [Baseline](Cell[global ID: 353]: 0x101cdf970)
    frame #4: 0x0000000100647550 <global>#AxbsUM [LLInt](Cell[JSProxy ID: 322]: 0x101cffb90)
    frame #5: 0x0000000100640d94 JavaScriptCore`callToJavaScript + 356
...
Comment 1 Michael Saboff 2014-06-25 10:27:16 PDT
Created attachment 233823 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-25 10:28:48 PDT
Attachment 233823 [details] did not pass style-queue:


ERROR: Tools/lldb/lldb_webkit.py:101:  expected 2 blank lines, found 1  [pep8/E302] [5]
ERROR: Tools/lldb/lldb_webkit.py:127:  trailing whitespace  [pep8/W291] [5]
Total errors found: 2 in 2 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Jer Noble 2014-06-25 10:31:31 PDT
Comment on attachment 233823 [details]
Patch

nice! r=me.
Comment 4 Michael Saboff 2014-06-25 10:36:46 PDT
Committed r170432: <http://trac.webkit.org/changeset/170432>