unwind.h revision 254661
11195Srgrimes/*	$NetBSD: unwind.h,v 1.1 2012/05/26 22:02:29 christos Exp $	*/
250472Speter
337Srgrimes/*-
473251Sgshapiro * Copyright (c) 2012 The NetBSD Foundation, Inc.
538103Speter * All rights reserved.
673251Sgshapiro *
738103Speter * Redistribution and use in source and binary forms, with or without
899451Sru * modification, are permitted provided that the following conditions
9114780Sdougb * are met:
10114780Sdougb * 1. Redistributions of source code must retain the above copyright
1165532Snectar *    notice, this list of conditions and the following disclaimer.
1255230Speter * 2. Redistributions in binary form must reproduce the above copyright
13113674Smtm *    notice, this list of conditions and the following disclaimer in the
14126756Smlaier *    documentation and/or other materials provided with the distribution.
15114555Sdougb *
16114492Sdougb * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1798187Sgordon * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1855230Speter * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
191734Sjkh * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2017639Swosch * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2117639Swosch * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22121911Smarkm * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23121911Smarkm * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24121911Smarkm * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2537Srgrimes * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26121911Smarkm * POSSIBILITY OF SUCH DAMAGE.
2798548Sru */
2857488Speter#ifndef _UNWIND_H_
2974837Sgreen#define _UNWIND_H_
30124214Sdes
3157459Smarkm__BEGIN_DECLS
3260677Skrisstruct _Unwind_Context;
3360677Skrisstruct _Unwind_Exception;
3460677Skristypedef int _Unwind_Reason_Code;
3582521Salextypedef void *_Unwind_Ptr;
36108002Sgreentypedef long _Unwind_Word;
37147Srgrimes
3827487Sasamitypedef _Unwind_Reason_Code
3965168Sasami    (*_Unwind_Trace_Fn)(struct _Unwind_Context *, void *);
4095144Sgshapiro#ifdef notyet
4195144Sgshapirotypedef _Unwind_Reason_Code
4295144Sgshapiro    (*_Unwind_Stop_Fn)(struct _Unwind_Context *, void *);
43135851Sdougb#endif
44135851Sdougb
45135851Sdougb_Unwind_Reason_Code	 _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
46135851Sdougbvoid 			 _Unwind_DeleteException(struct _Unwind_Exception *);
47135851Sdougbvoid 	       		*_Unwind_FindEnclosingFunction(void *);
48135851Sdougb#ifdef notyet
4999451Sru_Unwind_Reason_Code 	 _Unwind_ForcedUnwind(struct _Unwind_Exception *,
50135851Sdougb    _Unwind_Stop_fn, void *);
5199451Sru#endif
5290281Sume_Unwind_Word		 _Unwind_GetCFA(struct _Unwind_Context *);
53135851Sdougb_Unwind_Ptr		 _Unwind_GetDataRelBase(struct _Unwind_Context *);
5499451Sru_Unwind_Word 		 _Unwind_GetGR(struct _Unwind_Context *, int);
5599451Sru_Unwind_Ptr		 _Unwind_GetIP(struct _Unwind_Context *);
5699451Sru_Unwind_Ptr		 _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
57117292Sgshapirovoid 			*_Unwind_GetLanguageSpecificData(
58117292Sgshapiro    struct _Unwind_Context *);
59117292Sgshapiro_Unwind_Ptr		 _Unwind_GetRegionStart(struct _Unwind_Context *);
6064598Sgshapiro_Unwind_Ptr		 _Unwind_GetTextRelBase(struct _Unwind_Context *);
6164598Sgshapiro_Unwind_Reason_Code	 _Unwind_RaiseException(struct _Unwind_Exception *);
62117292Sgshapirovoid			 _Unwind_Resume(struct _Unwind_Exception *);
6337Srgrimes_Unwind_Reason_Code	 _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *);
64263Srgrimesvoid			 _Unwind_SetGR(struct _Unwind_Context *, int,
6599449Sru    _Unwind_Ptr);
66263Srgrimesvoid			 _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr);
67124831Sru__END_DECLS
68124831Sru#endif /* _UNWIND_H_ */
69124831Sru