| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #include "vm/simulator.h" | 6 #include "vm/simulator.h" |
| 7 #include "vm/signal_handler.h" | 7 #include "vm/signal_handler.h" |
| 8 #if defined(TARGET_OS_ANDROID) | 8 #if defined(TARGET_OS_ANDROID) |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 return sp; | 65 return sp; |
| 66 } | 66 } |
| 67 | 67 |
| 68 | 68 |
| 69 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) { | 69 uintptr_t SignalHandler::GetLinkRegister(const mcontext_t& mcontext) { |
| 70 uintptr_t lr = 0; | 70 uintptr_t lr = 0; |
| 71 #if defined(TARGET_ARCH_ARM) | 71 #if defined(TARGET_ARCH_ARM) |
| 72 lr = static_cast<uintptr_t>(mcontext.arm_lr); | 72 lr = static_cast<uintptr_t>(mcontext.arm_lr); |
| 73 #elif defined(TARGET_ARCH_ARM64) | 73 #elif defined(TARGET_ARCH_ARM64) |
| 74 lr = static_cast<uintptr_t>(mcontext.regs[30]); | 74 lr = static_cast<uintptr_t>(mcontext.regs[30]); |
| 75 UNIMPLEMENTED(); | |
| 76 #else | 75 #else |
| 77 UNIMPLEMENTED(); | 76 UNIMPLEMENTED(); |
| 78 #endif // TARGET_ARCH_... | 77 #endif // TARGET_ARCH_... |
| 79 return lr; | 78 return lr; |
| 80 } | 79 } |
| 81 | 80 |
| 82 | 81 |
| 83 void SignalHandler::Install(SignalAction action) { | 82 void SignalHandler::Install(SignalAction action) { |
| 84 struct sigaction act; | 83 struct sigaction act; |
| 85 memset(&act, 0, sizeof(act)); | 84 memset(&act, 0, sizeof(act)); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 99 act.sa_handler = SIG_IGN; | 98 act.sa_handler = SIG_IGN; |
| 100 sigemptyset(&act.sa_mask); | 99 sigemptyset(&act.sa_mask); |
| 101 int r = sigaction(SIGPROF, &act, NULL); | 100 int r = sigaction(SIGPROF, &act, NULL); |
| 102 ASSERT(r == 0); | 101 ASSERT(r == 0); |
| 103 } | 102 } |
| 104 | 103 |
| 105 | 104 |
| 106 } // namespace dart | 105 } // namespace dart |
| 107 | 106 |
| 108 #endif // defined(TARGET_OS_ANDROID) | 107 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |