1254661Semaste/*	$NetBSD: unwind.h,v 1.1 2012/05/26 22:02:29 christos Exp $	*/
2254661Semaste
3254661Semaste/*-
4254661Semaste * Copyright (c) 2012 The NetBSD Foundation, Inc.
5254661Semaste * All rights reserved.
6254661Semaste *
7254661Semaste * Redistribution and use in source and binary forms, with or without
8254661Semaste * modification, are permitted provided that the following conditions
9254661Semaste * are met:
10254661Semaste * 1. Redistributions of source code must retain the above copyright
11254661Semaste *    notice, this list of conditions and the following disclaimer.
12254661Semaste * 2. Redistributions in binary form must reproduce the above copyright
13254661Semaste *    notice, this list of conditions and the following disclaimer in the
14254661Semaste *    documentation and/or other materials provided with the distribution.
15254661Semaste *
16254661Semaste * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17254661Semaste * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18254661Semaste * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19254661Semaste * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20254661Semaste * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21254661Semaste * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22254661Semaste * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23254661Semaste * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24254661Semaste * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25254661Semaste * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26254661Semaste * POSSIBILITY OF SUCH DAMAGE.
27254661Semaste */
28254661Semaste#ifndef _UNWIND_H_
29254661Semaste#define _UNWIND_H_
30254661Semaste
31254661Semaste__BEGIN_DECLS
32254661Semastestruct _Unwind_Context;
33254661Semastestruct _Unwind_Exception;
34254661Semastetypedef int _Unwind_Reason_Code;
35254661Semastetypedef void *_Unwind_Ptr;
36254661Semastetypedef long _Unwind_Word;
37254661Semaste
38254661Semastetypedef _Unwind_Reason_Code
39254661Semaste    (*_Unwind_Trace_Fn)(struct _Unwind_Context *, void *);
40254661Semaste#ifdef notyet
41254661Semastetypedef _Unwind_Reason_Code
42254661Semaste    (*_Unwind_Stop_Fn)(struct _Unwind_Context *, void *);
43254661Semaste#endif
44254661Semaste
45254661Semaste_Unwind_Reason_Code	 _Unwind_Backtrace(_Unwind_Trace_Fn, void *);
46254661Semastevoid 			 _Unwind_DeleteException(struct _Unwind_Exception *);
47254661Semastevoid 	       		*_Unwind_FindEnclosingFunction(void *);
48254661Semaste#ifdef notyet
49254661Semaste_Unwind_Reason_Code 	 _Unwind_ForcedUnwind(struct _Unwind_Exception *,
50254661Semaste    _Unwind_Stop_fn, void *);
51254661Semaste#endif
52254661Semaste_Unwind_Word		 _Unwind_GetCFA(struct _Unwind_Context *);
53254661Semaste_Unwind_Ptr		 _Unwind_GetDataRelBase(struct _Unwind_Context *);
54254661Semaste_Unwind_Word 		 _Unwind_GetGR(struct _Unwind_Context *, int);
55254661Semaste_Unwind_Ptr		 _Unwind_GetIP(struct _Unwind_Context *);
56254661Semaste_Unwind_Ptr		 _Unwind_GetIPInfo(struct _Unwind_Context *, int *);
57254661Semastevoid 			*_Unwind_GetLanguageSpecificData(
58254661Semaste    struct _Unwind_Context *);
59254661Semaste_Unwind_Ptr		 _Unwind_GetRegionStart(struct _Unwind_Context *);
60254661Semaste_Unwind_Ptr		 _Unwind_GetTextRelBase(struct _Unwind_Context *);
61254661Semaste_Unwind_Reason_Code	 _Unwind_RaiseException(struct _Unwind_Exception *);
62254661Semastevoid			 _Unwind_Resume(struct _Unwind_Exception *);
63254661Semaste_Unwind_Reason_Code	 _Unwind_Resume_or_Rethrow(struct _Unwind_Exception *);
64254661Semastevoid			 _Unwind_SetGR(struct _Unwind_Context *, int,
65254661Semaste    _Unwind_Ptr);
66254661Semastevoid			 _Unwind_SetIP(struct _Unwind_Context *, _Unwind_Ptr);
67254661Semaste__END_DECLS
68254661Semaste#endif /* _UNWIND_H_ */
69