Index: runtime/vm/signal_handler_linux.cc |
diff --git a/runtime/vm/signal_handler_linux.cc b/runtime/vm/signal_handler_linux.cc |
index 980733e2cd5279da200b2089772be9fceea36876..957edda62bc2b5b46b0d0d7e4651f6898a51b554 100644 |
--- a/runtime/vm/signal_handler_linux.cc |
+++ b/runtime/vm/signal_handler_linux.cc |
@@ -97,6 +97,32 @@ uintptr_t SignalHandler::GetDartStackPointer(const mcontext_t& mcontext) { |
} |
+uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) { |
+ uintptr_t lr = 0; |
+ |
+#if defined(TARGET_ARCH_IA32) |
+ lr = 0; |
+#elif defined(TARGET_ARCH_X64) |
+ lr = 0; |
+#elif defined(TARGET_ARCH_MIPS) && defined(USING_SIMULATOR) |
+ lr = 0; |
+#elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR) |
+ lr = 0; |
+#elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR) |
+ lr = 0; |
+#elif defined(TARGET_ARCH_ARM) |
+ lr = static_cast<uintptr_t>(mcontext.arm_lr); |
+#elif defined(TARGET_ARCH_ARM64) |
+ lr = static_cast<uintptr_t>(mcontext.lr); |
+#elif defined(TARGET_ARCH_MIPS) |
+ lr = static_cast<uintptr_t>(mcontext.gregs[31]); |
+#else |
+ UNIMPLEMENTED(); |
+#endif // TARGET_ARCH_... |
+ return lr; |
+} |
+ |
+ |
void SignalHandler::Install(SignalAction action) { |
struct sigaction act; |
act.sa_handler = NULL; |