| 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 #ifndef VM_SIGNAL_HANDLER_H_ | 5 #ifndef VM_SIGNAL_HANDLER_H_ |
| 6 #define VM_SIGNAL_HANDLER_H_ | 6 #define VM_SIGNAL_HANDLER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 | 10 |
| 11 #if defined(TARGET_OS_LINUX) | 11 #if defined(TARGET_OS_LINUX) |
| 12 #include <signal.h> // NOLINT | 12 #include <signal.h> // NOLINT |
| 13 #include <ucontext.h> // NOLINT | 13 #include <ucontext.h> // NOLINT |
| 14 #elif defined(TARGET_OS_OPENBSD) |
| 15 #include <signal.h> // NOLINT |
| 16 typedef struct sigcontext mcontext_t; |
| 14 #elif defined(TARGET_OS_ANDROID) | 17 #elif defined(TARGET_OS_ANDROID) |
| 15 #include <signal.h> // NOLINT | 18 #include <signal.h> // NOLINT |
| 16 #if !defined(__BIONIC_HAVE_UCONTEXT_T) | 19 #if !defined(__BIONIC_HAVE_UCONTEXT_T) |
| 17 #include <asm/sigcontext.h> // NOLINT | 20 #include <asm/sigcontext.h> // NOLINT |
| 18 // If ucontext_t is not defined on Android, define it here. | 21 // If ucontext_t is not defined on Android, define it here. |
| 19 typedef struct sigcontext mcontext_t; | 22 typedef struct sigcontext mcontext_t; |
| 20 typedef struct ucontext { | 23 typedef struct ucontext { |
| 21 uint32_t uc_flags; | 24 uint32_t uc_flags; |
| 22 struct ucontext *uc_link; | 25 struct ucontext *uc_link; |
| 23 stack_t uc_stack; | 26 stack_t uc_stack; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 50 static uintptr_t GetCStackPointer(const mcontext_t& mcontext); | 53 static uintptr_t GetCStackPointer(const mcontext_t& mcontext); |
| 51 static uintptr_t GetDartStackPointer(const mcontext_t& mcontext); | 54 static uintptr_t GetDartStackPointer(const mcontext_t& mcontext); |
| 52 static uintptr_t GetLinkRegister(const mcontext_t& mcontext); | 55 static uintptr_t GetLinkRegister(const mcontext_t& mcontext); |
| 53 private: | 56 private: |
| 54 }; | 57 }; |
| 55 | 58 |
| 56 | 59 |
| 57 } // namespace dart | 60 } // namespace dart |
| 58 | 61 |
| 59 #endif // VM_SIGNAL_HANDLER_H_ | 62 #endif // VM_SIGNAL_HANDLER_H_ |
| OLD | NEW |