<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div style="margin: 0px;"><font style="font-size: 12px;">A new python scripted javascript backtrace command and supporting C++ code now exists starting with change set r170432. This is only for lldb and may be replaced in the future when a JIT interface is made available for lldb. The new command is btjs and it can take an optional frame count, just like the bt command. </font><span style="font-size: 12px;">To use the new JavaScript enabled backtrace, import Tools/lldb/lldb_webkit.py with the command:</span></div><div style="margin: 0px;"><font style="font-size: 12px;" face="Menlo">(lldb) command script import ../OpenSource/Tools/lldb/lldb_webkit.py</font></div><div style="margin: 0px;"><span style="font-size: 12px;">You can make bt an alias to btjs with the lldb command:</span></div><div style="margin: 0px;"><span style="font-family: Menlo; font-size: 12px;">(lldb) command alias bt btjs</span></div><div style="margin: 0px;"><span style="font-size: 12px;">These commands can be added to your ~/.lldbinit file so they are available for every lldb session.</span></div><div style="margin: 0px;"><span style="font-size: 12px;"><br></span></div><div style="margin: 0px;"><span style="font-size: 12px;">Here is a comparison of the builtin “bt” with the scripted “btjs”:</span></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">(lldb) bt</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">* thread #1: tid = 0x18b67e, 0x00000001004df3b4 JavaScriptCore`JSC::genericUnwind(vm=0x0000000102800000, callFrame=0x00007fff5fbfdf00, exceptionValue=JSValue at 0x00007fff5fbfde68) + 20 at JITExceptions.cpp:45, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #0: 0x00000001004df3b4 JavaScriptCore`JSC::genericUnwind(vm=0x0000000102800000, callFrame=0x00007fff5fbfdf00, exceptionValue=JSValue at 0x00007fff5fbfde68) + 20 at JITExceptions.cpp:45</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #1: 0x000000010063c35a JavaScriptCore`llint_slow_path_handle_exception(exec=0x00007fff5fbfdf00, pc=0x0000000101e00100) + 170 at LLIntSlowPaths.cpp:1390</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #2: 0x0000000100645d77 JavaScriptCore`llint_entry + 18661</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #3: 0x00002cbc7c804595</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #4: 0x0000000100647a4f JavaScriptCore`llint_entry + 26045</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #5: 0x000000010064122a JavaScriptCore`callToJavaScript + 346</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">(lldb) btjs</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">* thread #1: tid = 0x18b67e, 0x00000001004df3b4, queue = 'com.apple.main-thread, stop reason = breakpoint 1.1</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #0: 0x00000001004df3b4 JavaScriptCore`JSC::genericUnwind(vm=0x0000000102800000, callFrame=0x00007fff5fbfdf00, exceptionValue=JSValue at 0x00007fff5fbfde68) + 20 at JITExceptions.cpp:45</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #1: 0x000000010063c35a JavaScriptCore`llint_slow_path_handle_exception(exec=0x00007fff5fbfdf00, pc=0x0000000101e00100) + 170 at LLIntSlowPaths.cpp:1390</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #2: 0x0000000100645d77 #BXj6qv [LLInt](Undefined)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #3: 0x00002cbc7c804595 bar#DHjEHv [DFG](Cell[global ID: 359]: 0x1030df970, Cell[Function ID: 36]: 0x1033b94b0)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #4: 0x0000000100647a4f <global>#BMvYzp [LLInt](Cell[JSProxy ID: 322]: 0x1030ffb90)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"> frame #5: 0x000000010064122a JavaScriptCore`callToJavaScript + 346</div><div><br></div><div>- Michael</div></body></html>