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_LINUX) | 8 #if defined(TARGET_OS_LINUX) |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 lr = 0; | 106 lr = 0; |
107 #elif defined(TARGET_ARCH_MIPS) && defined(USING_SIMULATOR) | 107 #elif defined(TARGET_ARCH_MIPS) && defined(USING_SIMULATOR) |
108 lr = 0; | 108 lr = 0; |
109 #elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR) | 109 #elif defined(TARGET_ARCH_ARM) && defined(USING_SIMULATOR) |
110 lr = 0; | 110 lr = 0; |
111 #elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR) | 111 #elif defined(TARGET_ARCH_ARM64) && defined(USING_SIMULATOR) |
112 lr = 0; | 112 lr = 0; |
113 #elif defined(TARGET_ARCH_ARM) | 113 #elif defined(TARGET_ARCH_ARM) |
114 lr = static_cast<uintptr_t>(mcontext.arm_lr); | 114 lr = static_cast<uintptr_t>(mcontext.arm_lr); |
115 #elif defined(TARGET_ARCH_ARM64) | 115 #elif defined(TARGET_ARCH_ARM64) |
116 lr = static_cast<uintptr_t>(mcontext.lr); | 116 lr = static_cast<uintptr_t>(mcontext.regs[30]); |
117 #elif defined(TARGET_ARCH_MIPS) | 117 #elif defined(TARGET_ARCH_MIPS) |
118 lr = static_cast<uintptr_t>(mcontext.gregs[31]); | 118 lr = static_cast<uintptr_t>(mcontext.gregs[31]); |
119 #else | 119 #else |
120 UNIMPLEMENTED(); | 120 UNIMPLEMENTED(); |
121 #endif // TARGET_ARCH_... | 121 #endif // TARGET_ARCH_... |
122 return lr; | 122 return lr; |
123 } | 123 } |
124 | 124 |
125 | 125 |
126 void SignalHandler::Install(SignalAction action) { | 126 void SignalHandler::Install(SignalAction action) { |
(...skipping 15 matching lines...) Expand all Loading... |
142 sigemptyset(&act.sa_mask); | 142 sigemptyset(&act.sa_mask); |
143 act.sa_flags = 0; | 143 act.sa_flags = 0; |
144 int r = sigaction(SIGPROF, &act, NULL); | 144 int r = sigaction(SIGPROF, &act, NULL); |
145 ASSERT(r == 0); | 145 ASSERT(r == 0); |
146 } | 146 } |
147 | 147 |
148 | 148 |
149 } // namespace dart | 149 } // namespace dart |
150 | 150 |
151 #endif // defined(TARGET_OS_LINUX) | 151 #endif // defined(TARGET_OS_LINUX) |
OLD | NEW |