Title: [161686] trunk/Source/_javascript_Core
- Revision
- 161686
- Author
- [email protected]
- Date
- 2014-01-10 15:47:12 -0800 (Fri, 10 Jan 2014)
Log Message
REGRESSION(C stack work): stack traces no longer work in CrashTracer, lldb, and other tools
https://bugs.webkit.org/show_bug.cgi?id=126764
Reviewed by Geoffrey Garen.
Updated callToJavaScript and cllToNativeFunction to properly replicate the caller's
return PC and frame pointer in the sentinel frame. For X86-64, added .cfi_
directives to create eh_frame info for all LLInt symbols so that the various
unwinding code understands that we are using a separate JS stack referenced
by BP and at what offsets in that frame the prior PC (register 16) and prior
BP (register 6) can be found. These two changes are sufficient for stack tracing
to work for Mac OSX.
* llint/LowLevelInterpreter.cpp:
* llint/LowLevelInterpreter64.asm:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (161685 => 161686)
--- trunk/Source/_javascript_Core/ChangeLog 2014-01-10 23:36:58 UTC (rev 161685)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-01-10 23:47:12 UTC (rev 161686)
@@ -1,3 +1,21 @@
+2014-01-10 Michael Saboff <[email protected]>
+
+ REGRESSION(C stack work): stack traces no longer work in CrashTracer, lldb, and other tools
+ https://bugs.webkit.org/show_bug.cgi?id=126764
+
+ Reviewed by Geoffrey Garen.
+
+ Updated callToJavaScript and cllToNativeFunction to properly replicate the caller's
+ return PC and frame pointer in the sentinel frame. For X86-64, added .cfi_
+ directives to create eh_frame info for all LLInt symbols so that the various
+ unwinding code understands that we are using a separate JS stack referenced
+ by BP and at what offsets in that frame the prior PC (register 16) and prior
+ BP (register 6) can be found. These two changes are sufficient for stack tracing
+ to work for Mac OSX.
+
+ * llint/LowLevelInterpreter.cpp:
+ * llint/LowLevelInterpreter64.asm:
+
2014-01-10 Tamas Gergely <[email protected]>
[EFL][JSC] Enable udis86 disassembler on efl.
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp (161685 => 161686)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2014-01-10 23:36:58 UTC (rev 161685)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.cpp 2014-01-10 23:47:12 UTC (rev 161686)
@@ -522,8 +522,17 @@
//
// These are for building an interpreter from generated assembly code:
+#if CPU(X86_64)
+#define OFFLINE_ASM_BEGIN asm ( \
+ ".cfi_startproc\n"
+
+#define OFFLINE_ASM_END \
+ ".cfi_endproc\n" \
+);
+#else
#define OFFLINE_ASM_BEGIN asm (
#define OFFLINE_ASM_END );
+#endif
#define OFFLINE_ASM_OPCODE_LABEL(__opcode) OFFLINE_ASM_GLOBAL_LABEL(llint_##__opcode)
#define OFFLINE_ASM_GLUE_LABEL(__opcode) OFFLINE_ASM_GLOBAL_LABEL(__opcode)
@@ -536,6 +545,15 @@
".thumb\n" \
".thumb_func " THUMB_FUNC_PARAM(label) "\n" \
SYMBOL_STRING(label) ":\n"
+#elif CPU(X86_64)
+#define OFFLINE_ASM_GLOBAL_LABEL(label) \
+ ".text\n" \
+ ".globl " SYMBOL_STRING(label) "\n" \
+ HIDE_SYMBOL(label) "\n" \
+ SYMBOL_STRING(label) ":\n" \
+ ".cfi_def_cfa rbp, 0\n" \
+ ".cfi_offset 16, 8\n" \
+ ".cfi_offset 6, 0\n"
#else
#define OFFLINE_ASM_GLOBAL_LABEL(label) \
".text\n" \
Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm (161685 => 161686)
--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-01-10 23:36:58 UTC (rev 161685)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter64.asm 2014-01-10 23:47:12 UTC (rev 161686)
@@ -140,10 +140,6 @@
const temp3 = t6
end
- if X86_64
- loadp [sp], previousPC
- end
- move cfr, previousCFR
functionPrologue(extraStackSpace)
move topOfStack, cfr
@@ -153,6 +149,10 @@
loadp [vmTopCallFrame], temp1
storep temp1, ScopeChain[cfr]
storep 1, CodeBlock[cfr]
+ if X86_64
+ loadp 7*8[sp], previousPC
+ loadp 6*8[sp], previousCFR
+ end
storep previousPC, ReturnPC[cfr]
storep previousCFR, CallerFrame[cfr]
move cfr, temp1
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes