Ignore:
Timestamp:
Jan 10, 2014, 3:47:12 PM (11 years ago)
Author:
[email protected]
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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp

    r160186 r161686  
    523523
    524524// These are for building an interpreter from generated assembly code:
     525#if CPU(X86_64)
     526#define OFFLINE_ASM_BEGIN   asm ( \
     527    ".cfi_startproc\n"
     528
     529#define OFFLINE_ASM_END     \
     530    ".cfi_endproc\n" \
     531);
     532#else
    525533#define OFFLINE_ASM_BEGIN   asm (
    526534#define OFFLINE_ASM_END     );
     535#endif
    527536
    528537#define OFFLINE_ASM_OPCODE_LABEL(__opcode) OFFLINE_ASM_GLOBAL_LABEL(llint_##__opcode)
     
    537546    ".thumb_func " THUMB_FUNC_PARAM(label) "\n"  \
    538547    SYMBOL_STRING(label) ":\n"
     548#elif CPU(X86_64)
     549#define OFFLINE_ASM_GLOBAL_LABEL(label)         \
     550    ".text\n"                                   \
     551    ".globl " SYMBOL_STRING(label) "\n"         \
     552    HIDE_SYMBOL(label) "\n"                     \
     553    SYMBOL_STRING(label) ":\n"                  \
     554    ".cfi_def_cfa rbp, 0\n"                     \
     555    ".cfi_offset 16, 8\n"                       \
     556    ".cfi_offset 6, 0\n"
    539557#else
    540558#define OFFLINE_ASM_GLOBAL_LABEL(label)         \
Note: See TracChangeset for help on using the changeset viewer.