1 #-------------------------------------------------------------------------------
2 # elftools: dwarf/constants.py
6 # Eli Bendersky (eliben@gmail.com)
7 # This code is in the public domain
8 #-------------------------------------------------------------------------------
12 DW_INL_not_inlined
= 0
14 DW_INL_declared_not_inlined
= 2
15 DW_INL_declared_inlined
= 3
22 DW_LANG_Ada83
= 0x0003
23 DW_LANG_C_plus_plus
= 0x0004
24 DW_LANG_Cobol74
= 0x0005
25 DW_LANG_Cobol85
= 0x0006
26 DW_LANG_Fortran77
= 0x0007
27 DW_LANG_Fortran90
= 0x0008
28 DW_LANG_Pascal83
= 0x0009
29 DW_LANG_Modula2
= 0x000a
32 DW_LANG_Ada95
= 0x000d
33 DW_LANG_Fortran95
= 0x000e
36 DW_LANG_ObjC_plus_plus
= 0x0011
39 DW_LANG_Python
= 0x0014
40 DW_LANG_OpenCL
= 0x0015
42 DW_LANG_Modula3
= 0x0017
43 DW_LANG_Haskell
= 0x0018
44 DW_LANG_C_plus_plus_03
= 0x0019
45 DW_LANG_C_plus_plus_11
= 0x001a
46 DW_LANG_OCaml
= 0x001b
49 DW_LANG_Swift
= 0x001e
50 DW_LANG_Julia
= 0x001f
51 DW_LANG_Dylan
= 0x0020
52 DW_LANG_C_plus_plus_14
= 0x0021
53 DW_LANG_Fortran03
= 0x0022
54 DW_LANG_Fortran08
= 0x0023
55 DW_LANG_RenderScript
= 0x0024
56 DW_LANG_BLISS
= 0x0025
57 DW_LANG_Mips_Assembler
= 0x8001
59 DW_LANG_HP_Bliss
= 0x8003
60 DW_LANG_HP_Basic91
= 0x8004
61 DW_LANG_HP_Pascal91
= 0x8005
62 DW_LANG_HP_IMacro
= 0x8006
63 DW_LANG_HP_Assembler
= 0x8007
64 DW_LANG_GOOGLE_RenderScript
= 0x8e57
65 DW_LANG_BORLAND_Delphi
= 0xb000
73 DW_ATE_complex_float
= 0x3
76 DW_ATE_signed_char
= 0x6
78 DW_ATE_unsigned_char
= 0x8
79 DW_ATE_imaginary_float
= 0x9
80 DW_ATE_packed_decimal
= 0xa
81 DW_ATE_numeric_string
= 0xb
83 DW_ATE_signed_fixed
= 0xd
84 DW_ATE_unsigned_fixed
= 0xe
85 DW_ATE_decimal_float
= 0xf
91 DW_ATE_HP_float80
= 0x80
92 DW_ATE_HP_complex_float80
= 0x81
93 DW_ATE_HP_float128
= 0x82
94 DW_ATE_HP_complex_float128
= 0x83
95 DW_ATE_HP_floathpintel
= 0x84
96 DW_ATE_HP_imaginary_float80
= 0x85
97 DW_ATE_HP_imaginary_float128
= 0x86
103 DW_ACCESS_protected
= 2
104 DW_ACCESS_private
= 3
116 DW_VIRTUALITY_none
= 0
117 DW_VIRTUALITY_virtual
= 1
118 DW_VIRTUALITY_pure_virtual
= 2
123 DW_ID_case_sensitive
= 0
126 DW_ID_case_insensitive
= 3
142 # Line program opcodes
145 DW_LNS_advance_pc
= 0x02
146 DW_LNS_advance_line
= 0x03
147 DW_LNS_set_file
= 0x04
148 DW_LNS_set_column
= 0x05
149 DW_LNS_negate_stmt
= 0x06
150 DW_LNS_set_basic_block
= 0x07
151 DW_LNS_const_add_pc
= 0x08
152 DW_LNS_fixed_advance_pc
= 0x09
153 DW_LNS_set_prologue_end
= 0x0a
154 DW_LNS_set_epilogue_begin
= 0x0b
155 DW_LNS_set_isa
= 0x0c
156 DW_LNE_end_sequence
= 0x01
157 DW_LNE_set_address
= 0x02
158 DW_LNE_define_file
= 0x03
159 DW_LNE_set_discriminator
= 0x04
160 DW_LNE_lo_user
= 0x80
161 DW_LNE_hi_user
= 0xff
163 # Line program header content types
166 DW_LNCT_directory_index
= 0x02
167 DW_LNCT_timestamp
= 0x03
170 DW_LNCT_lo_user
= 0x2000
171 DW_LNCT_hi_user
= 0x3fff
173 # Call frame instructions
175 # Note that the first 3 instructions have the so-called "primary opcode"
176 # (as described in DWARFv3 7.23), so only their highest 2 bits take part
177 # in the opcode decoding. They are kept as constants with the low bits masked
178 # out, and the callframe module knows how to handle this.
179 # The other instructions use an "extended opcode" encoded just in the low 6
180 # bits, with the high 2 bits, so these constants are exactly as they would
181 # appear in an actual file.
183 DW_CFA_advance_loc
= 0b01000000
184 DW_CFA_offset
= 0b10000000
185 DW_CFA_restore
= 0b11000000
187 DW_CFA_set_loc
= 0x01
188 DW_CFA_advance_loc1
= 0x02
189 DW_CFA_advance_loc2
= 0x03
190 DW_CFA_advance_loc4
= 0x04
191 DW_CFA_offset_extended
= 0x05
192 DW_CFA_restore_extended
= 0x06
193 DW_CFA_undefined
= 0x07
194 DW_CFA_same_value
= 0x08
195 DW_CFA_register
= 0x09
196 DW_CFA_remember_state
= 0x0a
197 DW_CFA_restore_state
= 0x0b
198 DW_CFA_def_cfa
= 0x0c
199 DW_CFA_def_cfa_register
= 0x0d
200 DW_CFA_def_cfa_offset
= 0x0e
201 DW_CFA_def_cfa_expression
= 0x0f
202 DW_CFA_expression
= 0x10
203 DW_CFA_offset_extended_sf
= 0x11
204 DW_CFA_def_cfa_sf
= 0x12
205 DW_CFA_def_cfa_offset_sf
= 0x13
206 DW_CFA_val_offset
= 0x14
207 DW_CFA_val_offset_sf
= 0x15
208 DW_CFA_val_expression
= 0x16
209 DW_CFA_GNU_args_size
= 0x2e