| Index: runtime/vm/signal_handler_linux.cc
|
| ===================================================================
|
| --- runtime/vm/signal_handler_linux.cc (revision 40496)
|
| +++ runtime/vm/signal_handler_linux.cc (working copy)
|
| @@ -20,8 +20,12 @@
|
| pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
|
| #elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
|
| pc = static_cast<uintptr_t>(mcontext.gregs[REG_EIP]);
|
| +#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
|
| + pc = static_cast<uintptr_t>(mcontext.gregs[REG_RIP]);
|
| #elif defined(TARGET_ARCH_ARM)
|
| pc = static_cast<uintptr_t>(mcontext.arm_pc);
|
| +#elif defined(TARGET_ARCH_ARM64)
|
| + pc = static_cast<uintptr_t>(mcontext.pc);
|
| #elif defined(TARGET_ARCH_MIPS)
|
| pc = static_cast<uintptr_t>(mcontext.pc);
|
| #else
|
| @@ -42,8 +46,12 @@
|
| fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
|
| #elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
|
| fp = static_cast<uintptr_t>(mcontext.gregs[REG_EBP]);
|
| +#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
|
| + fp = static_cast<uintptr_t>(mcontext.gregs[REG_RBP]);
|
| #elif defined(TARGET_ARCH_ARM)
|
| fp = static_cast<uintptr_t>(mcontext.arm_fp);
|
| +#elif defined(TARGET_ARCH_ARM64)
|
| + fp = static_cast<uintptr_t>(mcontext.regs[29]);
|
| #elif defined(TARGET_ARCH_MIPS)
|
| fp = static_cast<uintptr_t>(mcontext.gregs[30]);
|
| #else
|
| @@ -54,7 +62,7 @@
|
| }
|
|
|
|
|
| -uintptr_t SignalHandler::GetStackPointer(const mcontext_t& mcontext) {
|
| +uintptr_t SignalHandler::GetCStackPointer(const mcontext_t& mcontext) {
|
| uintptr_t sp = 0;
|
|
|
| #if defined(TARGET_ARCH_IA32)
|
| @@ -65,8 +73,12 @@
|
| sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
|
| #elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR)
|
| sp = static_cast<uintptr_t>(mcontext.gregs[REG_ESP]);
|
| +#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR)
|
| + sp = static_cast<uintptr_t>(mcontext.gregs[REG_RSP]);
|
| #elif defined(TARGET_ARCH_ARM)
|
| sp = static_cast<uintptr_t>(mcontext.arm_sp);
|
| +#elif defined(TARGET_ARCH_ARM64)
|
| + sp = static_cast<uintptr_t>(mcontext.sp);
|
| #elif defined(TARGET_ARCH_MIPS)
|
| sp = static_cast<uintptr_t>(mcontext.gregs[29]);
|
| #else
|
| @@ -76,6 +88,15 @@
|
| }
|
|
|
|
|
| +uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) {
|
| +#if defined(TARGET_ARCH_ARM64) && !defined(USING_SIMULATOR)
|
| + return static_cast<uintptr_t>(mcontext.regs[18]);
|
| +#else
|
| + return GetCStackPointer(mcontext);
|
| +#endif
|
| +}
|
| +
|
| +
|
| void SignalHandler::Install(SignalAction action) {
|
| struct sigaction act;
|
| act.sa_handler = NULL;
|
|
|