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
134 DW_CC_pass_by_reference
= 0x4
135 DW_CC_pass_by_valuee
= 0x5
144 # Line program opcodes
147 DW_LNS_advance_pc
= 0x02
148 DW_LNS_advance_line
= 0x03
149 DW_LNS_set_file
= 0x04
150 DW_LNS_set_column
= 0x05
151 DW_LNS_negate_stmt
= 0x06
152 DW_LNS_set_basic_block
= 0x07
153 DW_LNS_const_add_pc
= 0x08
154 DW_LNS_fixed_advance_pc
= 0x09
155 DW_LNS_set_prologue_end
= 0x0a
156 DW_LNS_set_epilogue_begin
= 0x0b
157 DW_LNS_set_isa
= 0x0c
158 DW_LNE_end_sequence
= 0x01
159 DW_LNE_set_address
= 0x02
160 DW_LNE_define_file
= 0x03
161 DW_LNE_set_discriminator
= 0x04
162 DW_LNE_lo_user
= 0x80
163 DW_LNE_hi_user
= 0xff
165 # Line program header content types
168 DW_LNCT_directory_index
= 0x02
169 DW_LNCT_timestamp
= 0x03
172 DW_LNCT_lo_user
= 0x2000
173 DW_LNCT_hi_user
= 0x3fff
175 # Call frame instructions
177 # Note that the first 3 instructions have the so-called "primary opcode"
178 # (as described in DWARFv3 7.23), so only their highest 2 bits take part
179 # in the opcode decoding. They are kept as constants with the low bits masked
180 # out, and the callframe module knows how to handle this.
181 # The other instructions use an "extended opcode" encoded just in the low 6
182 # bits, with the high 2 bits, so these constants are exactly as they would
183 # appear in an actual file.
185 DW_CFA_advance_loc
= 0b01000000
186 DW_CFA_offset
= 0b10000000
187 DW_CFA_restore
= 0b11000000
189 DW_CFA_set_loc
= 0x01
190 DW_CFA_advance_loc1
= 0x02
191 DW_CFA_advance_loc2
= 0x03
192 DW_CFA_advance_loc4
= 0x04
193 DW_CFA_offset_extended
= 0x05
194 DW_CFA_restore_extended
= 0x06
195 DW_CFA_undefined
= 0x07
196 DW_CFA_same_value
= 0x08
197 DW_CFA_register
= 0x09
198 DW_CFA_remember_state
= 0x0a
199 DW_CFA_restore_state
= 0x0b
200 DW_CFA_def_cfa
= 0x0c
201 DW_CFA_def_cfa_register
= 0x0d
202 DW_CFA_def_cfa_offset
= 0x0e
203 DW_CFA_def_cfa_expression
= 0x0f
204 DW_CFA_expression
= 0x10
205 DW_CFA_offset_extended_sf
= 0x11
206 DW_CFA_def_cfa_sf
= 0x12
207 DW_CFA_def_cfa_offset_sf
= 0x13
208 DW_CFA_val_offset
= 0x14
209 DW_CFA_val_offset_sf
= 0x15
210 DW_CFA_val_expression
= 0x16
211 DW_CFA_GNU_args_size
= 0x2e
214 # Compilation unit types
216 # DWARFv5 introduces the "unit_type" field to each CU header, allowing
217 # individual CUs to indicate whether they're complete, partial, and so forth.
218 # See DWARFv5 3.1 ("Unit Entries") and 7.5.1 ("Unit Headers").
222 DW_UT_skeleton
= 0x04
223 DW_UT_split_compile
= 0x05
224 DW_UT_split_type
= 0x06