Home | History | Annotate | Download | only in Support
      1 //===- llvm/Support/Dwarf.def - Dwarf definitions ---------------*- C++ -*-===//
      2 //
      3 //                     The LLVM Compiler Infrastructure
      4 //
      5 // This file is distributed under the University of Illinois Open Source
      6 // License. See LICENSE.TXT for details.
      7 //
      8 //===----------------------------------------------------------------------===//
      9 //
     10 // Macros for running through Dwarf enumerators.
     11 //
     12 //===----------------------------------------------------------------------===//
     13 
     14 // TODO: Add other DW-based macros.
     15 #if !(defined HANDLE_DW_TAG || defined HANDLE_DW_OP ||                         \
     16       defined HANDLE_DW_LANG || defined HANDLE_DW_ATE ||                       \
     17       defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_CC)
     18 #error "Missing macro definition of HANDLE_DW*"
     19 #endif
     20 
     21 #ifndef HANDLE_DW_TAG
     22 #define HANDLE_DW_TAG(ID, NAME)
     23 #endif
     24 
     25 #ifndef HANDLE_DW_OP
     26 #define HANDLE_DW_OP(ID, NAME)
     27 #endif
     28 
     29 #ifndef HANDLE_DW_LANG
     30 #define HANDLE_DW_LANG(ID, NAME)
     31 #endif
     32 
     33 #ifndef HANDLE_DW_ATE
     34 #define HANDLE_DW_ATE(ID, NAME)
     35 #endif
     36 
     37 #ifndef HANDLE_DW_VIRTUALITY
     38 #define HANDLE_DW_VIRTUALITY(ID, NAME)
     39 #endif
     40 
     41 #ifndef HANDLE_DW_CC
     42 #define HANDLE_DW_CC(ID, NAME)
     43 #endif
     44 
     45 
     46 HANDLE_DW_TAG(0x0001, array_type)
     47 HANDLE_DW_TAG(0x0002, class_type)
     48 HANDLE_DW_TAG(0x0003, entry_point)
     49 HANDLE_DW_TAG(0x0004, enumeration_type)
     50 HANDLE_DW_TAG(0x0005, formal_parameter)
     51 HANDLE_DW_TAG(0x0008, imported_declaration)
     52 HANDLE_DW_TAG(0x000a, label)
     53 HANDLE_DW_TAG(0x000b, lexical_block)
     54 HANDLE_DW_TAG(0x000d, member)
     55 HANDLE_DW_TAG(0x000f, pointer_type)
     56 HANDLE_DW_TAG(0x0010, reference_type)
     57 HANDLE_DW_TAG(0x0011, compile_unit)
     58 HANDLE_DW_TAG(0x0012, string_type)
     59 HANDLE_DW_TAG(0x0013, structure_type)
     60 HANDLE_DW_TAG(0x0015, subroutine_type)
     61 HANDLE_DW_TAG(0x0016, typedef)
     62 HANDLE_DW_TAG(0x0017, union_type)
     63 HANDLE_DW_TAG(0x0018, unspecified_parameters)
     64 HANDLE_DW_TAG(0x0019, variant)
     65 HANDLE_DW_TAG(0x001a, common_block)
     66 HANDLE_DW_TAG(0x001b, common_inclusion)
     67 HANDLE_DW_TAG(0x001c, inheritance)
     68 HANDLE_DW_TAG(0x001d, inlined_subroutine)
     69 HANDLE_DW_TAG(0x001e, module)
     70 HANDLE_DW_TAG(0x001f, ptr_to_member_type)
     71 HANDLE_DW_TAG(0x0020, set_type)
     72 HANDLE_DW_TAG(0x0021, subrange_type)
     73 HANDLE_DW_TAG(0x0022, with_stmt)
     74 HANDLE_DW_TAG(0x0023, access_declaration)
     75 HANDLE_DW_TAG(0x0024, base_type)
     76 HANDLE_DW_TAG(0x0025, catch_block)
     77 HANDLE_DW_TAG(0x0026, const_type)
     78 HANDLE_DW_TAG(0x0027, constant)
     79 HANDLE_DW_TAG(0x0028, enumerator)
     80 HANDLE_DW_TAG(0x0029, file_type)
     81 HANDLE_DW_TAG(0x002a, friend)
     82 HANDLE_DW_TAG(0x002b, namelist)
     83 HANDLE_DW_TAG(0x002c, namelist_item)
     84 HANDLE_DW_TAG(0x002d, packed_type)
     85 HANDLE_DW_TAG(0x002e, subprogram)
     86 HANDLE_DW_TAG(0x002f, template_type_parameter)
     87 HANDLE_DW_TAG(0x0030, template_value_parameter)
     88 HANDLE_DW_TAG(0x0031, thrown_type)
     89 HANDLE_DW_TAG(0x0032, try_block)
     90 HANDLE_DW_TAG(0x0033, variant_part)
     91 HANDLE_DW_TAG(0x0034, variable)
     92 HANDLE_DW_TAG(0x0035, volatile_type)
     93 HANDLE_DW_TAG(0x0036, dwarf_procedure)
     94 HANDLE_DW_TAG(0x0037, restrict_type)
     95 HANDLE_DW_TAG(0x0038, interface_type)
     96 HANDLE_DW_TAG(0x0039, namespace)
     97 HANDLE_DW_TAG(0x003a, imported_module)
     98 HANDLE_DW_TAG(0x003b, unspecified_type)
     99 HANDLE_DW_TAG(0x003c, partial_unit)
    100 HANDLE_DW_TAG(0x003d, imported_unit)
    101 HANDLE_DW_TAG(0x003f, condition)
    102 HANDLE_DW_TAG(0x0040, shared_type)
    103 HANDLE_DW_TAG(0x0041, type_unit)
    104 HANDLE_DW_TAG(0x0042, rvalue_reference_type)
    105 HANDLE_DW_TAG(0x0043, template_alias)
    106 
    107 // New in DWARF v5.
    108 HANDLE_DW_TAG(0x0044, coarray_type)
    109 HANDLE_DW_TAG(0x0045, generic_subrange)
    110 HANDLE_DW_TAG(0x0046, dynamic_type)
    111 
    112 // User-defined tags.
    113 HANDLE_DW_TAG(0x4081, MIPS_loop)
    114 HANDLE_DW_TAG(0x4101, format_label)
    115 HANDLE_DW_TAG(0x4102, function_template)
    116 HANDLE_DW_TAG(0x4103, class_template)
    117 HANDLE_DW_TAG(0x4106, GNU_template_template_param)
    118 HANDLE_DW_TAG(0x4107, GNU_template_parameter_pack)
    119 HANDLE_DW_TAG(0x4108, GNU_formal_parameter_pack)
    120 HANDLE_DW_TAG(0x4200, APPLE_property)
    121 HANDLE_DW_TAG(0xb000, BORLAND_property)
    122 HANDLE_DW_TAG(0xb001, BORLAND_Delphi_string)
    123 HANDLE_DW_TAG(0xb002, BORLAND_Delphi_dynamic_array)
    124 HANDLE_DW_TAG(0xb003, BORLAND_Delphi_set)
    125 HANDLE_DW_TAG(0xb004, BORLAND_Delphi_variant)
    126 
    127 HANDLE_DW_OP(0x03, addr)
    128 HANDLE_DW_OP(0x06, deref)
    129 HANDLE_DW_OP(0x08, const1u)
    130 HANDLE_DW_OP(0x09, const1s)
    131 HANDLE_DW_OP(0x0a, const2u)
    132 HANDLE_DW_OP(0x0b, const2s)
    133 HANDLE_DW_OP(0x0c, const4u)
    134 HANDLE_DW_OP(0x0d, const4s)
    135 HANDLE_DW_OP(0x0e, const8u)
    136 HANDLE_DW_OP(0x0f, const8s)
    137 HANDLE_DW_OP(0x10, constu)
    138 HANDLE_DW_OP(0x11, consts)
    139 HANDLE_DW_OP(0x12, dup)
    140 HANDLE_DW_OP(0x13, drop)
    141 HANDLE_DW_OP(0x14, over)
    142 HANDLE_DW_OP(0x15, pick)
    143 HANDLE_DW_OP(0x16, swap)
    144 HANDLE_DW_OP(0x17, rot)
    145 HANDLE_DW_OP(0x18, xderef)
    146 HANDLE_DW_OP(0x19, abs)
    147 HANDLE_DW_OP(0x1a, and)
    148 HANDLE_DW_OP(0x1b, div)
    149 HANDLE_DW_OP(0x1c, minus)
    150 HANDLE_DW_OP(0x1d, mod)
    151 HANDLE_DW_OP(0x1e, mul)
    152 HANDLE_DW_OP(0x1f, neg)
    153 HANDLE_DW_OP(0x20, not)
    154 HANDLE_DW_OP(0x21, or )
    155 HANDLE_DW_OP(0x22, plus)
    156 HANDLE_DW_OP(0x23, plus_uconst)
    157 HANDLE_DW_OP(0x24, shl)
    158 HANDLE_DW_OP(0x25, shr)
    159 HANDLE_DW_OP(0x26, shra)
    160 HANDLE_DW_OP(0x27, xor)
    161 HANDLE_DW_OP(0x2f, skip)
    162 HANDLE_DW_OP(0x28, bra)
    163 HANDLE_DW_OP(0x29, eq)
    164 HANDLE_DW_OP(0x2a, ge)
    165 HANDLE_DW_OP(0x2b, gt)
    166 HANDLE_DW_OP(0x2c, le)
    167 HANDLE_DW_OP(0x2d, lt)
    168 HANDLE_DW_OP(0x2e, ne)
    169 HANDLE_DW_OP(0x30, lit0)
    170 HANDLE_DW_OP(0x31, lit1)
    171 HANDLE_DW_OP(0x32, lit2)
    172 HANDLE_DW_OP(0x33, lit3)
    173 HANDLE_DW_OP(0x34, lit4)
    174 HANDLE_DW_OP(0x35, lit5)
    175 HANDLE_DW_OP(0x36, lit6)
    176 HANDLE_DW_OP(0x37, lit7)
    177 HANDLE_DW_OP(0x38, lit8)
    178 HANDLE_DW_OP(0x39, lit9)
    179 HANDLE_DW_OP(0x3a, lit10)
    180 HANDLE_DW_OP(0x3b, lit11)
    181 HANDLE_DW_OP(0x3c, lit12)
    182 HANDLE_DW_OP(0x3d, lit13)
    183 HANDLE_DW_OP(0x3e, lit14)
    184 HANDLE_DW_OP(0x3f, lit15)
    185 HANDLE_DW_OP(0x40, lit16)
    186 HANDLE_DW_OP(0x41, lit17)
    187 HANDLE_DW_OP(0x42, lit18)
    188 HANDLE_DW_OP(0x43, lit19)
    189 HANDLE_DW_OP(0x44, lit20)
    190 HANDLE_DW_OP(0x45, lit21)
    191 HANDLE_DW_OP(0x46, lit22)
    192 HANDLE_DW_OP(0x47, lit23)
    193 HANDLE_DW_OP(0x48, lit24)
    194 HANDLE_DW_OP(0x49, lit25)
    195 HANDLE_DW_OP(0x4a, lit26)
    196 HANDLE_DW_OP(0x4b, lit27)
    197 HANDLE_DW_OP(0x4c, lit28)
    198 HANDLE_DW_OP(0x4d, lit29)
    199 HANDLE_DW_OP(0x4e, lit30)
    200 HANDLE_DW_OP(0x4f, lit31)
    201 HANDLE_DW_OP(0x50, reg0)
    202 HANDLE_DW_OP(0x51, reg1)
    203 HANDLE_DW_OP(0x52, reg2)
    204 HANDLE_DW_OP(0x53, reg3)
    205 HANDLE_DW_OP(0x54, reg4)
    206 HANDLE_DW_OP(0x55, reg5)
    207 HANDLE_DW_OP(0x56, reg6)
    208 HANDLE_DW_OP(0x57, reg7)
    209 HANDLE_DW_OP(0x58, reg8)
    210 HANDLE_DW_OP(0x59, reg9)
    211 HANDLE_DW_OP(0x5a, reg10)
    212 HANDLE_DW_OP(0x5b, reg11)
    213 HANDLE_DW_OP(0x5c, reg12)
    214 HANDLE_DW_OP(0x5d, reg13)
    215 HANDLE_DW_OP(0x5e, reg14)
    216 HANDLE_DW_OP(0x5f, reg15)
    217 HANDLE_DW_OP(0x60, reg16)
    218 HANDLE_DW_OP(0x61, reg17)
    219 HANDLE_DW_OP(0x62, reg18)
    220 HANDLE_DW_OP(0x63, reg19)
    221 HANDLE_DW_OP(0x64, reg20)
    222 HANDLE_DW_OP(0x65, reg21)
    223 HANDLE_DW_OP(0x66, reg22)
    224 HANDLE_DW_OP(0x67, reg23)
    225 HANDLE_DW_OP(0x68, reg24)
    226 HANDLE_DW_OP(0x69, reg25)
    227 HANDLE_DW_OP(0x6a, reg26)
    228 HANDLE_DW_OP(0x6b, reg27)
    229 HANDLE_DW_OP(0x6c, reg28)
    230 HANDLE_DW_OP(0x6d, reg29)
    231 HANDLE_DW_OP(0x6e, reg30)
    232 HANDLE_DW_OP(0x6f, reg31)
    233 HANDLE_DW_OP(0x70, breg0)
    234 HANDLE_DW_OP(0x71, breg1)
    235 HANDLE_DW_OP(0x72, breg2)
    236 HANDLE_DW_OP(0x73, breg3)
    237 HANDLE_DW_OP(0x74, breg4)
    238 HANDLE_DW_OP(0x75, breg5)
    239 HANDLE_DW_OP(0x76, breg6)
    240 HANDLE_DW_OP(0x77, breg7)
    241 HANDLE_DW_OP(0x78, breg8)
    242 HANDLE_DW_OP(0x79, breg9)
    243 HANDLE_DW_OP(0x7a, breg10)
    244 HANDLE_DW_OP(0x7b, breg11)
    245 HANDLE_DW_OP(0x7c, breg12)
    246 HANDLE_DW_OP(0x7d, breg13)
    247 HANDLE_DW_OP(0x7e, breg14)
    248 HANDLE_DW_OP(0x7f, breg15)
    249 HANDLE_DW_OP(0x80, breg16)
    250 HANDLE_DW_OP(0x81, breg17)
    251 HANDLE_DW_OP(0x82, breg18)
    252 HANDLE_DW_OP(0x83, breg19)
    253 HANDLE_DW_OP(0x84, breg20)
    254 HANDLE_DW_OP(0x85, breg21)
    255 HANDLE_DW_OP(0x86, breg22)
    256 HANDLE_DW_OP(0x87, breg23)
    257 HANDLE_DW_OP(0x88, breg24)
    258 HANDLE_DW_OP(0x89, breg25)
    259 HANDLE_DW_OP(0x8a, breg26)
    260 HANDLE_DW_OP(0x8b, breg27)
    261 HANDLE_DW_OP(0x8c, breg28)
    262 HANDLE_DW_OP(0x8d, breg29)
    263 HANDLE_DW_OP(0x8e, breg30)
    264 HANDLE_DW_OP(0x8f, breg31)
    265 HANDLE_DW_OP(0x90, regx)
    266 HANDLE_DW_OP(0x91, fbreg)
    267 HANDLE_DW_OP(0x92, bregx)
    268 HANDLE_DW_OP(0x93, piece)
    269 HANDLE_DW_OP(0x94, deref_size)
    270 HANDLE_DW_OP(0x95, xderef_size)
    271 HANDLE_DW_OP(0x96, nop)
    272 HANDLE_DW_OP(0x97, push_object_address)
    273 HANDLE_DW_OP(0x98, call2)
    274 HANDLE_DW_OP(0x99, call4)
    275 HANDLE_DW_OP(0x9a, call_ref)
    276 HANDLE_DW_OP(0x9b, form_tls_address)
    277 HANDLE_DW_OP(0x9c, call_frame_cfa)
    278 HANDLE_DW_OP(0x9d, bit_piece)
    279 HANDLE_DW_OP(0x9e, implicit_value)
    280 HANDLE_DW_OP(0x9f, stack_value)
    281 
    282 // Extensions for GNU-style thread-local storage.
    283 HANDLE_DW_OP(0xe0, GNU_push_tls_address)
    284 
    285 // Extensions for Fission proposal.
    286 HANDLE_DW_OP(0xfb, GNU_addr_index)
    287 HANDLE_DW_OP(0xfc, GNU_const_index)
    288 
    289 // DWARF languages.
    290 HANDLE_DW_LANG(0x0001, C89)
    291 HANDLE_DW_LANG(0x0002, C)
    292 HANDLE_DW_LANG(0x0003, Ada83)
    293 HANDLE_DW_LANG(0x0004, C_plus_plus)
    294 HANDLE_DW_LANG(0x0005, Cobol74)
    295 HANDLE_DW_LANG(0x0006, Cobol85)
    296 HANDLE_DW_LANG(0x0007, Fortran77)
    297 HANDLE_DW_LANG(0x0008, Fortran90)
    298 HANDLE_DW_LANG(0x0009, Pascal83)
    299 HANDLE_DW_LANG(0x000a, Modula2)
    300 HANDLE_DW_LANG(0x000b, Java)
    301 HANDLE_DW_LANG(0x000c, C99)
    302 HANDLE_DW_LANG(0x000d, Ada95)
    303 HANDLE_DW_LANG(0x000e, Fortran95)
    304 HANDLE_DW_LANG(0x000f, PLI)
    305 HANDLE_DW_LANG(0x0010, ObjC)
    306 HANDLE_DW_LANG(0x0011, ObjC_plus_plus)
    307 HANDLE_DW_LANG(0x0012, UPC)
    308 HANDLE_DW_LANG(0x0013, D)
    309 
    310 // New in DWARF 5:
    311 HANDLE_DW_LANG(0x0014, Python)
    312 HANDLE_DW_LANG(0x0015, OpenCL)
    313 HANDLE_DW_LANG(0x0016, Go)
    314 HANDLE_DW_LANG(0x0017, Modula3)
    315 HANDLE_DW_LANG(0x0018, Haskell)
    316 HANDLE_DW_LANG(0x0019, C_plus_plus_03)
    317 HANDLE_DW_LANG(0x001a, C_plus_plus_11)
    318 HANDLE_DW_LANG(0x001b, OCaml)
    319 HANDLE_DW_LANG(0x001c, Rust)
    320 HANDLE_DW_LANG(0x001d, C11)
    321 HANDLE_DW_LANG(0x001e, Swift)
    322 HANDLE_DW_LANG(0x001f, Julia)
    323 HANDLE_DW_LANG(0x0020, Dylan)
    324 HANDLE_DW_LANG(0x0021, C_plus_plus_14)
    325 HANDLE_DW_LANG(0x0022, Fortran03)
    326 HANDLE_DW_LANG(0x0023, Fortran08)
    327 HANDLE_DW_LANG(0x8001, Mips_Assembler)
    328 HANDLE_DW_LANG(0x8e57, GOOGLE_RenderScript)
    329 HANDLE_DW_LANG(0xb000, BORLAND_Delphi)
    330 
    331 // DWARF attribute type encodings.
    332 HANDLE_DW_ATE(0x01, address)
    333 HANDLE_DW_ATE(0x02, boolean)
    334 HANDLE_DW_ATE(0x03, complex_float)
    335 HANDLE_DW_ATE(0x04, float)
    336 HANDLE_DW_ATE(0x05, signed)
    337 HANDLE_DW_ATE(0x06, signed_char)
    338 HANDLE_DW_ATE(0x07, unsigned)
    339 HANDLE_DW_ATE(0x08, unsigned_char)
    340 HANDLE_DW_ATE(0x09, imaginary_float)
    341 HANDLE_DW_ATE(0x0a, packed_decimal)
    342 HANDLE_DW_ATE(0x0b, numeric_string)
    343 HANDLE_DW_ATE(0x0c, edited)
    344 HANDLE_DW_ATE(0x0d, signed_fixed)
    345 HANDLE_DW_ATE(0x0e, unsigned_fixed)
    346 HANDLE_DW_ATE(0x0f, decimal_float)
    347 HANDLE_DW_ATE(0x10, UTF)
    348 
    349 // DWARF virtuality codes.
    350 HANDLE_DW_VIRTUALITY(0x00, none)
    351 HANDLE_DW_VIRTUALITY(0x01, virtual)
    352 HANDLE_DW_VIRTUALITY(0x02, pure_virtual)
    353 
    354 // DWARF calling convention codes.
    355 HANDLE_DW_CC(0x01, normal)
    356 HANDLE_DW_CC(0x02, program)
    357 HANDLE_DW_CC(0x03, nocall)
    358 HANDLE_DW_CC(0x41, GNU_borland_fastcall_i386)
    359 HANDLE_DW_CC(0xb0, BORLAND_safecall)
    360 HANDLE_DW_CC(0xb1, BORLAND_stdcall)
    361 HANDLE_DW_CC(0xb2, BORLAND_pascal)
    362 HANDLE_DW_CC(0xb3, BORLAND_msfastcall)
    363 HANDLE_DW_CC(0xb4, BORLAND_msreturn)
    364 HANDLE_DW_CC(0xb5, BORLAND_thiscall)
    365 HANDLE_DW_CC(0xb6, BORLAND_fastcall)
    366 HANDLE_DW_CC(0xc0, LLVM_vectorcall)
    367 
    368 #undef HANDLE_DW_TAG
    369 #undef HANDLE_DW_OP
    370 #undef HANDLE_DW_LANG
    371 #undef HANDLE_DW_ATE
    372 #undef HANDLE_DW_VIRTUALITY
    373 #undef HANDLE_DW_CC
    374