xref: /freebsd/contrib/llvm-project/clang/lib/Headers/unwind.h (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric /*===---- unwind.h - Stack unwinding ----------------------------------------===
2*0b57cec5SDimitry Andric  *
3*0b57cec5SDimitry Andric  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric  * See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric  *
7*0b57cec5SDimitry Andric  *===-----------------------------------------------------------------------===
8*0b57cec5SDimitry Andric  */
9*0b57cec5SDimitry Andric 
10*0b57cec5SDimitry Andric /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
11*0b57cec5SDimitry Andric 
12*0b57cec5SDimitry Andric #ifndef __CLANG_UNWIND_H
13*0b57cec5SDimitry Andric #define __CLANG_UNWIND_H
14*0b57cec5SDimitry Andric 
15*0b57cec5SDimitry Andric #if defined(__APPLE__) && __has_include_next(<unwind.h>)
16*0b57cec5SDimitry Andric /* Darwin (from 11.x on) provide an unwind.h. If that's available,
17*0b57cec5SDimitry Andric  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
18*0b57cec5SDimitry Andric  * so define that around the include.*/
19*0b57cec5SDimitry Andric # ifndef _GNU_SOURCE
20*0b57cec5SDimitry Andric #  define _SHOULD_UNDEFINE_GNU_SOURCE
21*0b57cec5SDimitry Andric #  define _GNU_SOURCE
22*0b57cec5SDimitry Andric # endif
23*0b57cec5SDimitry Andric // libunwind's unwind.h reflects the current visibility.  However, Mozilla
24*0b57cec5SDimitry Andric // builds with -fvisibility=hidden and relies on gcc's unwind.h to reset the
25*0b57cec5SDimitry Andric // visibility to default and export its contents.  gcc also allows users to
26*0b57cec5SDimitry Andric // override its override by #defining HIDE_EXPORTS (but note, this only obeys
27*0b57cec5SDimitry Andric // the user's -fvisibility setting; it doesn't hide any exports on its own).  We
28*0b57cec5SDimitry Andric // imitate gcc's header here:
29*0b57cec5SDimitry Andric # ifdef HIDE_EXPORTS
30*0b57cec5SDimitry Andric #  include_next <unwind.h>
31*0b57cec5SDimitry Andric # else
32*0b57cec5SDimitry Andric #  pragma GCC visibility push(default)
33*0b57cec5SDimitry Andric #  include_next <unwind.h>
34*0b57cec5SDimitry Andric #  pragma GCC visibility pop
35*0b57cec5SDimitry Andric # endif
36*0b57cec5SDimitry Andric # ifdef _SHOULD_UNDEFINE_GNU_SOURCE
37*0b57cec5SDimitry Andric #  undef _GNU_SOURCE
38*0b57cec5SDimitry Andric #  undef _SHOULD_UNDEFINE_GNU_SOURCE
39*0b57cec5SDimitry Andric # endif
40*0b57cec5SDimitry Andric #else
41*0b57cec5SDimitry Andric 
42*0b57cec5SDimitry Andric #include <stdint.h>
43*0b57cec5SDimitry Andric 
44*0b57cec5SDimitry Andric #ifdef __cplusplus
45*0b57cec5SDimitry Andric extern "C" {
46*0b57cec5SDimitry Andric #endif
47*0b57cec5SDimitry Andric 
48*0b57cec5SDimitry Andric /* It is a bit strange for a header to play with the visibility of the
49*0b57cec5SDimitry Andric    symbols it declares, but this matches gcc's behavior and some programs
50*0b57cec5SDimitry Andric    depend on it */
51*0b57cec5SDimitry Andric #ifndef HIDE_EXPORTS
52*0b57cec5SDimitry Andric #pragma GCC visibility push(default)
53*0b57cec5SDimitry Andric #endif
54*0b57cec5SDimitry Andric 
55*0b57cec5SDimitry Andric typedef uintptr_t _Unwind_Word __attribute__((__mode__(__unwind_word__)));
56*0b57cec5SDimitry Andric typedef intptr_t _Unwind_Sword __attribute__((__mode__(__unwind_word__)));
57*0b57cec5SDimitry Andric typedef uintptr_t _Unwind_Ptr;
58*0b57cec5SDimitry Andric typedef uintptr_t _Unwind_Internal_Ptr;
59*0b57cec5SDimitry Andric typedef uint64_t _Unwind_Exception_Class;
60*0b57cec5SDimitry Andric 
61*0b57cec5SDimitry Andric typedef intptr_t _sleb128_t;
62*0b57cec5SDimitry Andric typedef uintptr_t _uleb128_t;
63*0b57cec5SDimitry Andric 
64*0b57cec5SDimitry Andric struct _Unwind_Context;
65*0b57cec5SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
66*0b57cec5SDimitry Andric struct _Unwind_Control_Block;
67*0b57cec5SDimitry Andric typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */
68*0b57cec5SDimitry Andric #else
69*0b57cec5SDimitry Andric struct _Unwind_Exception;
70*0b57cec5SDimitry Andric typedef struct _Unwind_Exception _Unwind_Exception;
71*0b57cec5SDimitry Andric #endif
72*0b57cec5SDimitry Andric typedef enum {
73*0b57cec5SDimitry Andric   _URC_NO_REASON = 0,
74*0b57cec5SDimitry Andric #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
75*0b57cec5SDimitry Andric     !defined(__ARM_DWARF_EH__)
76*0b57cec5SDimitry Andric   _URC_OK = 0, /* used by ARM EHABI */
77*0b57cec5SDimitry Andric #endif
78*0b57cec5SDimitry Andric   _URC_FOREIGN_EXCEPTION_CAUGHT = 1,
79*0b57cec5SDimitry Andric 
80*0b57cec5SDimitry Andric   _URC_FATAL_PHASE2_ERROR = 2,
81*0b57cec5SDimitry Andric   _URC_FATAL_PHASE1_ERROR = 3,
82*0b57cec5SDimitry Andric   _URC_NORMAL_STOP = 4,
83*0b57cec5SDimitry Andric 
84*0b57cec5SDimitry Andric   _URC_END_OF_STACK = 5,
85*0b57cec5SDimitry Andric   _URC_HANDLER_FOUND = 6,
86*0b57cec5SDimitry Andric   _URC_INSTALL_CONTEXT = 7,
87*0b57cec5SDimitry Andric   _URC_CONTINUE_UNWIND = 8,
88*0b57cec5SDimitry Andric #if defined(__arm__) && !defined(__USING_SJLJ_EXCEPTIONS__) && \
89*0b57cec5SDimitry Andric     !defined(__ARM_DWARF_EH__)
90*0b57cec5SDimitry Andric   _URC_FAILURE = 9 /* used by ARM EHABI */
91*0b57cec5SDimitry Andric #endif
92*0b57cec5SDimitry Andric } _Unwind_Reason_Code;
93*0b57cec5SDimitry Andric 
94*0b57cec5SDimitry Andric typedef enum {
95*0b57cec5SDimitry Andric   _UA_SEARCH_PHASE = 1,
96*0b57cec5SDimitry Andric   _UA_CLEANUP_PHASE = 2,
97*0b57cec5SDimitry Andric 
98*0b57cec5SDimitry Andric   _UA_HANDLER_FRAME = 4,
99*0b57cec5SDimitry Andric   _UA_FORCE_UNWIND = 8,
100*0b57cec5SDimitry Andric   _UA_END_OF_STACK = 16 /* gcc extension to C++ ABI */
101*0b57cec5SDimitry Andric } _Unwind_Action;
102*0b57cec5SDimitry Andric 
103*0b57cec5SDimitry Andric typedef void (*_Unwind_Exception_Cleanup_Fn)(_Unwind_Reason_Code,
104*0b57cec5SDimitry Andric                                              _Unwind_Exception *);
105*0b57cec5SDimitry Andric 
106*0b57cec5SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
107*0b57cec5SDimitry Andric typedef struct _Unwind_Control_Block _Unwind_Control_Block;
108*0b57cec5SDimitry Andric typedef uint32_t _Unwind_EHT_Header;
109*0b57cec5SDimitry Andric 
110*0b57cec5SDimitry Andric struct _Unwind_Control_Block {
111*0b57cec5SDimitry Andric   uint64_t exception_class;
112*0b57cec5SDimitry Andric   void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
113*0b57cec5SDimitry Andric   /* unwinder cache (private fields for the unwinder's use) */
114*0b57cec5SDimitry Andric   struct {
115*0b57cec5SDimitry Andric     uint32_t reserved1; /* forced unwind stop function, 0 if not forced */
116*0b57cec5SDimitry Andric     uint32_t reserved2; /* personality routine */
117*0b57cec5SDimitry Andric     uint32_t reserved3; /* callsite */
118*0b57cec5SDimitry Andric     uint32_t reserved4; /* forced unwind stop argument */
119*0b57cec5SDimitry Andric     uint32_t reserved5;
120*0b57cec5SDimitry Andric   } unwinder_cache;
121*0b57cec5SDimitry Andric   /* propagation barrier cache (valid after phase 1) */
122*0b57cec5SDimitry Andric   struct {
123*0b57cec5SDimitry Andric     uint32_t sp;
124*0b57cec5SDimitry Andric     uint32_t bitpattern[5];
125*0b57cec5SDimitry Andric   } barrier_cache;
126*0b57cec5SDimitry Andric   /* cleanup cache (preserved over cleanup) */
127*0b57cec5SDimitry Andric   struct {
128*0b57cec5SDimitry Andric     uint32_t bitpattern[4];
129*0b57cec5SDimitry Andric   } cleanup_cache;
130*0b57cec5SDimitry Andric   /* personality cache (for personality's benefit) */
131*0b57cec5SDimitry Andric   struct {
132*0b57cec5SDimitry Andric     uint32_t fnstart;         /* function start address */
133*0b57cec5SDimitry Andric     _Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
134*0b57cec5SDimitry Andric     uint32_t additional;      /* additional data */
135*0b57cec5SDimitry Andric     uint32_t reserved1;
136*0b57cec5SDimitry Andric   } pr_cache;
137*0b57cec5SDimitry Andric   long long int : 0; /* force alignment of next item to 8-byte boundary */
138*0b57cec5SDimitry Andric } __attribute__((__aligned__(8)));
139*0b57cec5SDimitry Andric #else
140*0b57cec5SDimitry Andric struct _Unwind_Exception {
141*0b57cec5SDimitry Andric   _Unwind_Exception_Class exception_class;
142*0b57cec5SDimitry Andric   _Unwind_Exception_Cleanup_Fn exception_cleanup;
143*0b57cec5SDimitry Andric #if !defined (__USING_SJLJ_EXCEPTIONS__) && defined (__SEH__)
144*0b57cec5SDimitry Andric   _Unwind_Word private_[6];
145*0b57cec5SDimitry Andric #else
146*0b57cec5SDimitry Andric   _Unwind_Word private_1;
147*0b57cec5SDimitry Andric   _Unwind_Word private_2;
148*0b57cec5SDimitry Andric #endif
149*0b57cec5SDimitry Andric   /* The Itanium ABI requires that _Unwind_Exception objects are "double-word
150*0b57cec5SDimitry Andric    * aligned".  GCC has interpreted this to mean "use the maximum useful
151*0b57cec5SDimitry Andric    * alignment for the target"; so do we. */
152*0b57cec5SDimitry Andric } __attribute__((__aligned__));
153*0b57cec5SDimitry Andric #endif
154*0b57cec5SDimitry Andric 
155*0b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Stop_Fn)(int, _Unwind_Action,
156*0b57cec5SDimitry Andric                                                _Unwind_Exception_Class,
157*0b57cec5SDimitry Andric                                                _Unwind_Exception *,
158*0b57cec5SDimitry Andric                                                struct _Unwind_Context *,
159*0b57cec5SDimitry Andric                                                void *);
160*0b57cec5SDimitry Andric 
161*0b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Personality_Fn)(int, _Unwind_Action,
162*0b57cec5SDimitry Andric                                                       _Unwind_Exception_Class,
163*0b57cec5SDimitry Andric                                                       _Unwind_Exception *,
164*0b57cec5SDimitry Andric                                                       struct _Unwind_Context *);
165*0b57cec5SDimitry Andric typedef _Unwind_Personality_Fn __personality_routine;
166*0b57cec5SDimitry Andric 
167*0b57cec5SDimitry Andric typedef _Unwind_Reason_Code (*_Unwind_Trace_Fn)(struct _Unwind_Context *,
168*0b57cec5SDimitry Andric                                                 void *);
169*0b57cec5SDimitry Andric 
170*0b57cec5SDimitry Andric #if defined(__arm__) && !(defined(__USING_SJLJ_EXCEPTIONS__) || defined(__ARM_DWARF_EH__))
171*0b57cec5SDimitry Andric typedef enum {
172*0b57cec5SDimitry Andric   _UVRSC_CORE = 0,        /* integer register */
173*0b57cec5SDimitry Andric   _UVRSC_VFP = 1,         /* vfp */
174*0b57cec5SDimitry Andric   _UVRSC_WMMXD = 3,       /* Intel WMMX data register */
175*0b57cec5SDimitry Andric   _UVRSC_WMMXC = 4        /* Intel WMMX control register */
176*0b57cec5SDimitry Andric } _Unwind_VRS_RegClass;
177*0b57cec5SDimitry Andric 
178*0b57cec5SDimitry Andric typedef enum {
179*0b57cec5SDimitry Andric   _UVRSD_UINT32 = 0,
180*0b57cec5SDimitry Andric   _UVRSD_VFPX = 1,
181*0b57cec5SDimitry Andric   _UVRSD_UINT64 = 3,
182*0b57cec5SDimitry Andric   _UVRSD_FLOAT = 4,
183*0b57cec5SDimitry Andric   _UVRSD_DOUBLE = 5
184*0b57cec5SDimitry Andric } _Unwind_VRS_DataRepresentation;
185*0b57cec5SDimitry Andric 
186*0b57cec5SDimitry Andric typedef enum {
187*0b57cec5SDimitry Andric   _UVRSR_OK = 0,
188*0b57cec5SDimitry Andric   _UVRSR_NOT_IMPLEMENTED = 1,
189*0b57cec5SDimitry Andric   _UVRSR_FAILED = 2
190*0b57cec5SDimitry Andric } _Unwind_VRS_Result;
191*0b57cec5SDimitry Andric 
192*0b57cec5SDimitry Andric typedef uint32_t _Unwind_State;
193*0b57cec5SDimitry Andric #define _US_VIRTUAL_UNWIND_FRAME  ((_Unwind_State)0)
194*0b57cec5SDimitry Andric #define _US_UNWIND_FRAME_STARTING ((_Unwind_State)1)
195*0b57cec5SDimitry Andric #define _US_UNWIND_FRAME_RESUME   ((_Unwind_State)2)
196*0b57cec5SDimitry Andric #define _US_ACTION_MASK           ((_Unwind_State)3)
197*0b57cec5SDimitry Andric #define _US_FORCE_UNWIND          ((_Unwind_State)8)
198*0b57cec5SDimitry Andric 
199*0b57cec5SDimitry Andric _Unwind_VRS_Result _Unwind_VRS_Get(struct _Unwind_Context *__context,
200*0b57cec5SDimitry Andric   _Unwind_VRS_RegClass __regclass,
201*0b57cec5SDimitry Andric   uint32_t __regno,
202*0b57cec5SDimitry Andric   _Unwind_VRS_DataRepresentation __representation,
203*0b57cec5SDimitry Andric   void *__valuep);
204*0b57cec5SDimitry Andric 
205*0b57cec5SDimitry Andric _Unwind_VRS_Result _Unwind_VRS_Set(struct _Unwind_Context *__context,
206*0b57cec5SDimitry Andric   _Unwind_VRS_RegClass __regclass,
207*0b57cec5SDimitry Andric   uint32_t __regno,
208*0b57cec5SDimitry Andric   _Unwind_VRS_DataRepresentation __representation,
209*0b57cec5SDimitry Andric   void *__valuep);
210*0b57cec5SDimitry Andric 
211*0b57cec5SDimitry Andric static __inline__
212*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *__context, int __index) {
213*0b57cec5SDimitry Andric   _Unwind_Word __value;
214*0b57cec5SDimitry Andric   _Unwind_VRS_Get(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
215*0b57cec5SDimitry Andric   return __value;
216*0b57cec5SDimitry Andric }
217*0b57cec5SDimitry Andric 
218*0b57cec5SDimitry Andric static __inline__
219*0b57cec5SDimitry Andric void _Unwind_SetGR(struct _Unwind_Context *__context, int __index,
220*0b57cec5SDimitry Andric                    _Unwind_Word __value) {
221*0b57cec5SDimitry Andric   _Unwind_VRS_Set(__context, _UVRSC_CORE, __index, _UVRSD_UINT32, &__value);
222*0b57cec5SDimitry Andric }
223*0b57cec5SDimitry Andric 
224*0b57cec5SDimitry Andric static __inline__
225*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIP(struct _Unwind_Context *__context) {
226*0b57cec5SDimitry Andric   _Unwind_Word __ip = _Unwind_GetGR(__context, 15);
227*0b57cec5SDimitry Andric   return __ip & ~(_Unwind_Word)(0x1); /* Remove thumb mode bit. */
228*0b57cec5SDimitry Andric }
229*0b57cec5SDimitry Andric 
230*0b57cec5SDimitry Andric static __inline__
231*0b57cec5SDimitry Andric void _Unwind_SetIP(struct _Unwind_Context *__context, _Unwind_Word __value) {
232*0b57cec5SDimitry Andric   _Unwind_Word __thumb_mode_bit = _Unwind_GetGR(__context, 15) & 0x1;
233*0b57cec5SDimitry Andric   _Unwind_SetGR(__context, 15, __value | __thumb_mode_bit);
234*0b57cec5SDimitry Andric }
235*0b57cec5SDimitry Andric #else
236*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetGR(struct _Unwind_Context *, int);
237*0b57cec5SDimitry Andric void _Unwind_SetGR(struct _Unwind_Context *, int, _Unwind_Word);
238*0b57cec5SDimitry Andric 
239*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIP(struct _Unwind_Context *);
240*0b57cec5SDimitry Andric void _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Word);
241*0b57cec5SDimitry Andric #endif
242*0b57cec5SDimitry Andric 
243*0b57cec5SDimitry Andric 
244*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
245*0b57cec5SDimitry Andric 
246*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetCFA(struct _Unwind_Context *);
247*0b57cec5SDimitry Andric 
248*0b57cec5SDimitry Andric _Unwind_Word _Unwind_GetBSP(struct _Unwind_Context *);
249*0b57cec5SDimitry Andric 
250*0b57cec5SDimitry Andric void *_Unwind_GetLanguageSpecificData(struct _Unwind_Context *);
251*0b57cec5SDimitry Andric 
252*0b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetRegionStart(struct _Unwind_Context *);
253*0b57cec5SDimitry Andric 
254*0b57cec5SDimitry Andric /* DWARF EH functions; currently not available on Darwin/ARM */
255*0b57cec5SDimitry Andric #if !defined(__APPLE__) || !defined(__arm__)
256*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Exception *);
257*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_ForcedUnwind(_Unwind_Exception *, _Unwind_Stop_Fn,
258*0b57cec5SDimitry Andric                                          void *);
259*0b57cec5SDimitry Andric void _Unwind_DeleteException(_Unwind_Exception *);
260*0b57cec5SDimitry Andric void _Unwind_Resume(_Unwind_Exception *);
261*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_Resume_or_Rethrow(_Unwind_Exception *);
262*0b57cec5SDimitry Andric 
263*0b57cec5SDimitry Andric #endif
264*0b57cec5SDimitry Andric 
265*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
266*0b57cec5SDimitry Andric 
267*0b57cec5SDimitry Andric /* setjmp(3)/longjmp(3) stuff */
268*0b57cec5SDimitry Andric typedef struct SjLj_Function_Context *_Unwind_FunctionContext_t;
269*0b57cec5SDimitry Andric 
270*0b57cec5SDimitry Andric void _Unwind_SjLj_Register(_Unwind_FunctionContext_t);
271*0b57cec5SDimitry Andric void _Unwind_SjLj_Unregister(_Unwind_FunctionContext_t);
272*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_RaiseException(_Unwind_Exception *);
273*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_ForcedUnwind(_Unwind_Exception *,
274*0b57cec5SDimitry Andric                                               _Unwind_Stop_Fn, void *);
275*0b57cec5SDimitry Andric void _Unwind_SjLj_Resume(_Unwind_Exception *);
276*0b57cec5SDimitry Andric _Unwind_Reason_Code _Unwind_SjLj_Resume_or_Rethrow(_Unwind_Exception *);
277*0b57cec5SDimitry Andric 
278*0b57cec5SDimitry Andric void *_Unwind_FindEnclosingFunction(void *);
279*0b57cec5SDimitry Andric 
280*0b57cec5SDimitry Andric #ifdef __APPLE__
281*0b57cec5SDimitry Andric 
282*0b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *)
283*0b57cec5SDimitry Andric     __attribute__((__unavailable__));
284*0b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *)
285*0b57cec5SDimitry Andric     __attribute__((__unavailable__));
286*0b57cec5SDimitry Andric 
287*0b57cec5SDimitry Andric /* Darwin-specific functions */
288*0b57cec5SDimitry Andric void __register_frame(const void *);
289*0b57cec5SDimitry Andric void __deregister_frame(const void *);
290*0b57cec5SDimitry Andric 
291*0b57cec5SDimitry Andric struct dwarf_eh_bases {
292*0b57cec5SDimitry Andric   uintptr_t tbase;
293*0b57cec5SDimitry Andric   uintptr_t dbase;
294*0b57cec5SDimitry Andric   uintptr_t func;
295*0b57cec5SDimitry Andric };
296*0b57cec5SDimitry Andric void *_Unwind_Find_FDE(const void *, struct dwarf_eh_bases *);
297*0b57cec5SDimitry Andric 
298*0b57cec5SDimitry Andric void __register_frame_info_bases(const void *, void *, void *, void *)
299*0b57cec5SDimitry Andric   __attribute__((__unavailable__));
300*0b57cec5SDimitry Andric void __register_frame_info(const void *, void *) __attribute__((__unavailable__));
301*0b57cec5SDimitry Andric void __register_frame_info_table_bases(const void *, void*, void *, void *)
302*0b57cec5SDimitry Andric   __attribute__((__unavailable__));
303*0b57cec5SDimitry Andric void __register_frame_info_table(const void *, void *)
304*0b57cec5SDimitry Andric   __attribute__((__unavailable__));
305*0b57cec5SDimitry Andric void __register_frame_table(const void *) __attribute__((__unavailable__));
306*0b57cec5SDimitry Andric void __deregister_frame_info(const void *) __attribute__((__unavailable__));
307*0b57cec5SDimitry Andric void __deregister_frame_info_bases(const void *)__attribute__((__unavailable__));
308*0b57cec5SDimitry Andric 
309*0b57cec5SDimitry Andric #else
310*0b57cec5SDimitry Andric 
311*0b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetDataRelBase(struct _Unwind_Context *);
312*0b57cec5SDimitry Andric _Unwind_Ptr _Unwind_GetTextRelBase(struct _Unwind_Context *);
313*0b57cec5SDimitry Andric 
314*0b57cec5SDimitry Andric #endif
315*0b57cec5SDimitry Andric 
316*0b57cec5SDimitry Andric 
317*0b57cec5SDimitry Andric #ifndef HIDE_EXPORTS
318*0b57cec5SDimitry Andric #pragma GCC visibility pop
319*0b57cec5SDimitry Andric #endif
320*0b57cec5SDimitry Andric 
321*0b57cec5SDimitry Andric #ifdef __cplusplus
322*0b57cec5SDimitry Andric }
323*0b57cec5SDimitry Andric #endif
324*0b57cec5SDimitry Andric 
325*0b57cec5SDimitry Andric #endif
326*0b57cec5SDimitry Andric 
327*0b57cec5SDimitry Andric #endif /* __CLANG_UNWIND_H */
328