|
11 | 11 |
|
12 | 12 | #include "int_lib.h"
|
13 | 13 |
|
14 |
| -/* |
15 |
| - * _Unwind_* stuff based on C++ ABI public documentation |
16 |
| - * http://refspecs.freestandards.org/abi-eh-1.21.html |
17 |
| - */ |
18 |
| - |
19 |
| -typedef enum { |
20 |
| - _URC_NO_REASON = 0, |
21 |
| - _URC_FOREIGN_EXCEPTION_CAUGHT = 1, |
22 |
| - _URC_FATAL_PHASE2_ERROR = 2, |
23 |
| - _URC_FATAL_PHASE1_ERROR = 3, |
24 |
| - _URC_NORMAL_STOP = 4, |
25 |
| - _URC_END_OF_STACK = 5, |
26 |
| - _URC_HANDLER_FOUND = 6, |
27 |
| - _URC_INSTALL_CONTEXT = 7, |
28 |
| - _URC_CONTINUE_UNWIND = 8 |
29 |
| -} _Unwind_Reason_Code; |
30 |
| - |
31 |
| -typedef enum { |
32 |
| - _UA_SEARCH_PHASE = 1, |
33 |
| - _UA_CLEANUP_PHASE = 2, |
34 |
| - _UA_HANDLER_FRAME = 4, |
35 |
| - _UA_FORCE_UNWIND = 8, |
36 |
| - _UA_END_OF_STACK = 16 |
37 |
| -} _Unwind_Action; |
38 |
| - |
39 |
| -typedef struct _Unwind_Context* _Unwind_Context_t; |
40 |
| - |
41 |
| -struct _Unwind_Exception { |
42 |
| - uint64_t exception_class; |
43 |
| - void (*exception_cleanup)(_Unwind_Reason_Code reason, |
44 |
| - struct _Unwind_Exception* exc); |
45 |
| - uintptr_t private_1; |
46 |
| - uintptr_t private_2; |
47 |
| -}; |
48 |
| - |
49 |
| -COMPILER_RT_ABI const uint8_t* _Unwind_GetLanguageSpecificData(_Unwind_Context_t c); |
50 |
| -COMPILER_RT_ABI void _Unwind_SetGR(_Unwind_Context_t c, int i, uintptr_t n); |
51 |
| -COMPILER_RT_ABI void _Unwind_SetIP(_Unwind_Context_t, uintptr_t new_value); |
52 |
| -COMPILER_RT_ABI uintptr_t _Unwind_GetIP(_Unwind_Context_t context); |
53 |
| -COMPILER_RT_ABI uintptr_t _Unwind_GetRegionStart(_Unwind_Context_t context); |
54 |
| - |
| 14 | +#include <unwind.h> |
55 | 15 |
|
56 | 16 | /*
|
57 | 17 | * Pointer encodings documented at:
|
@@ -185,12 +145,12 @@ static uintptr_t readEncodedPointer(const uint8_t** data, uint8_t encoding)
|
185 | 145 | COMPILER_RT_ABI _Unwind_Reason_Code
|
186 | 146 | __gcc_personality_sj0(int version, _Unwind_Action actions,
|
187 | 147 | uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject,
|
188 |
| - _Unwind_Context_t context) |
| 148 | + struct _Unwind_Context *context) |
189 | 149 | #else
|
190 | 150 | COMPILER_RT_ABI _Unwind_Reason_Code
|
191 | 151 | __gcc_personality_v0(int version, _Unwind_Action actions,
|
192 | 152 | uint64_t exceptionClass, struct _Unwind_Exception* exceptionObject,
|
193 |
| - _Unwind_Context_t context) |
| 153 | + struct _Unwind_Context *context) |
194 | 154 | #endif
|
195 | 155 | {
|
196 | 156 | /* Since C does not have catch clauses, there is nothing to do during */
|
|
0 commit comments