Title: [173550] trunk/Tools
- Revision
- 173550
- Author
- msab...@apple.com
- Date
- 2014-09-11 18:04:05 -0700 (Thu, 11 Sep 2014)
Log Message
lldb_webkit.py:btjs doesn't work with release builds
https://bugs.webkit.org/show_bug.cgi?id=136760
Reviewed by Jer Noble.
If we can't get a result calling JSC::ExecState::describeFrame(), try calling the
mangled name _ZN3JSC9ExecState13describeFrameEv. Also cleaned up the handling if
we can't get a valid result from trying either call. In that case, we fallback to
just showing the PC. Also added check for both entry points. If neither is found,
we issue a warning and output the stack trace without _javascript_ annotations.
* lldb/lldb_webkit.py:
(btjs):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (173549 => 173550)
--- trunk/Tools/ChangeLog 2014-09-12 00:40:09 UTC (rev 173549)
+++ trunk/Tools/ChangeLog 2014-09-12 01:04:05 UTC (rev 173550)
@@ -1,3 +1,19 @@
+2014-09-11 Michael Saboff <msab...@apple.com>
+
+ lldb_webkit.py:btjs doesn't work with release builds
+ https://bugs.webkit.org/show_bug.cgi?id=136760
+
+ Reviewed by Jer Noble.
+
+ If we can't get a result calling JSC::ExecState::describeFrame(), try calling the
+ mangled name _ZN3JSC9ExecState13describeFrameEv. Also cleaned up the handling if
+ we can't get a valid result from trying either call. In that case, we fallback to
+ just showing the PC. Also added check for both entry points. If neither is found,
+ we issue a warning and output the stack trace without _javascript_ annotations.
+
+ * lldb/lldb_webkit.py:
+ (btjs):
+
2014-09-11 Rebecca Hauck <rha...@adobe.com>
webkitpy test failures from import-w3c-tests
Modified: trunk/Tools/lldb/lldb_webkit.py (173549 => 173550)
--- trunk/Tools/lldb/lldb_webkit.py 2014-09-12 00:40:09 UTC (rev 173549)
+++ trunk/Tools/lldb/lldb_webkit.py 2014-09-12 01:04:05 UTC (rev 173550)
@@ -109,6 +109,14 @@
process = target.GetProcess()
thread = process.GetSelectedThread()
+ if target.FindFunctions("JSC::ExecState::describeFrame").GetSize() or target.FindFunctions("_ZN3JSC9ExecState13describeFrameEv").GetSize():
+ annotateJSFrames = True
+ else:
+ annotateJSFrames = False
+
+ if not annotateJSFrames:
+ print "Warning: Can't find JSC::ExecState::describeFrame() in executable to annotate _javascript_ frames"
+
backtraceDepth = thread.GetNumFrames()
if len(command) == 1:
@@ -128,14 +136,17 @@
function = frame.GetFunction()
- if not frame or not frame.GetSymbol() or frame.GetSymbol().GetName() == "llint_entry":
+ if annotateJSFrames and not frame or not frame.GetSymbol() or frame.GetSymbol().GetName() == "llint_entry":
callFrame = frame.GetSP()
- JSFrameDescription = frame.EvaluateExpression("((JSC::CallFrame*)0x%x)->describeFrame()" % frame.GetFP()).GetSummary()
- JSFrameDescription = string.strip(JSFrameDescription, '"')
- frameFormat = ' frame #{num}: {addr:' + addressFormat + '} {desc}'
- print frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)
- else:
- print ' %s' % frame
+ JSFrameDescription = frame.EvaluateExpression("((JSC::ExecState*)0x%x)->describeFrame()" % frame.GetFP()).GetSummary()
+ if not JSFrameDescription:
+ JSFrameDescription = frame.EvaluateExpression("(char*)_ZN3JSC9ExecState13describeFrameEv(0x%x)" % frame.GetFP()).GetSummary()
+ if JSFrameDescription:
+ JSFrameDescription = string.strip(JSFrameDescription, '"')
+ frameFormat = ' frame #{num}: {addr:' + addressFormat + '} {desc}'
+ print frameFormat.format(num=frame.GetFrameID(), addr=frame.GetPC(), desc=JSFrameDescription)
+ continue
+ print ' %s' % frame
# FIXME: Provide support for the following types:
# def WTFVector_SummaryProvider(valobj, dict):
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes