Index: runtime/vm/signal_handler_android.cc |
=================================================================== |
--- runtime/vm/signal_handler_android.cc (revision 40496) |
+++ runtime/vm/signal_handler_android.cc (working copy) |
@@ -38,7 +38,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_ARM) |
@@ -52,6 +52,20 @@ |
} |
+uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) { |
+ uintptr_t sp = 0; |
+ |
+#if defined(TARGET_ARCH_ARM) |
+ sp = static_cast<uintptr_t>(mcontext.arm_sp); |
+#elif defined(TARGET_ARCH_ARM64) |
+ sp = static_cast<uintptr_t>(mcontext.regs[18]); |
+#else |
+ UNIMPLEMENTED(); |
+#endif // TARGET_ARCH_... |
+ return sp; |
+} |
+ |
+ |
void SignalHandler::Install(SignalAction action) { |
struct sigaction act; |
memset(&act, 0, sizeof(act)); |