sl@0
|
1 |
/* unwinder.h
|
sl@0
|
2 |
*
|
sl@0
|
3 |
* Copyright 2002-2005 ARM Limited. All rights reserved.
|
sl@0
|
4 |
*
|
sl@0
|
5 |
* Your rights to use this code are set out in the accompanying licence
|
sl@0
|
6 |
* text file LICENCE.txt (ARM contract number LEC-ELA-00080 v2.0).
|
sl@0
|
7 |
*/
|
sl@0
|
8 |
/*
|
sl@0
|
9 |
* RCS $Revision: 91721 $
|
sl@0
|
10 |
* Checkin $Date: 2005-08-08 19:30:07 +0100 (Mon, 08 Aug 2005) $
|
sl@0
|
11 |
* Revising $Author: drodgman $
|
sl@0
|
12 |
*/
|
sl@0
|
13 |
|
sl@0
|
14 |
/* Language-independent unwinder header public defines */
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef UNWINDER_H
|
sl@0
|
17 |
#define UNWINDER_H
|
sl@0
|
18 |
|
sl@0
|
19 |
#ifdef __cplusplus
|
sl@0
|
20 |
extern "C" {
|
sl@0
|
21 |
#endif
|
sl@0
|
22 |
|
sl@0
|
23 |
typedef enum {
|
sl@0
|
24 |
_URC_OK = 0, /* operation completed successfully */
|
sl@0
|
25 |
_URC_FOREIGN_EXCEPTION_CAUGHT = 1,
|
sl@0
|
26 |
_URC_HANDLER_FOUND = 6,
|
sl@0
|
27 |
_URC_INSTALL_CONTEXT = 7,
|
sl@0
|
28 |
_URC_CONTINUE_UNWIND = 8,
|
sl@0
|
29 |
_URC_FAILURE = 9 /* unspecified failure of some kind */
|
sl@0
|
30 |
} _Unwind_Reason_Code;
|
sl@0
|
31 |
|
sl@0
|
32 |
typedef enum {
|
sl@0
|
33 |
_US_VIRTUAL_UNWIND_FRAME = 0,
|
sl@0
|
34 |
_US_UNWIND_FRAME_STARTING = 1,
|
sl@0
|
35 |
_US_UNWIND_FRAME_RESUME = 2
|
sl@0
|
36 |
} _Unwind_State;
|
sl@0
|
37 |
|
sl@0
|
38 |
typedef struct _Unwind_Control_Block _Unwind_Control_Block;
|
sl@0
|
39 |
typedef struct _Unwind_Context _Unwind_Context;
|
sl@0
|
40 |
typedef uint32_t _Unwind_EHT_Header;
|
sl@0
|
41 |
|
sl@0
|
42 |
|
sl@0
|
43 |
/* UCB: */
|
sl@0
|
44 |
|
sl@0
|
45 |
struct _Unwind_Control_Block {
|
sl@0
|
46 |
char exception_class[8];
|
sl@0
|
47 |
void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block *);
|
sl@0
|
48 |
/* Unwinder cache, private fields for the unwinder's use */
|
sl@0
|
49 |
struct {
|
sl@0
|
50 |
uint32_t reserved1; /* init reserved1 to 0, then don't touch */
|
sl@0
|
51 |
uint32_t reserved2;
|
sl@0
|
52 |
uint32_t reserved3;
|
sl@0
|
53 |
uint32_t reserved4;
|
sl@0
|
54 |
uint32_t reserved5;
|
sl@0
|
55 |
} unwinder_cache;
|
sl@0
|
56 |
/* Propagation barrier cache (valid after phase 1): */
|
sl@0
|
57 |
struct {
|
sl@0
|
58 |
uint32_t sp;
|
sl@0
|
59 |
uint32_t bitpattern[5];
|
sl@0
|
60 |
} barrier_cache;
|
sl@0
|
61 |
/* Cleanup cache (preserved over cleanup): */
|
sl@0
|
62 |
struct {
|
sl@0
|
63 |
uint32_t bitpattern[4];
|
sl@0
|
64 |
} cleanup_cache;
|
sl@0
|
65 |
/* Pr cache (for pr's benefit): */
|
sl@0
|
66 |
struct {
|
sl@0
|
67 |
uint32_t fnstart; /* function start address */
|
sl@0
|
68 |
_Unwind_EHT_Header *ehtp; /* pointer to EHT entry header word */
|
sl@0
|
69 |
uint32_t additional; /* additional data */
|
sl@0
|
70 |
uint32_t reserved1;
|
sl@0
|
71 |
} pr_cache;
|
sl@0
|
72 |
long long int :0; /* Force alignment of next item to 8-byte boundary */
|
sl@0
|
73 |
};
|
sl@0
|
74 |
|
sl@0
|
75 |
/* Interface functions: */
|
sl@0
|
76 |
|
sl@0
|
77 |
_Unwind_Reason_Code _Unwind_RaiseException(_Unwind_Control_Block *ucbp);
|
sl@0
|
78 |
NORETURNDECL void _Unwind_Resume(_Unwind_Control_Block *ucbp);
|
sl@0
|
79 |
void _Unwind_Complete(_Unwind_Control_Block *ucbp);
|
sl@0
|
80 |
void _Unwind_DeleteException(_Unwind_Control_Block *ucbp);
|
sl@0
|
81 |
|
sl@0
|
82 |
/* Virtual Register Set*/
|
sl@0
|
83 |
|
sl@0
|
84 |
typedef enum {
|
sl@0
|
85 |
_UVRSC_CORE = 0, /* integer register */
|
sl@0
|
86 |
_UVRSC_VFP = 1, /* vfp */
|
sl@0
|
87 |
/* 2: was fpa (obsolete) */
|
sl@0
|
88 |
_UVRSC_WMMXD = 3, /* Intel WMMX data register */
|
sl@0
|
89 |
_UVRSC_WMMXC = 4 /* Intel WMMX control register */
|
sl@0
|
90 |
} _Unwind_VRS_RegClass;
|
sl@0
|
91 |
|
sl@0
|
92 |
typedef enum {
|
sl@0
|
93 |
_UVRSD_UINT32 = 0,
|
sl@0
|
94 |
_UVRSD_VFPX = 1,
|
sl@0
|
95 |
/* 2: was fpa (obsolete) */
|
sl@0
|
96 |
_UVRSD_UINT64 = 3,
|
sl@0
|
97 |
_UVRSD_FLOAT = 4,
|
sl@0
|
98 |
_UVRSD_DOUBLE = 5
|
sl@0
|
99 |
} _Unwind_VRS_DataRepresentation;
|
sl@0
|
100 |
|
sl@0
|
101 |
typedef enum {
|
sl@0
|
102 |
_UVRSR_OK = 0,
|
sl@0
|
103 |
_UVRSR_NOT_IMPLEMENTED = 1,
|
sl@0
|
104 |
_UVRSR_FAILED = 2
|
sl@0
|
105 |
} _Unwind_VRS_Result;
|
sl@0
|
106 |
|
sl@0
|
107 |
IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Set(_Unwind_Context *context,
|
sl@0
|
108 |
_Unwind_VRS_RegClass regclass,
|
sl@0
|
109 |
uint32_t regno,
|
sl@0
|
110 |
_Unwind_VRS_DataRepresentation representation,
|
sl@0
|
111 |
void *valuep);
|
sl@0
|
112 |
|
sl@0
|
113 |
IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Get(_Unwind_Context *context,
|
sl@0
|
114 |
_Unwind_VRS_RegClass regclass,
|
sl@0
|
115 |
uint32_t regno,
|
sl@0
|
116 |
_Unwind_VRS_DataRepresentation representation,
|
sl@0
|
117 |
void *valuep);
|
sl@0
|
118 |
|
sl@0
|
119 |
IMPORT_C _Unwind_VRS_Result _Unwind_VRS_Pop(_Unwind_Context *context,
|
sl@0
|
120 |
_Unwind_VRS_RegClass regclass,
|
sl@0
|
121 |
uint32_t descriminator,
|
sl@0
|
122 |
_Unwind_VRS_DataRepresentation representation);
|
sl@0
|
123 |
|
sl@0
|
124 |
#ifdef __cplusplus
|
sl@0
|
125 |
} /* extern "C" */
|
sl@0
|
126 |
#endif
|
sl@0
|
127 |
|
sl@0
|
128 |
#endif /* defined UNWINDER_H */
|