Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
/* libunwind - a platform-independent unwind library
2
   Copyright (c) 2003-2005 Hewlett-Packard Development Company, L.P.
3
        Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
4
 
5
This file is part of libunwind.
6
 
7
Permission is hereby granted, free of charge, to any person obtaining
8
a copy of this software and associated documentation files (the
9
"Software"), to deal in the Software without restriction, including
10
without limitation the rights to use, copy, modify, merge, publish,
11
distribute, sublicense, and/or sell copies of the Software, and to
12
permit persons to whom the Software is furnished to do so, subject to
13
the following conditions:
14
 
15
The above copyright notice and this permission notice shall be
16
included in all copies or substantial portions of the Software.
17
 
18
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  */
25
 
26
#pragma once
27
 
28
//
29
#define DWARF_EXTENDED_LENGTH_FLAG (0xffffffff)
30
#define DWARF_CIE_ID_CIE_FLAG (0)
31
 
32
// Exception Handling Pointer Encoding constants
33
#define DW_EH_PE_VALUE_MASK (0x0F)
34
#define DW_EH_PE_RELATIVE_OFFSET_MASK (0x70)
35
 
36
// Register Definitions
37
#define DW_EN_MAX_REGISTER_NUMBER (120)
38
 
39
enum {
40
  DW_EH_PE_ptr = 0x00,
41
  DW_EH_PE_uleb128 = 0x01,
42
  DW_EH_PE_udata2 = 0x02,
43
  DW_EH_PE_udata4 = 0x03,
44
  DW_EH_PE_udata8 = 0x04,
45
  DW_EH_PE_signed = 0x08,
46
  DW_EH_PE_sleb128 = 0x09,
47
  DW_EH_PE_sdata2 = 0x0A,
48
  DW_EH_PE_sdata4 = 0x0B,
49
  DW_EH_PE_sdata8 = 0x0C,
50
 
51
  DW_EH_PE_absptr = 0x00,
52
  DW_EH_PE_pcrel = 0x10,
53
  DW_EH_PE_textrel = 0x20,
54
  DW_EH_PE_datarel = 0x30,
55
  DW_EH_PE_funcrel = 0x40,
56
  DW_EH_PE_aligned = 0x50,
57
  DW_EH_PE_indirect = 0x80,
58
  DW_EH_PE_omit = 0xFF
59
};
60
 
61
// Unwind Instructions
62
 
63
#define DW_CFA_OPCODE_MASK (0xC0)
64
#define DW_CFA_OPERAND_MASK (0x3F)
65
 
66
enum {
67
  DW_CFA_nop = 0x0,
68
  DW_CFA_set_loc = 0x1,
69
  DW_CFA_advance_loc1 = 0x2,
70
  DW_CFA_advance_loc2 = 0x3,
71
  DW_CFA_advance_loc4 = 0x4,
72
  DW_CFA_offset_extended = 0x5,
73
  DW_CFA_restore_extended = 0x6,
74
  DW_CFA_undefined = 0x7,
75
  DW_CFA_same_value = 0x8,
76
  DW_CFA_register = 0x9,
77
  DW_CFA_remember_state = 0xA,
78
  DW_CFA_restore_state = 0xB,
79
  DW_CFA_def_cfa = 0xC,
80
  DW_CFA_def_cfa_register = 0xD,
81
  DW_CFA_def_cfa_offset = 0xE,
82
  DW_CFA_def_cfa_expression = 0xF,
83
  DW_CFA_expression = 0x10,
84
  DW_CFA_offset_extended_sf = 0x11,
85
  DW_CFA_def_cfa_sf = 0x12,
86
  DW_CFA_def_cfa_offset_sf = 0x13,
87
  DW_CFA_val_offset = 0x14,
88
  DW_CFA_val_offset_sf = 0x15,
89
  DW_CFA_val_expression = 0x16,
90
 
91
  // opcode is in high 2 bits, operand in is lower 6 bits
92
  DW_CFA_advance_loc = 0x40,  // operand is delta
93
  DW_CFA_offset = 0x80,       // operand is register
94
  DW_CFA_restore = 0xC0,      // operand is register
95
 
96
  // GNU extensions
97
  DW_CFA_GNU_window_save = 0x2D,
98
  DW_CFA_GNU_args_size = 0x2E,
99
  DW_CFA_GNU_negative_offset_extended = 0x2F
100
};
101
 
102
// Expression Instructions
103
enum {
104
  DW_OP_addr = 0x03,
105
  DW_OP_deref = 0x06,
106
  DW_OP_const1u = 0x08,
107
  DW_OP_const1s = 0x09,
108
  DW_OP_const2u = 0x0A,
109
  DW_OP_const2s = 0x0B,
110
  DW_OP_const4u = 0x0C,
111
  DW_OP_const4s = 0x0D,
112
  DW_OP_const8u = 0x0E,
113
  DW_OP_const8s = 0x0F,
114
  DW_OP_constu = 0x10,
115
  DW_OP_consts = 0x11,
116
  DW_OP_dup = 0x12,
117
  DW_OP_drop = 0x13,
118
  DW_OP_over = 0x14,
119
  DW_OP_pick = 0x15,
120
  DW_OP_swap = 0x16,
121
  DW_OP_rot = 0x17,
122
  DW_OP_xderef = 0x18,
123
  DW_OP_abs = 0x19,
124
  DW_OP_and = 0x1A,
125
  DW_OP_div = 0x1B,
126
  DW_OP_minus = 0x1C,
127
  DW_OP_mod = 0x1D,
128
  DW_OP_mul = 0x1E,
129
  DW_OP_neg = 0x1F,
130
  DW_OP_not = 0x20,
131
  DW_OP_or = 0x21,
132
  DW_OP_plus = 0x22,
133
  DW_OP_plus_uconst = 0x23,
134
  DW_OP_shl = 0x24,
135
  DW_OP_shr = 0x25,
136
  DW_OP_shra = 0x26,
137
  DW_OP_xor = 0x27,
138
  DW_OP_skip = 0x2F,
139
  DW_OP_bra = 0x28,
140
  DW_OP_eq = 0x29,
141
  DW_OP_ge = 0x2A,
142
  DW_OP_gt = 0x2B,
143
  DW_OP_le = 0x2C,
144
  DW_OP_lt = 0x2D,
145
  DW_OP_ne = 0x2E,
146
  DW_OP_lit0 = 0x30,
147
  DW_OP_lit1 = 0x31,
148
  DW_OP_lit2 = 0x32,
149
  DW_OP_lit3 = 0x33,
150
  DW_OP_lit4 = 0x34,
151
  DW_OP_lit5 = 0x35,
152
  DW_OP_lit6 = 0x36,
153
  DW_OP_lit7 = 0x37,
154
  DW_OP_lit8 = 0x38,
155
  DW_OP_lit9 = 0x39,
156
  DW_OP_lit10 = 0x3A,
157
  DW_OP_lit11 = 0x3B,
158
  DW_OP_lit12 = 0x3C,
159
  DW_OP_lit13 = 0x3D,
160
  DW_OP_lit14 = 0x3E,
161
  DW_OP_lit15 = 0x3F,
162
  DW_OP_lit16 = 0x40,
163
  DW_OP_lit17 = 0x41,
164
  DW_OP_lit18 = 0x42,
165
  DW_OP_lit19 = 0x43,
166
  DW_OP_lit20 = 0x44,
167
  DW_OP_lit21 = 0x45,
168
  DW_OP_lit22 = 0x46,
169
  DW_OP_lit23 = 0x47,
170
  DW_OP_lit24 = 0x48,
171
  DW_OP_lit25 = 0x49,
172
  DW_OP_lit26 = 0x4A,
173
  DW_OP_lit27 = 0x4B,
174
  DW_OP_lit28 = 0x4C,
175
  DW_OP_lit29 = 0x4D,
176
  DW_OP_lit30 = 0x4E,
177
  DW_OP_lit31 = 0x4F,
178
  DW_OP_reg0 = 0x50,
179
  DW_OP_reg1 = 0x51,
180
  DW_OP_reg2 = 0x52,
181
  DW_OP_reg3 = 0x53,
182
  DW_OP_reg4 = 0x54,
183
  DW_OP_reg5 = 0x55,
184
  DW_OP_reg6 = 0x56,
185
  DW_OP_reg7 = 0x57,
186
  DW_OP_reg8 = 0x58,
187
  DW_OP_reg9 = 0x59,
188
  DW_OP_reg10 = 0x5A,
189
  DW_OP_reg11 = 0x5B,
190
  DW_OP_reg12 = 0x5C,
191
  DW_OP_reg13 = 0x5D,
192
  DW_OP_reg14 = 0x5E,
193
  DW_OP_reg15 = 0x5F,
194
  DW_OP_reg16 = 0x60,
195
  DW_OP_reg17 = 0x61,
196
  DW_OP_reg18 = 0x62,
197
  DW_OP_reg19 = 0x63,
198
  DW_OP_reg20 = 0x64,
199
  DW_OP_reg21 = 0x65,
200
  DW_OP_reg22 = 0x66,
201
  DW_OP_reg23 = 0x67,
202
  DW_OP_reg24 = 0x68,
203
  DW_OP_reg25 = 0x69,
204
  DW_OP_reg26 = 0x6A,
205
  DW_OP_reg27 = 0x6B,
206
  DW_OP_reg28 = 0x6C,
207
  DW_OP_reg29 = 0x6D,
208
  DW_OP_reg30 = 0x6E,
209
  DW_OP_reg31 = 0x6F,
210
  DW_OP_breg0 = 0x70,
211
  DW_OP_breg1 = 0x71,
212
  DW_OP_breg2 = 0x72,
213
  DW_OP_breg3 = 0x73,
214
  DW_OP_breg4 = 0x74,
215
  DW_OP_breg5 = 0x75,
216
  DW_OP_breg6 = 0x76,
217
  DW_OP_breg7 = 0x77,
218
  DW_OP_breg8 = 0x78,
219
  DW_OP_breg9 = 0x79,
220
  DW_OP_breg10 = 0x7A,
221
  DW_OP_breg11 = 0x7B,
222
  DW_OP_breg12 = 0x7C,
223
  DW_OP_breg13 = 0x7D,
224
  DW_OP_breg14 = 0x7E,
225
  DW_OP_breg15 = 0x7F,
226
  DW_OP_breg16 = 0x80,
227
  DW_OP_breg17 = 0x81,
228
  DW_OP_breg18 = 0x82,
229
  DW_OP_breg19 = 0x83,
230
  DW_OP_breg20 = 0x84,
231
  DW_OP_breg21 = 0x85,
232
  DW_OP_breg22 = 0x86,
233
  DW_OP_breg23 = 0x87,
234
  DW_OP_breg24 = 0x88,
235
  DW_OP_breg25 = 0x89,
236
  DW_OP_breg26 = 0x8A,
237
  DW_OP_breg27 = 0x8B,
238
  DW_OP_breg28 = 0x8C,
239
  DW_OP_breg29 = 0x8D,
240
  DW_OP_breg30 = 0x8E,
241
  DW_OP_breg31 = 0x8F,
242
  DW_OP_regx = 0x90,
243
  DW_OP_fbreg = 0x91,
244
  DW_OP_bregx = 0x92,
245
  DW_OP_piece = 0x93,
246
  DW_OP_deref_size = 0x94,
247
  DW_OP_xderef_size = 0x95,
248
  DW_OP_nop = 0x96,
249
  DW_OP_push_object_addres = 0x97,
250
  DW_OP_call2 = 0x98,
251
  DW_OP_call4 = 0x99,
252
  DW_OP_call_ref = 0x9A,
253
  DW_OP_lo_user = 0xE0,
254
  DW_OP_APPLE_uninit = 0xF0,
255
  DW_OP_hi_user = 0xFF
256
};