1//===- llvm/Support/Dwarf.def - Dwarf definitions ---------------*- C++ -*-===// 2// 3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4// See https://llvm.org/LICENSE.txt for license information. 5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// Macros for running through Dwarf enumerators. 10// 11//===----------------------------------------------------------------------===// 12 13// TODO: Add other DW-based macros. 14#if !( \ 15 defined HANDLE_DW_TAG || defined HANDLE_DW_AT || defined HANDLE_DW_FORM || \ 16 defined HANDLE_DW_OP || defined HANDLE_DW_LANG || defined HANDLE_DW_ATE || \ 17 defined HANDLE_DW_VIRTUALITY || defined HANDLE_DW_DEFAULTED || \ 18 defined HANDLE_DW_CC || defined HANDLE_DW_LNS || defined HANDLE_DW_LNE || \ 19 defined HANDLE_DW_LNCT || defined HANDLE_DW_MACRO || \ 20 defined HANDLE_DW_RLE || defined HANDLE_DW_LLE || \ 21 (defined HANDLE_DW_CFA && defined HANDLE_DW_CFA_PRED) || \ 22 defined HANDLE_DW_APPLE_PROPERTY || defined HANDLE_DW_UT || \ 23 defined HANDLE_DWARF_SECTION || defined HANDLE_DW_IDX || \ 24 defined HANDLE_DW_END) 25#error "Missing macro definition of HANDLE_DW*" 26#endif 27 28#ifndef HANDLE_DW_TAG 29#define HANDLE_DW_TAG(ID, NAME, VERSION, VENDOR, KIND) 30#endif 31 32// Note that DW_KIND is not a DWARF concept, but rather a way for us to 33// generate a list of tags that belong together. 34#ifndef DW_KIND_NONE 35#define DW_KIND_NONE 0 36#endif 37 38#ifndef DW_KIND_TYPE 39#define DW_KIND_TYPE 1 40#endif 41 42#ifndef HANDLE_DW_AT 43#define HANDLE_DW_AT(ID, NAME, VERSION, VENDOR) 44#endif 45 46#ifndef HANDLE_DW_FORM 47#define HANDLE_DW_FORM(ID, NAME, VERSION, VENDOR) 48#endif 49 50#ifndef HANDLE_DW_OP 51#define HANDLE_DW_OP(ID, NAME, VERSION, VENDOR) 52#endif 53 54#ifndef HANDLE_DW_LANG 55#define HANDLE_DW_LANG(ID, NAME, LOWER_BOUND, VERSION, VENDOR) 56#endif 57 58#ifndef HANDLE_DW_ATE 59#define HANDLE_DW_ATE(ID, NAME, VERSION, VENDOR) 60#endif 61 62#ifndef HANDLE_DW_VIRTUALITY 63#define HANDLE_DW_VIRTUALITY(ID, NAME) 64#endif 65 66#ifndef HANDLE_DW_DEFAULTED 67#define HANDLE_DW_DEFAULTED(ID, NAME) 68#endif 69 70#ifndef HANDLE_DW_CC 71#define HANDLE_DW_CC(ID, NAME) 72#endif 73 74#ifndef HANDLE_DW_LNS 75#define HANDLE_DW_LNS(ID, NAME) 76#endif 77 78#ifndef HANDLE_DW_LNE 79#define HANDLE_DW_LNE(ID, NAME) 80#endif 81 82#ifndef HANDLE_DW_LNCT 83#define HANDLE_DW_LNCT(ID, NAME) 84#endif 85 86#ifndef HANDLE_DW_MACRO 87#define HANDLE_DW_MACRO(ID, NAME) 88#endif 89 90#ifndef HANDLE_DW_RLE 91#define HANDLE_DW_RLE(ID, NAME) 92#endif 93 94#ifndef HANDLE_DW_LLE 95#define HANDLE_DW_LLE(ID, NAME) 96#endif 97 98#ifndef HANDLE_DW_CFA 99#define HANDLE_DW_CFA(ID, NAME) 100#endif 101 102#ifndef HANDLE_DW_CFA_PRED 103#define HANDLE_DW_CFA_PRED(ID, NAME, PRED) 104#endif 105 106#ifndef HANDLE_DW_APPLE_PROPERTY 107#define HANDLE_DW_APPLE_PROPERTY(ID, NAME) 108#endif 109 110#ifndef HANDLE_DW_UT 111#define HANDLE_DW_UT(ID, NAME) 112#endif 113 114#ifndef HANDLE_DWARF_SECTION 115#define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) 116#endif 117 118#ifndef HANDLE_DW_IDX 119#define HANDLE_DW_IDX(ID, NAME) 120#endif 121 122#ifndef HANDLE_DW_END 123#define HANDLE_DW_END(ID, NAME) 124#endif 125 126HANDLE_DW_TAG(0x0000, null, 2, DWARF, DW_KIND_NONE) 127HANDLE_DW_TAG(0x0001, array_type, 2, DWARF, DW_KIND_TYPE) 128HANDLE_DW_TAG(0x0002, class_type, 2, DWARF, DW_KIND_TYPE) 129HANDLE_DW_TAG(0x0003, entry_point, 2, DWARF, DW_KIND_NONE) 130HANDLE_DW_TAG(0x0004, enumeration_type, 2, DWARF, DW_KIND_TYPE) 131HANDLE_DW_TAG(0x0005, formal_parameter, 2, DWARF, DW_KIND_NONE) 132HANDLE_DW_TAG(0x0008, imported_declaration, 2, DWARF, DW_KIND_NONE) 133HANDLE_DW_TAG(0x000a, label, 2, DWARF, DW_KIND_NONE) 134HANDLE_DW_TAG(0x000b, lexical_block, 2, DWARF, DW_KIND_NONE) 135HANDLE_DW_TAG(0x000d, member, 2, DWARF, DW_KIND_NONE) 136HANDLE_DW_TAG(0x000f, pointer_type, 2, DWARF, DW_KIND_TYPE) 137HANDLE_DW_TAG(0x0010, reference_type, 2, DWARF, DW_KIND_TYPE) 138HANDLE_DW_TAG(0x0011, compile_unit, 2, DWARF, DW_KIND_NONE) 139HANDLE_DW_TAG(0x0012, string_type, 2, DWARF, DW_KIND_TYPE) 140HANDLE_DW_TAG(0x0013, structure_type, 2, DWARF, DW_KIND_TYPE) 141HANDLE_DW_TAG(0x0015, subroutine_type, 2, DWARF, DW_KIND_TYPE) 142HANDLE_DW_TAG(0x0016, typedef, 2, DWARF, DW_KIND_TYPE) 143HANDLE_DW_TAG(0x0017, union_type, 2, DWARF, DW_KIND_TYPE) 144HANDLE_DW_TAG(0x0018, unspecified_parameters, 2, DWARF, DW_KIND_NONE) 145HANDLE_DW_TAG(0x0019, variant, 2, DWARF, DW_KIND_NONE) 146HANDLE_DW_TAG(0x001a, common_block, 2, DWARF, DW_KIND_NONE) 147HANDLE_DW_TAG(0x001b, common_inclusion, 2, DWARF, DW_KIND_NONE) 148HANDLE_DW_TAG(0x001c, inheritance, 2, DWARF, DW_KIND_NONE) 149HANDLE_DW_TAG(0x001d, inlined_subroutine, 2, DWARF, DW_KIND_NONE) 150HANDLE_DW_TAG(0x001e, module, 2, DWARF, DW_KIND_NONE) 151HANDLE_DW_TAG(0x001f, ptr_to_member_type, 2, DWARF, DW_KIND_TYPE) 152HANDLE_DW_TAG(0x0020, set_type, 2, DWARF, DW_KIND_NONE) 153HANDLE_DW_TAG(0x0021, subrange_type, 2, DWARF, DW_KIND_TYPE) 154HANDLE_DW_TAG(0x0022, with_stmt, 2, DWARF, DW_KIND_NONE) 155HANDLE_DW_TAG(0x0023, access_declaration, 2, DWARF, DW_KIND_NONE) 156HANDLE_DW_TAG(0x0024, base_type, 2, DWARF, DW_KIND_TYPE) 157HANDLE_DW_TAG(0x0025, catch_block, 2, DWARF, DW_KIND_NONE) 158HANDLE_DW_TAG(0x0026, const_type, 2, DWARF, DW_KIND_TYPE) 159HANDLE_DW_TAG(0x0027, constant, 2, DWARF, DW_KIND_NONE) 160HANDLE_DW_TAG(0x0028, enumerator, 2, DWARF, DW_KIND_NONE) 161HANDLE_DW_TAG(0x0029, file_type, 2, DWARF, DW_KIND_TYPE) 162HANDLE_DW_TAG(0x002a, friend, 2, DWARF, DW_KIND_NONE) 163HANDLE_DW_TAG(0x002b, namelist, 2, DWARF, DW_KIND_NONE) 164HANDLE_DW_TAG(0x002c, namelist_item, 2, DWARF, DW_KIND_NONE) 165HANDLE_DW_TAG(0x002d, packed_type, 2, DWARF, DW_KIND_TYPE) 166HANDLE_DW_TAG(0x002e, subprogram, 2, DWARF, DW_KIND_NONE) 167HANDLE_DW_TAG(0x002f, template_type_parameter, 2, DWARF, DW_KIND_NONE) 168HANDLE_DW_TAG(0x0030, template_value_parameter, 2, DWARF, DW_KIND_NONE) 169HANDLE_DW_TAG(0x0031, thrown_type, 2, DWARF, DW_KIND_TYPE) 170HANDLE_DW_TAG(0x0032, try_block, 2, DWARF, DW_KIND_NONE) 171HANDLE_DW_TAG(0x0033, variant_part, 2, DWARF, DW_KIND_NONE) 172HANDLE_DW_TAG(0x0034, variable, 2, DWARF, DW_KIND_NONE) 173HANDLE_DW_TAG(0x0035, volatile_type, 2, DWARF, DW_KIND_TYPE) 174// New in DWARF v3: 175HANDLE_DW_TAG(0x0036, dwarf_procedure, 3, DWARF, DW_KIND_NONE) 176HANDLE_DW_TAG(0x0037, restrict_type, 3, DWARF, DW_KIND_TYPE) 177HANDLE_DW_TAG(0x0038, interface_type, 3, DWARF, DW_KIND_TYPE) 178HANDLE_DW_TAG(0x0039, namespace, 3, DWARF, DW_KIND_NONE) 179HANDLE_DW_TAG(0x003a, imported_module, 3, DWARF, DW_KIND_NONE) 180HANDLE_DW_TAG(0x003b, unspecified_type, 3, DWARF, DW_KIND_TYPE) 181HANDLE_DW_TAG(0x003c, partial_unit, 3, DWARF, DW_KIND_NONE) 182HANDLE_DW_TAG(0x003d, imported_unit, 3, DWARF, DW_KIND_NONE) 183HANDLE_DW_TAG(0x003f, condition, 3, DWARF, DW_KIND_NONE) 184HANDLE_DW_TAG(0x0040, shared_type, 3, DWARF, DW_KIND_TYPE) 185// New in DWARF v4: 186HANDLE_DW_TAG(0x0041, type_unit, 4, DWARF, DW_KIND_NONE) 187HANDLE_DW_TAG(0x0042, rvalue_reference_type, 4, DWARF, DW_KIND_TYPE) 188HANDLE_DW_TAG(0x0043, template_alias, 4, DWARF, DW_KIND_NONE) 189// New in DWARF v5: 190HANDLE_DW_TAG(0x0044, coarray_type, 5, DWARF, DW_KIND_TYPE) 191HANDLE_DW_TAG(0x0045, generic_subrange, 5, DWARF, DW_KIND_NONE) 192HANDLE_DW_TAG(0x0046, dynamic_type, 5, DWARF, DW_KIND_TYPE) 193HANDLE_DW_TAG(0x0047, atomic_type, 5, DWARF, DW_KIND_TYPE) 194HANDLE_DW_TAG(0x0048, call_site, 5, DWARF, DW_KIND_NONE) 195HANDLE_DW_TAG(0x0049, call_site_parameter, 5, DWARF, DW_KIND_NONE) 196HANDLE_DW_TAG(0x004a, skeleton_unit, 5, DWARF, DW_KIND_NONE) 197HANDLE_DW_TAG(0x004b, immutable_type, 5, DWARF, DW_KIND_TYPE) 198// Vendor extensions: 199HANDLE_DW_TAG(0x4081, MIPS_loop, 0, MIPS, DW_KIND_NONE) 200HANDLE_DW_TAG(0x4101, format_label, 0, GNU, DW_KIND_NONE) 201HANDLE_DW_TAG(0x4102, function_template, 0, GNU, DW_KIND_NONE) 202HANDLE_DW_TAG(0x4103, class_template, 0, GNU, DW_KIND_NONE) 203HANDLE_DW_TAG(0x4106, GNU_template_template_param, 0, GNU, DW_KIND_NONE) 204HANDLE_DW_TAG(0x4107, GNU_template_parameter_pack, 0, GNU, DW_KIND_NONE) 205HANDLE_DW_TAG(0x4108, GNU_formal_parameter_pack, 0, GNU, DW_KIND_NONE) 206HANDLE_DW_TAG(0x4109, GNU_call_site, 0, GNU, DW_KIND_NONE) 207HANDLE_DW_TAG(0x410a, GNU_call_site_parameter, 0, GNU, DW_KIND_NONE) 208HANDLE_DW_TAG(0x4200, APPLE_property, 0, APPLE, DW_KIND_NONE) 209HANDLE_DW_TAG(0xb000, BORLAND_property, 0, BORLAND, DW_KIND_NONE) 210HANDLE_DW_TAG(0xb001, BORLAND_Delphi_string, 0, BORLAND, DW_KIND_TYPE) 211HANDLE_DW_TAG(0xb002, BORLAND_Delphi_dynamic_array, 0, BORLAND, DW_KIND_TYPE) 212HANDLE_DW_TAG(0xb003, BORLAND_Delphi_set, 0, BORLAND, DW_KIND_TYPE) 213HANDLE_DW_TAG(0xb004, BORLAND_Delphi_variant, 0, BORLAND, DW_KIND_TYPE) 214 215// Attributes. 216HANDLE_DW_AT(0x01, sibling, 2, DWARF) 217HANDLE_DW_AT(0x02, location, 2, DWARF) 218HANDLE_DW_AT(0x03, name, 2, DWARF) 219HANDLE_DW_AT(0x09, ordering, 2, DWARF) 220HANDLE_DW_AT(0x0b, byte_size, 2, DWARF) 221HANDLE_DW_AT(0x0c, bit_offset, 2, DWARF) 222HANDLE_DW_AT(0x0d, bit_size, 2, DWARF) 223HANDLE_DW_AT(0x10, stmt_list, 2, DWARF) 224HANDLE_DW_AT(0x11, low_pc, 2, DWARF) 225HANDLE_DW_AT(0x12, high_pc, 2, DWARF) 226HANDLE_DW_AT(0x13, language, 2, DWARF) 227HANDLE_DW_AT(0x15, discr, 2, DWARF) 228HANDLE_DW_AT(0x16, discr_value, 2, DWARF) 229HANDLE_DW_AT(0x17, visibility, 2, DWARF) 230HANDLE_DW_AT(0x18, import, 2, DWARF) 231HANDLE_DW_AT(0x19, string_length, 2, DWARF) 232HANDLE_DW_AT(0x1a, common_reference, 2, DWARF) 233HANDLE_DW_AT(0x1b, comp_dir, 2, DWARF) 234HANDLE_DW_AT(0x1c, const_value, 2, DWARF) 235HANDLE_DW_AT(0x1d, containing_type, 2, DWARF) 236HANDLE_DW_AT(0x1e, default_value, 2, DWARF) 237HANDLE_DW_AT(0x20, inline, 2, DWARF) 238HANDLE_DW_AT(0x21, is_optional, 2, DWARF) 239HANDLE_DW_AT(0x22, lower_bound, 2, DWARF) 240HANDLE_DW_AT(0x25, producer, 2, DWARF) 241HANDLE_DW_AT(0x27, prototyped, 2, DWARF) 242HANDLE_DW_AT(0x2a, return_addr, 2, DWARF) 243HANDLE_DW_AT(0x2c, start_scope, 2, DWARF) 244HANDLE_DW_AT(0x2e, bit_stride, 2, DWARF) 245HANDLE_DW_AT(0x2f, upper_bound, 2, DWARF) 246HANDLE_DW_AT(0x31, abstract_origin, 2, DWARF) 247HANDLE_DW_AT(0x32, accessibility, 2, DWARF) 248HANDLE_DW_AT(0x33, address_class, 2, DWARF) 249HANDLE_DW_AT(0x34, artificial, 2, DWARF) 250HANDLE_DW_AT(0x35, base_types, 2, DWARF) 251HANDLE_DW_AT(0x36, calling_convention, 2, DWARF) 252HANDLE_DW_AT(0x37, count, 2, DWARF) 253HANDLE_DW_AT(0x38, data_member_location, 2, DWARF) 254HANDLE_DW_AT(0x39, decl_column, 2, DWARF) 255HANDLE_DW_AT(0x3a, decl_file, 2, DWARF) 256HANDLE_DW_AT(0x3b, decl_line, 2, DWARF) 257HANDLE_DW_AT(0x3c, declaration, 2, DWARF) 258HANDLE_DW_AT(0x3d, discr_list, 2, DWARF) 259HANDLE_DW_AT(0x3e, encoding, 2, DWARF) 260HANDLE_DW_AT(0x3f, external, 2, DWARF) 261HANDLE_DW_AT(0x40, frame_base, 2, DWARF) 262HANDLE_DW_AT(0x41, friend, 2, DWARF) 263HANDLE_DW_AT(0x42, identifier_case, 2, DWARF) 264HANDLE_DW_AT(0x43, macro_info, 2, DWARF) 265HANDLE_DW_AT(0x44, namelist_item, 2, DWARF) 266HANDLE_DW_AT(0x45, priority, 2, DWARF) 267HANDLE_DW_AT(0x46, segment, 2, DWARF) 268HANDLE_DW_AT(0x47, specification, 2, DWARF) 269HANDLE_DW_AT(0x48, static_link, 2, DWARF) 270HANDLE_DW_AT(0x49, type, 2, DWARF) 271HANDLE_DW_AT(0x4a, use_location, 2, DWARF) 272HANDLE_DW_AT(0x4b, variable_parameter, 2, DWARF) 273HANDLE_DW_AT(0x4c, virtuality, 2, DWARF) 274HANDLE_DW_AT(0x4d, vtable_elem_location, 2, DWARF) 275// New in DWARF v3: 276HANDLE_DW_AT(0x4e, allocated, 3, DWARF) 277HANDLE_DW_AT(0x4f, associated, 3, DWARF) 278HANDLE_DW_AT(0x50, data_location, 3, DWARF) 279HANDLE_DW_AT(0x51, byte_stride, 3, DWARF) 280HANDLE_DW_AT(0x52, entry_pc, 3, DWARF) 281HANDLE_DW_AT(0x53, use_UTF8, 3, DWARF) 282HANDLE_DW_AT(0x54, extension, 3, DWARF) 283HANDLE_DW_AT(0x55, ranges, 3, DWARF) 284HANDLE_DW_AT(0x56, trampoline, 3, DWARF) 285HANDLE_DW_AT(0x57, call_column, 3, DWARF) 286HANDLE_DW_AT(0x58, call_file, 3, DWARF) 287HANDLE_DW_AT(0x59, call_line, 3, DWARF) 288HANDLE_DW_AT(0x5a, description, 3, DWARF) 289HANDLE_DW_AT(0x5b, binary_scale, 3, DWARF) 290HANDLE_DW_AT(0x5c, decimal_scale, 3, DWARF) 291HANDLE_DW_AT(0x5d, small, 3, DWARF) 292HANDLE_DW_AT(0x5e, decimal_sign, 3, DWARF) 293HANDLE_DW_AT(0x5f, digit_count, 3, DWARF) 294HANDLE_DW_AT(0x60, picture_string, 3, DWARF) 295HANDLE_DW_AT(0x61, mutable, 3, DWARF) 296HANDLE_DW_AT(0x62, threads_scaled, 3, DWARF) 297HANDLE_DW_AT(0x63, explicit, 3, DWARF) 298HANDLE_DW_AT(0x64, object_pointer, 3, DWARF) 299HANDLE_DW_AT(0x65, endianity, 3, DWARF) 300HANDLE_DW_AT(0x66, elemental, 3, DWARF) 301HANDLE_DW_AT(0x67, pure, 3, DWARF) 302HANDLE_DW_AT(0x68, recursive, 3, DWARF) 303// New in DWARF v4: 304HANDLE_DW_AT(0x69, signature, 4, DWARF) 305HANDLE_DW_AT(0x6a, main_subprogram, 4, DWARF) 306HANDLE_DW_AT(0x6b, data_bit_offset, 4, DWARF) 307HANDLE_DW_AT(0x6c, const_expr, 4, DWARF) 308HANDLE_DW_AT(0x6d, enum_class, 4, DWARF) 309HANDLE_DW_AT(0x6e, linkage_name, 4, DWARF) 310// New in DWARF v5: 311HANDLE_DW_AT(0x6f, string_length_bit_size, 5, DWARF) 312HANDLE_DW_AT(0x70, string_length_byte_size, 5, DWARF) 313HANDLE_DW_AT(0x71, rank, 5, DWARF) 314HANDLE_DW_AT(0x72, str_offsets_base, 5, DWARF) 315HANDLE_DW_AT(0x73, addr_base, 5, DWARF) 316HANDLE_DW_AT(0x74, rnglists_base, 5, DWARF) 317HANDLE_DW_AT(0x75, dwo_id, 0, DWARF) ///< Retracted from DWARF v5. 318HANDLE_DW_AT(0x76, dwo_name, 5, DWARF) 319HANDLE_DW_AT(0x77, reference, 5, DWARF) 320HANDLE_DW_AT(0x78, rvalue_reference, 5, DWARF) 321HANDLE_DW_AT(0x79, macros, 5, DWARF) 322HANDLE_DW_AT(0x7a, call_all_calls, 5, DWARF) 323HANDLE_DW_AT(0x7b, call_all_source_calls, 5, DWARF) 324HANDLE_DW_AT(0x7c, call_all_tail_calls, 5, DWARF) 325HANDLE_DW_AT(0x7d, call_return_pc, 5, DWARF) 326HANDLE_DW_AT(0x7e, call_value, 5, DWARF) 327HANDLE_DW_AT(0x7f, call_origin, 5, DWARF) 328HANDLE_DW_AT(0x80, call_parameter, 5, DWARF) 329HANDLE_DW_AT(0x81, call_pc, 5, DWARF) 330HANDLE_DW_AT(0x82, call_tail_call, 5, DWARF) 331HANDLE_DW_AT(0x83, call_target, 5, DWARF) 332HANDLE_DW_AT(0x84, call_target_clobbered, 5, DWARF) 333HANDLE_DW_AT(0x85, call_data_location, 5, DWARF) 334HANDLE_DW_AT(0x86, call_data_value, 5, DWARF) 335HANDLE_DW_AT(0x87, noreturn, 5, DWARF) 336HANDLE_DW_AT(0x88, alignment, 5, DWARF) 337HANDLE_DW_AT(0x89, export_symbols, 5, DWARF) 338HANDLE_DW_AT(0x8a, deleted, 5, DWARF) 339HANDLE_DW_AT(0x8b, defaulted, 5, DWARF) 340HANDLE_DW_AT(0x8c, loclists_base, 5, DWARF) 341// Vendor extensions: 342HANDLE_DW_AT(0x2002, MIPS_loop_begin, 0, MIPS) 343HANDLE_DW_AT(0x2003, MIPS_tail_loop_begin, 0, MIPS) 344HANDLE_DW_AT(0x2004, MIPS_epilog_begin, 0, MIPS) 345HANDLE_DW_AT(0x2005, MIPS_loop_unroll_factor, 0, MIPS) 346HANDLE_DW_AT(0x2006, MIPS_software_pipeline_depth, 0, MIPS) 347HANDLE_DW_AT(0x2007, MIPS_linkage_name, 0, MIPS) 348HANDLE_DW_AT(0x2008, MIPS_stride, 0, MIPS) 349HANDLE_DW_AT(0x2009, MIPS_abstract_name, 0, MIPS) 350HANDLE_DW_AT(0x200a, MIPS_clone_origin, 0, MIPS) 351HANDLE_DW_AT(0x200b, MIPS_has_inlines, 0, MIPS) 352HANDLE_DW_AT(0x200c, MIPS_stride_byte, 0, MIPS) 353HANDLE_DW_AT(0x200d, MIPS_stride_elem, 0, MIPS) 354HANDLE_DW_AT(0x200e, MIPS_ptr_dopetype, 0, MIPS) 355HANDLE_DW_AT(0x200f, MIPS_allocatable_dopetype, 0, MIPS) 356HANDLE_DW_AT(0x2010, MIPS_assumed_shape_dopetype, 0, MIPS) 357// This one appears to have only been implemented by Open64 for 358// fortran and may conflict with other extensions. 359HANDLE_DW_AT(0x2011, MIPS_assumed_size, 0, MIPS) 360// GNU extensions 361HANDLE_DW_AT(0x2101, sf_names, 0, GNU) 362HANDLE_DW_AT(0x2102, src_info, 0, GNU) 363HANDLE_DW_AT(0x2103, mac_info, 0, GNU) 364HANDLE_DW_AT(0x2104, src_coords, 0, GNU) 365HANDLE_DW_AT(0x2105, body_begin, 0, GNU) 366HANDLE_DW_AT(0x2106, body_end, 0, GNU) 367HANDLE_DW_AT(0x2107, GNU_vector, 0, GNU) 368HANDLE_DW_AT(0x2110, GNU_template_name, 0, GNU) 369HANDLE_DW_AT(0x210f, GNU_odr_signature, 0, GNU) 370HANDLE_DW_AT(0x2111, GNU_call_site_value, 0, GNU) 371HANDLE_DW_AT (0x2112, GNU_call_site_data_value, 0, GNU) 372HANDLE_DW_AT (0x2113, GNU_call_site_target, 0, GNU) 373HANDLE_DW_AT (0x2114, GNU_call_site_target_clobbered, 0, GNU) 374HANDLE_DW_AT (0x2115, GNU_tail_call, 0, GNU) 375HANDLE_DW_AT (0x2116, GNU_all_tail_call_sites, 0, GNU) 376HANDLE_DW_AT(0x2117, GNU_all_call_sites, 0, GNU) 377HANDLE_DW_AT (0x2118, GNU_all_source_call_sites, 0, GNU) 378HANDLE_DW_AT(0x2119, GNU_macros, 0, GNU) 379// Extensions for Fission proposal. 380HANDLE_DW_AT(0x2130, GNU_dwo_name, 0, GNU) 381HANDLE_DW_AT(0x2131, GNU_dwo_id, 0, GNU) 382HANDLE_DW_AT(0x2132, GNU_ranges_base, 0, GNU) 383HANDLE_DW_AT(0x2133, GNU_addr_base, 0, GNU) 384HANDLE_DW_AT(0x2134, GNU_pubnames, 0, GNU) 385HANDLE_DW_AT(0x2135, GNU_pubtypes, 0, GNU) 386HANDLE_DW_AT(0x2136, GNU_discriminator, 0, GNU) 387// Borland extensions. 388HANDLE_DW_AT(0x3b11, BORLAND_property_read, 0, BORLAND) 389HANDLE_DW_AT(0x3b12, BORLAND_property_write, 0, BORLAND) 390HANDLE_DW_AT(0x3b13, BORLAND_property_implements, 0, BORLAND) 391HANDLE_DW_AT(0x3b14, BORLAND_property_index, 0, BORLAND) 392HANDLE_DW_AT(0x3b15, BORLAND_property_default, 0, BORLAND) 393HANDLE_DW_AT(0x3b20, BORLAND_Delphi_unit, 0, BORLAND) 394HANDLE_DW_AT(0x3b21, BORLAND_Delphi_class, 0, BORLAND) 395HANDLE_DW_AT(0x3b22, BORLAND_Delphi_record, 0, BORLAND) 396HANDLE_DW_AT(0x3b23, BORLAND_Delphi_metaclass, 0, BORLAND) 397HANDLE_DW_AT(0x3b24, BORLAND_Delphi_constructor, 0, BORLAND) 398HANDLE_DW_AT(0x3b25, BORLAND_Delphi_destructor, 0, BORLAND) 399HANDLE_DW_AT(0x3b26, BORLAND_Delphi_anonymous_method, 0, BORLAND) 400HANDLE_DW_AT(0x3b27, BORLAND_Delphi_interface, 0, BORLAND) 401HANDLE_DW_AT(0x3b28, BORLAND_Delphi_ABI, 0, BORLAND) 402HANDLE_DW_AT(0x3b29, BORLAND_Delphi_return, 0, BORLAND) 403HANDLE_DW_AT(0x3b30, BORLAND_Delphi_frameptr, 0, BORLAND) 404HANDLE_DW_AT(0x3b31, BORLAND_closure, 0, BORLAND) 405// LLVM project extensions. 406HANDLE_DW_AT(0x3e00, LLVM_include_path, 0, LLVM) 407HANDLE_DW_AT(0x3e01, LLVM_config_macros, 0, LLVM) 408HANDLE_DW_AT(0x3e02, LLVM_sysroot, 0, LLVM) 409HANDLE_DW_AT(0x3e03, LLVM_tag_offset, 0, LLVM) 410// Apple extensions. 411HANDLE_DW_AT(0x3fe1, APPLE_optimized, 0, APPLE) 412HANDLE_DW_AT(0x3fe2, APPLE_flags, 0, APPLE) 413HANDLE_DW_AT(0x3fe3, APPLE_isa, 0, APPLE) 414HANDLE_DW_AT(0x3fe4, APPLE_block, 0, APPLE) 415HANDLE_DW_AT(0x3fe5, APPLE_major_runtime_vers, 0, APPLE) 416HANDLE_DW_AT(0x3fe6, APPLE_runtime_class, 0, APPLE) 417HANDLE_DW_AT(0x3fe7, APPLE_omit_frame_ptr, 0, APPLE) 418HANDLE_DW_AT(0x3fe8, APPLE_property_name, 0, APPLE) 419HANDLE_DW_AT(0x3fe9, APPLE_property_getter, 0, APPLE) 420HANDLE_DW_AT(0x3fea, APPLE_property_setter, 0, APPLE) 421HANDLE_DW_AT(0x3feb, APPLE_property_attribute, 0, APPLE) 422HANDLE_DW_AT(0x3fec, APPLE_objc_complete_type, 0, APPLE) 423HANDLE_DW_AT(0x3fed, APPLE_property, 0, APPLE) 424HANDLE_DW_AT(0x3fee, APPLE_objc_direct, 0, APPLE) 425 426// Attribute form encodings. 427HANDLE_DW_FORM(0x01, addr, 2, DWARF) 428HANDLE_DW_FORM(0x03, block2, 2, DWARF) 429HANDLE_DW_FORM(0x04, block4, 2, DWARF) 430HANDLE_DW_FORM(0x05, data2, 2, DWARF) 431HANDLE_DW_FORM(0x06, data4, 2, DWARF) 432HANDLE_DW_FORM(0x07, data8, 2, DWARF) 433HANDLE_DW_FORM(0x08, string, 2, DWARF) 434HANDLE_DW_FORM(0x09, block, 2, DWARF) 435HANDLE_DW_FORM(0x0a, block1, 2, DWARF) 436HANDLE_DW_FORM(0x0b, data1, 2, DWARF) 437HANDLE_DW_FORM(0x0c, flag, 2, DWARF) 438HANDLE_DW_FORM(0x0d, sdata, 2, DWARF) 439HANDLE_DW_FORM(0x0e, strp, 2, DWARF) 440HANDLE_DW_FORM(0x0f, udata, 2, DWARF) 441HANDLE_DW_FORM(0x10, ref_addr, 2, DWARF) 442HANDLE_DW_FORM(0x11, ref1, 2, DWARF) 443HANDLE_DW_FORM(0x12, ref2, 2, DWARF) 444HANDLE_DW_FORM(0x13, ref4, 2, DWARF) 445HANDLE_DW_FORM(0x14, ref8, 2, DWARF) 446HANDLE_DW_FORM(0x15, ref_udata, 2, DWARF) 447HANDLE_DW_FORM(0x16, indirect, 2, DWARF) 448// New in DWARF v4: 449HANDLE_DW_FORM(0x17, sec_offset, 4, DWARF) 450HANDLE_DW_FORM(0x18, exprloc, 4, DWARF) 451HANDLE_DW_FORM(0x19, flag_present, 4, DWARF) 452// This was defined out of sequence. 453HANDLE_DW_FORM(0x20, ref_sig8, 4, DWARF) 454// New in DWARF v5: 455HANDLE_DW_FORM(0x1a, strx, 5, DWARF) 456HANDLE_DW_FORM(0x1b, addrx, 5, DWARF) 457HANDLE_DW_FORM(0x1c, ref_sup4, 5, DWARF) 458HANDLE_DW_FORM(0x1d, strp_sup, 5, DWARF) 459HANDLE_DW_FORM(0x1e, data16, 5, DWARF) 460HANDLE_DW_FORM(0x1f, line_strp, 5, DWARF) 461HANDLE_DW_FORM(0x21, implicit_const, 5, DWARF) 462HANDLE_DW_FORM(0x22, loclistx, 5, DWARF) 463HANDLE_DW_FORM(0x23, rnglistx, 5, DWARF) 464HANDLE_DW_FORM(0x24, ref_sup8, 5, DWARF) 465HANDLE_DW_FORM(0x25, strx1, 5, DWARF) 466HANDLE_DW_FORM(0x26, strx2, 5, DWARF) 467HANDLE_DW_FORM(0x27, strx3, 5, DWARF) 468HANDLE_DW_FORM(0x28, strx4, 5, DWARF) 469HANDLE_DW_FORM(0x29, addrx1, 5, DWARF) 470HANDLE_DW_FORM(0x2a, addrx2, 5, DWARF) 471HANDLE_DW_FORM(0x2b, addrx3, 5, DWARF) 472HANDLE_DW_FORM(0x2c, addrx4, 5, DWARF) 473// Extensions for Fission proposal 474HANDLE_DW_FORM(0x1f01, GNU_addr_index, 0, GNU) 475HANDLE_DW_FORM(0x1f02, GNU_str_index, 0, GNU) 476// Alternate debug sections proposal (output of "dwz" tool). 477HANDLE_DW_FORM(0x1f20, GNU_ref_alt, 0, GNU) 478HANDLE_DW_FORM(0x1f21, GNU_strp_alt, 0, GNU) 479 480// DWARF Expression operators. 481HANDLE_DW_OP(0x03, addr, 2, DWARF) 482HANDLE_DW_OP(0x06, deref, 2, DWARF) 483HANDLE_DW_OP(0x08, const1u, 2, DWARF) 484HANDLE_DW_OP(0x09, const1s, 2, DWARF) 485HANDLE_DW_OP(0x0a, const2u, 2, DWARF) 486HANDLE_DW_OP(0x0b, const2s, 2, DWARF) 487HANDLE_DW_OP(0x0c, const4u, 2, DWARF) 488HANDLE_DW_OP(0x0d, const4s, 2, DWARF) 489HANDLE_DW_OP(0x0e, const8u, 2, DWARF) 490HANDLE_DW_OP(0x0f, const8s, 2, DWARF) 491HANDLE_DW_OP(0x10, constu, 2, DWARF) 492HANDLE_DW_OP(0x11, consts, 2, DWARF) 493HANDLE_DW_OP(0x12, dup, 2, DWARF) 494HANDLE_DW_OP(0x13, drop, 2, DWARF) 495HANDLE_DW_OP(0x14, over, 2, DWARF) 496HANDLE_DW_OP(0x15, pick, 2, DWARF) 497HANDLE_DW_OP(0x16, swap, 2, DWARF) 498HANDLE_DW_OP(0x17, rot, 2, DWARF) 499HANDLE_DW_OP(0x18, xderef, 2, DWARF) 500HANDLE_DW_OP(0x19, abs, 2, DWARF) 501HANDLE_DW_OP(0x1a, and, 2, DWARF) 502HANDLE_DW_OP(0x1b, div, 2, DWARF) 503HANDLE_DW_OP(0x1c, minus, 2, DWARF) 504HANDLE_DW_OP(0x1d, mod, 2, DWARF) 505HANDLE_DW_OP(0x1e, mul, 2, DWARF) 506HANDLE_DW_OP(0x1f, neg, 2, DWARF) 507HANDLE_DW_OP(0x20, not, 2, DWARF) 508HANDLE_DW_OP(0x21, or, 2, DWARF) 509HANDLE_DW_OP(0x22, plus, 2, DWARF) 510HANDLE_DW_OP(0x23, plus_uconst, 2, DWARF) 511HANDLE_DW_OP(0x24, shl, 2, DWARF) 512HANDLE_DW_OP(0x25, shr, 2, DWARF) 513HANDLE_DW_OP(0x26, shra, 2, DWARF) 514HANDLE_DW_OP(0x27, xor, 2, DWARF) 515HANDLE_DW_OP(0x28, bra, 2, DWARF) 516HANDLE_DW_OP(0x29, eq, 2, DWARF) 517HANDLE_DW_OP(0x2a, ge, 2, DWARF) 518HANDLE_DW_OP(0x2b, gt, 2, DWARF) 519HANDLE_DW_OP(0x2c, le, 2, DWARF) 520HANDLE_DW_OP(0x2d, lt, 2, DWARF) 521HANDLE_DW_OP(0x2e, ne, 2, DWARF) 522HANDLE_DW_OP(0x2f, skip, 2, DWARF) 523HANDLE_DW_OP(0x30, lit0, 2, DWARF) 524HANDLE_DW_OP(0x31, lit1, 2, DWARF) 525HANDLE_DW_OP(0x32, lit2, 2, DWARF) 526HANDLE_DW_OP(0x33, lit3, 2, DWARF) 527HANDLE_DW_OP(0x34, lit4, 2, DWARF) 528HANDLE_DW_OP(0x35, lit5, 2, DWARF) 529HANDLE_DW_OP(0x36, lit6, 2, DWARF) 530HANDLE_DW_OP(0x37, lit7, 2, DWARF) 531HANDLE_DW_OP(0x38, lit8, 2, DWARF) 532HANDLE_DW_OP(0x39, lit9, 2, DWARF) 533HANDLE_DW_OP(0x3a, lit10, 2, DWARF) 534HANDLE_DW_OP(0x3b, lit11, 2, DWARF) 535HANDLE_DW_OP(0x3c, lit12, 2, DWARF) 536HANDLE_DW_OP(0x3d, lit13, 2, DWARF) 537HANDLE_DW_OP(0x3e, lit14, 2, DWARF) 538HANDLE_DW_OP(0x3f, lit15, 2, DWARF) 539HANDLE_DW_OP(0x40, lit16, 2, DWARF) 540HANDLE_DW_OP(0x41, lit17, 2, DWARF) 541HANDLE_DW_OP(0x42, lit18, 2, DWARF) 542HANDLE_DW_OP(0x43, lit19, 2, DWARF) 543HANDLE_DW_OP(0x44, lit20, 2, DWARF) 544HANDLE_DW_OP(0x45, lit21, 2, DWARF) 545HANDLE_DW_OP(0x46, lit22, 2, DWARF) 546HANDLE_DW_OP(0x47, lit23, 2, DWARF) 547HANDLE_DW_OP(0x48, lit24, 2, DWARF) 548HANDLE_DW_OP(0x49, lit25, 2, DWARF) 549HANDLE_DW_OP(0x4a, lit26, 2, DWARF) 550HANDLE_DW_OP(0x4b, lit27, 2, DWARF) 551HANDLE_DW_OP(0x4c, lit28, 2, DWARF) 552HANDLE_DW_OP(0x4d, lit29, 2, DWARF) 553HANDLE_DW_OP(0x4e, lit30, 2, DWARF) 554HANDLE_DW_OP(0x4f, lit31, 2, DWARF) 555HANDLE_DW_OP(0x50, reg0, 2, DWARF) 556HANDLE_DW_OP(0x51, reg1, 2, DWARF) 557HANDLE_DW_OP(0x52, reg2, 2, DWARF) 558HANDLE_DW_OP(0x53, reg3, 2, DWARF) 559HANDLE_DW_OP(0x54, reg4, 2, DWARF) 560HANDLE_DW_OP(0x55, reg5, 2, DWARF) 561HANDLE_DW_OP(0x56, reg6, 2, DWARF) 562HANDLE_DW_OP(0x57, reg7, 2, DWARF) 563HANDLE_DW_OP(0x58, reg8, 2, DWARF) 564HANDLE_DW_OP(0x59, reg9, 2, DWARF) 565HANDLE_DW_OP(0x5a, reg10, 2, DWARF) 566HANDLE_DW_OP(0x5b, reg11, 2, DWARF) 567HANDLE_DW_OP(0x5c, reg12, 2, DWARF) 568HANDLE_DW_OP(0x5d, reg13, 2, DWARF) 569HANDLE_DW_OP(0x5e, reg14, 2, DWARF) 570HANDLE_DW_OP(0x5f, reg15, 2, DWARF) 571HANDLE_DW_OP(0x60, reg16, 2, DWARF) 572HANDLE_DW_OP(0x61, reg17, 2, DWARF) 573HANDLE_DW_OP(0x62, reg18, 2, DWARF) 574HANDLE_DW_OP(0x63, reg19, 2, DWARF) 575HANDLE_DW_OP(0x64, reg20, 2, DWARF) 576HANDLE_DW_OP(0x65, reg21, 2, DWARF) 577HANDLE_DW_OP(0x66, reg22, 2, DWARF) 578HANDLE_DW_OP(0x67, reg23, 2, DWARF) 579HANDLE_DW_OP(0x68, reg24, 2, DWARF) 580HANDLE_DW_OP(0x69, reg25, 2, DWARF) 581HANDLE_DW_OP(0x6a, reg26, 2, DWARF) 582HANDLE_DW_OP(0x6b, reg27, 2, DWARF) 583HANDLE_DW_OP(0x6c, reg28, 2, DWARF) 584HANDLE_DW_OP(0x6d, reg29, 2, DWARF) 585HANDLE_DW_OP(0x6e, reg30, 2, DWARF) 586HANDLE_DW_OP(0x6f, reg31, 2, DWARF) 587HANDLE_DW_OP(0x70, breg0, 2, DWARF) 588HANDLE_DW_OP(0x71, breg1, 2, DWARF) 589HANDLE_DW_OP(0x72, breg2, 2, DWARF) 590HANDLE_DW_OP(0x73, breg3, 2, DWARF) 591HANDLE_DW_OP(0x74, breg4, 2, DWARF) 592HANDLE_DW_OP(0x75, breg5, 2, DWARF) 593HANDLE_DW_OP(0x76, breg6, 2, DWARF) 594HANDLE_DW_OP(0x77, breg7, 2, DWARF) 595HANDLE_DW_OP(0x78, breg8, 2, DWARF) 596HANDLE_DW_OP(0x79, breg9, 2, DWARF) 597HANDLE_DW_OP(0x7a, breg10, 2, DWARF) 598HANDLE_DW_OP(0x7b, breg11, 2, DWARF) 599HANDLE_DW_OP(0x7c, breg12, 2, DWARF) 600HANDLE_DW_OP(0x7d, breg13, 2, DWARF) 601HANDLE_DW_OP(0x7e, breg14, 2, DWARF) 602HANDLE_DW_OP(0x7f, breg15, 2, DWARF) 603HANDLE_DW_OP(0x80, breg16, 2, DWARF) 604HANDLE_DW_OP(0x81, breg17, 2, DWARF) 605HANDLE_DW_OP(0x82, breg18, 2, DWARF) 606HANDLE_DW_OP(0x83, breg19, 2, DWARF) 607HANDLE_DW_OP(0x84, breg20, 2, DWARF) 608HANDLE_DW_OP(0x85, breg21, 2, DWARF) 609HANDLE_DW_OP(0x86, breg22, 2, DWARF) 610HANDLE_DW_OP(0x87, breg23, 2, DWARF) 611HANDLE_DW_OP(0x88, breg24, 2, DWARF) 612HANDLE_DW_OP(0x89, breg25, 2, DWARF) 613HANDLE_DW_OP(0x8a, breg26, 2, DWARF) 614HANDLE_DW_OP(0x8b, breg27, 2, DWARF) 615HANDLE_DW_OP(0x8c, breg28, 2, DWARF) 616HANDLE_DW_OP(0x8d, breg29, 2, DWARF) 617HANDLE_DW_OP(0x8e, breg30, 2, DWARF) 618HANDLE_DW_OP(0x8f, breg31, 2, DWARF) 619HANDLE_DW_OP(0x90, regx, 2, DWARF) 620HANDLE_DW_OP(0x91, fbreg, 2, DWARF) 621HANDLE_DW_OP(0x92, bregx, 2, DWARF) 622HANDLE_DW_OP(0x93, piece, 2, DWARF) 623HANDLE_DW_OP(0x94, deref_size, 2, DWARF) 624HANDLE_DW_OP(0x95, xderef_size, 2, DWARF) 625HANDLE_DW_OP(0x96, nop, 2, DWARF) 626// New in DWARF v3: 627HANDLE_DW_OP(0x97, push_object_address, 3, DWARF) 628HANDLE_DW_OP(0x98, call2, 3, DWARF) 629HANDLE_DW_OP(0x99, call4, 3, DWARF) 630HANDLE_DW_OP(0x9a, call_ref, 3, DWARF) 631HANDLE_DW_OP(0x9b, form_tls_address, 3, DWARF) 632HANDLE_DW_OP(0x9c, call_frame_cfa, 3, DWARF) 633HANDLE_DW_OP(0x9d, bit_piece, 3, DWARF) 634// New in DWARF v4: 635HANDLE_DW_OP(0x9e, implicit_value, 4, DWARF) 636HANDLE_DW_OP(0x9f, stack_value, 4, DWARF) 637// New in DWARF v5: 638HANDLE_DW_OP(0xa0, implicit_pointer, 5, DWARF) 639HANDLE_DW_OP(0xa1, addrx, 5, DWARF) 640HANDLE_DW_OP(0xa2, constx, 5, DWARF) 641HANDLE_DW_OP(0xa3, entry_value, 5, DWARF) 642HANDLE_DW_OP(0xa4, const_type, 5, DWARF) 643HANDLE_DW_OP(0xa5, regval_type, 5, DWARF) 644HANDLE_DW_OP(0xa6, deref_type, 5, DWARF) 645HANDLE_DW_OP(0xa7, xderef_type, 5, DWARF) 646HANDLE_DW_OP(0xa8, convert, 5, DWARF) 647HANDLE_DW_OP(0xa9, reinterpret, 5, DWARF) 648// Vendor extensions: 649// Extensions for GNU-style thread-local storage. 650HANDLE_DW_OP(0xe0, GNU_push_tls_address, 0, GNU) 651// Extensions for WebAssembly. 652HANDLE_DW_OP(0xed, WASM_location, 0, WASM) 653// The GNU entry value extension. 654HANDLE_DW_OP(0xf3, GNU_entry_value, 0, GNU) 655// Extensions for Fission proposal. 656HANDLE_DW_OP(0xfb, GNU_addr_index, 0, GNU) 657HANDLE_DW_OP(0xfc, GNU_const_index, 0, GNU) 658 659// DWARF languages. 660HANDLE_DW_LANG(0x0001, C89, 0, 2, DWARF) 661HANDLE_DW_LANG(0x0002, C, 0, 2, DWARF) 662HANDLE_DW_LANG(0x0003, Ada83, 1, 2, DWARF) 663HANDLE_DW_LANG(0x0004, C_plus_plus, 0, 2, DWARF) 664HANDLE_DW_LANG(0x0005, Cobol74, 1, 2, DWARF) 665HANDLE_DW_LANG(0x0006, Cobol85, 1, 2, DWARF) 666HANDLE_DW_LANG(0x0007, Fortran77, 1, 2, DWARF) 667HANDLE_DW_LANG(0x0008, Fortran90, 1, 2, DWARF) 668HANDLE_DW_LANG(0x0009, Pascal83, 1, 2, DWARF) 669HANDLE_DW_LANG(0x000a, Modula2, 1, 2, DWARF) 670// New in DWARF v3: 671HANDLE_DW_LANG(0x000b, Java, 0, 3, DWARF) 672HANDLE_DW_LANG(0x000c, C99, 0, 3, DWARF) 673HANDLE_DW_LANG(0x000d, Ada95, 1, 3, DWARF) 674HANDLE_DW_LANG(0x000e, Fortran95, 1, 3, DWARF) 675HANDLE_DW_LANG(0x000f, PLI, 1, 3, DWARF) 676HANDLE_DW_LANG(0x0010, ObjC, 0, 3, DWARF) 677HANDLE_DW_LANG(0x0011, ObjC_plus_plus, 0, 3, DWARF) 678HANDLE_DW_LANG(0x0012, UPC, 0, 3, DWARF) 679HANDLE_DW_LANG(0x0013, D, 0, 3, DWARF) 680// New in DWARF v4: 681HANDLE_DW_LANG(0x0014, Python, 0, 4, DWARF) 682// New in DWARF v5: 683HANDLE_DW_LANG(0x0015, OpenCL, 0, 5, DWARF) 684HANDLE_DW_LANG(0x0016, Go, 0, 5, DWARF) 685HANDLE_DW_LANG(0x0017, Modula3, 1, 5, DWARF) 686HANDLE_DW_LANG(0x0018, Haskell, 0, 5, DWARF) 687HANDLE_DW_LANG(0x0019, C_plus_plus_03, 0, 5, DWARF) 688HANDLE_DW_LANG(0x001a, C_plus_plus_11, 0, 5, DWARF) 689HANDLE_DW_LANG(0x001b, OCaml, 0, 5, DWARF) 690HANDLE_DW_LANG(0x001c, Rust, 0, 5, DWARF) 691HANDLE_DW_LANG(0x001d, C11, 0, 5, DWARF) 692HANDLE_DW_LANG(0x001e, Swift, 0, 5, DWARF) 693HANDLE_DW_LANG(0x001f, Julia, 1, 5, DWARF) 694HANDLE_DW_LANG(0x0020, Dylan, 0, 5, DWARF) 695HANDLE_DW_LANG(0x0021, C_plus_plus_14, 0, 5, DWARF) 696HANDLE_DW_LANG(0x0022, Fortran03, 1, 5, DWARF) 697HANDLE_DW_LANG(0x0023, Fortran08, 1, 5, DWARF) 698HANDLE_DW_LANG(0x0024, RenderScript, 0, 5, DWARF) 699HANDLE_DW_LANG(0x0025, BLISS, 0, 5, DWARF) 700// Vendor extensions: 701HANDLE_DW_LANG(0x8001, Mips_Assembler, None, 0, MIPS) 702HANDLE_DW_LANG(0x8e57, GOOGLE_RenderScript, 0, 0, GOOGLE) 703HANDLE_DW_LANG(0xb000, BORLAND_Delphi, 0, 0, BORLAND) 704 705// DWARF attribute type encodings. 706HANDLE_DW_ATE(0x01, address, 2, DWARF) 707HANDLE_DW_ATE(0x02, boolean, 2, DWARF) 708HANDLE_DW_ATE(0x03, complex_float, 2, DWARF) 709HANDLE_DW_ATE(0x04, float, 2, DWARF) 710HANDLE_DW_ATE(0x05, signed, 2, DWARF) 711HANDLE_DW_ATE(0x06, signed_char, 2, DWARF) 712HANDLE_DW_ATE(0x07, unsigned, 2, DWARF) 713HANDLE_DW_ATE(0x08, unsigned_char, 2, DWARF) 714// New in DWARF v3: 715HANDLE_DW_ATE(0x09, imaginary_float, 3, DWARF) 716HANDLE_DW_ATE(0x0a, packed_decimal, 3, DWARF) 717HANDLE_DW_ATE(0x0b, numeric_string, 3, DWARF) 718HANDLE_DW_ATE(0x0c, edited, 3, DWARF) 719HANDLE_DW_ATE(0x0d, signed_fixed, 3, DWARF) 720HANDLE_DW_ATE(0x0e, unsigned_fixed, 3, DWARF) 721HANDLE_DW_ATE(0x0f, decimal_float, 3, DWARF) 722// New in DWARF v4: 723HANDLE_DW_ATE(0x10, UTF, 4, DWARF) 724// New in DWARF v5: 725HANDLE_DW_ATE(0x11, UCS, 5, DWARF) 726HANDLE_DW_ATE(0x12, ASCII, 5, DWARF) 727 728// DWARF attribute endianity 729HANDLE_DW_END(0x00, default) 730HANDLE_DW_END(0x01, big) 731HANDLE_DW_END(0x02, little) 732 733// DWARF virtuality codes. 734HANDLE_DW_VIRTUALITY(0x00, none) 735HANDLE_DW_VIRTUALITY(0x01, virtual) 736HANDLE_DW_VIRTUALITY(0x02, pure_virtual) 737 738// DWARF v5 Defaulted Member Encodings. 739HANDLE_DW_DEFAULTED(0x00, no) 740HANDLE_DW_DEFAULTED(0x01, in_class) 741HANDLE_DW_DEFAULTED(0x02, out_of_class) 742 743// DWARF calling convention codes. 744HANDLE_DW_CC(0x01, normal) 745HANDLE_DW_CC(0x02, program) 746HANDLE_DW_CC(0x03, nocall) 747// New in DWARF v5: 748HANDLE_DW_CC(0x04, pass_by_reference) 749HANDLE_DW_CC(0x05, pass_by_value) 750// Vendor extensions: 751HANDLE_DW_CC(0x40, GNU_renesas_sh) 752HANDLE_DW_CC(0x41, GNU_borland_fastcall_i386) 753HANDLE_DW_CC(0xb0, BORLAND_safecall) 754HANDLE_DW_CC(0xb1, BORLAND_stdcall) 755HANDLE_DW_CC(0xb2, BORLAND_pascal) 756HANDLE_DW_CC(0xb3, BORLAND_msfastcall) 757HANDLE_DW_CC(0xb4, BORLAND_msreturn) 758HANDLE_DW_CC(0xb5, BORLAND_thiscall) 759HANDLE_DW_CC(0xb6, BORLAND_fastcall) 760HANDLE_DW_CC(0xc0, LLVM_vectorcall) 761HANDLE_DW_CC(0xc1, LLVM_Win64) 762HANDLE_DW_CC(0xc2, LLVM_X86_64SysV) 763HANDLE_DW_CC(0xc3, LLVM_AAPCS) 764HANDLE_DW_CC(0xc4, LLVM_AAPCS_VFP) 765HANDLE_DW_CC(0xc5, LLVM_IntelOclBicc) 766HANDLE_DW_CC(0xc6, LLVM_SpirFunction) 767HANDLE_DW_CC(0xc7, LLVM_OpenCLKernel) 768HANDLE_DW_CC(0xc8, LLVM_Swift) 769HANDLE_DW_CC(0xc9, LLVM_PreserveMost) 770HANDLE_DW_CC(0xca, LLVM_PreserveAll) 771HANDLE_DW_CC(0xcb, LLVM_X86RegCall) 772// From GCC source code (include/dwarf2.h): This DW_CC_ value is not currently 773// generated by any toolchain. It is used internally to GDB to indicate OpenCL C 774// functions that have been compiled with the IBM XL C for OpenCL compiler and use 775// a non-platform calling convention for passing OpenCL C vector types. 776HANDLE_DW_CC(0xff, GDB_IBM_OpenCL) 777 778// Line Number Extended Opcode Encodings 779HANDLE_DW_LNE(0x01, end_sequence) 780HANDLE_DW_LNE(0x02, set_address) 781HANDLE_DW_LNE(0x03, define_file) 782// New in DWARF v4: 783HANDLE_DW_LNE(0x04, set_discriminator) 784 785// Line Number Standard Opcode Encodings. 786HANDLE_DW_LNS(0x00, extended_op) 787HANDLE_DW_LNS(0x01, copy) 788HANDLE_DW_LNS(0x02, advance_pc) 789HANDLE_DW_LNS(0x03, advance_line) 790HANDLE_DW_LNS(0x04, set_file) 791HANDLE_DW_LNS(0x05, set_column) 792HANDLE_DW_LNS(0x06, negate_stmt) 793HANDLE_DW_LNS(0x07, set_basic_block) 794HANDLE_DW_LNS(0x08, const_add_pc) 795HANDLE_DW_LNS(0x09, fixed_advance_pc) 796// New in DWARF v3: 797HANDLE_DW_LNS(0x0a, set_prologue_end) 798HANDLE_DW_LNS(0x0b, set_epilogue_begin) 799HANDLE_DW_LNS(0x0c, set_isa) 800 801// DWARF v5 Line number header entry format. 802HANDLE_DW_LNCT(0x01, path) 803HANDLE_DW_LNCT(0x02, directory_index) 804HANDLE_DW_LNCT(0x03, timestamp) 805HANDLE_DW_LNCT(0x04, size) 806HANDLE_DW_LNCT(0x05, MD5) 807// A vendor extension until http://dwarfstd.org/ShowIssue.php?issue=180201.1 is 808// accepted and incorporated into the next DWARF standard. 809HANDLE_DW_LNCT(0x2001, LLVM_source) 810 811// DWARF v5 Macro information. 812HANDLE_DW_MACRO(0x01, define) 813HANDLE_DW_MACRO(0x02, undef) 814HANDLE_DW_MACRO(0x03, start_file) 815HANDLE_DW_MACRO(0x04, end_file) 816HANDLE_DW_MACRO(0x05, define_strp) 817HANDLE_DW_MACRO(0x06, undef_strp) 818HANDLE_DW_MACRO(0x07, import) 819HANDLE_DW_MACRO(0x08, define_sup) 820HANDLE_DW_MACRO(0x09, undef_sup) 821HANDLE_DW_MACRO(0x0a, import_sup) 822HANDLE_DW_MACRO(0x0b, define_strx) 823HANDLE_DW_MACRO(0x0c, undef_strx) 824 825// DWARF v5 Range List Entry encoding values. 826HANDLE_DW_RLE(0x00, end_of_list) 827HANDLE_DW_RLE(0x01, base_addressx) 828HANDLE_DW_RLE(0x02, startx_endx) 829HANDLE_DW_RLE(0x03, startx_length) 830HANDLE_DW_RLE(0x04, offset_pair) 831HANDLE_DW_RLE(0x05, base_address) 832HANDLE_DW_RLE(0x06, start_end) 833HANDLE_DW_RLE(0x07, start_length) 834 835// DWARF v5 Loc List Entry encoding values. 836HANDLE_DW_LLE(0x00, end_of_list) 837HANDLE_DW_LLE(0x01, base_addressx) 838HANDLE_DW_LLE(0x02, startx_endx) 839HANDLE_DW_LLE(0x03, startx_length) 840HANDLE_DW_LLE(0x04, offset_pair) 841HANDLE_DW_LLE(0x05, default_location) 842HANDLE_DW_LLE(0x06, base_address) 843HANDLE_DW_LLE(0x07, start_end) 844HANDLE_DW_LLE(0x08, start_length) 845 846// Call frame instruction encodings. 847HANDLE_DW_CFA(0x00, nop) 848HANDLE_DW_CFA(0x40, advance_loc) 849HANDLE_DW_CFA(0x80, offset) 850HANDLE_DW_CFA(0xc0, restore) 851HANDLE_DW_CFA(0x01, set_loc) 852HANDLE_DW_CFA(0x02, advance_loc1) 853HANDLE_DW_CFA(0x03, advance_loc2) 854HANDLE_DW_CFA(0x04, advance_loc4) 855HANDLE_DW_CFA(0x05, offset_extended) 856HANDLE_DW_CFA(0x06, restore_extended) 857HANDLE_DW_CFA(0x07, undefined) 858HANDLE_DW_CFA(0x08, same_value) 859HANDLE_DW_CFA(0x09, register) 860HANDLE_DW_CFA(0x0a, remember_state) 861HANDLE_DW_CFA(0x0b, restore_state) 862HANDLE_DW_CFA(0x0c, def_cfa) 863HANDLE_DW_CFA(0x0d, def_cfa_register) 864HANDLE_DW_CFA(0x0e, def_cfa_offset) 865// New in DWARF v3: 866HANDLE_DW_CFA(0x0f, def_cfa_expression) 867HANDLE_DW_CFA(0x10, expression) 868HANDLE_DW_CFA(0x11, offset_extended_sf) 869HANDLE_DW_CFA(0x12, def_cfa_sf) 870HANDLE_DW_CFA(0x13, def_cfa_offset_sf) 871HANDLE_DW_CFA(0x14, val_offset) 872HANDLE_DW_CFA(0x15, val_offset_sf) 873HANDLE_DW_CFA(0x16, val_expression) 874// Vendor extensions: 875HANDLE_DW_CFA_PRED(0x1d, MIPS_advance_loc8, SELECT_MIPS64) 876HANDLE_DW_CFA_PRED(0x2d, GNU_window_save, SELECT_SPARC) 877HANDLE_DW_CFA_PRED(0x2d, AARCH64_negate_ra_state, SELECT_AARCH64) 878HANDLE_DW_CFA_PRED(0x2e, GNU_args_size, SELECT_X86) 879 880// Apple Objective-C Property Attributes. 881// Keep this list in sync with clang's DeclSpec.h ObjCPropertyAttributeKind! 882HANDLE_DW_APPLE_PROPERTY(0x01, readonly) 883HANDLE_DW_APPLE_PROPERTY(0x02, getter) 884HANDLE_DW_APPLE_PROPERTY(0x04, assign) 885HANDLE_DW_APPLE_PROPERTY(0x08, readwrite) 886HANDLE_DW_APPLE_PROPERTY(0x10, retain) 887HANDLE_DW_APPLE_PROPERTY(0x20, copy) 888HANDLE_DW_APPLE_PROPERTY(0x40, nonatomic) 889HANDLE_DW_APPLE_PROPERTY(0x80, setter) 890HANDLE_DW_APPLE_PROPERTY(0x100, atomic) 891HANDLE_DW_APPLE_PROPERTY(0x200, weak) 892HANDLE_DW_APPLE_PROPERTY(0x400, strong) 893HANDLE_DW_APPLE_PROPERTY(0x800, unsafe_unretained) 894HANDLE_DW_APPLE_PROPERTY(0x1000, nullability) 895HANDLE_DW_APPLE_PROPERTY(0x2000, null_resettable) 896HANDLE_DW_APPLE_PROPERTY(0x4000, class) 897 898// DWARF v5 Unit Types. 899HANDLE_DW_UT(0x01, compile) 900HANDLE_DW_UT(0x02, type) 901HANDLE_DW_UT(0x03, partial) 902HANDLE_DW_UT(0x04, skeleton) 903HANDLE_DW_UT(0x05, split_compile) 904HANDLE_DW_UT(0x06, split_type) 905 906// DWARF section types. (enum name, ELF name, ELF DWO name, cmdline name) 907// Note that these IDs don't mean anything. 908// TODO: Add Mach-O and COFF names. 909// Official DWARF sections. 910HANDLE_DWARF_SECTION(DebugAbbrev, ".debug_abbrev", "debug-abbrev") 911HANDLE_DWARF_SECTION(DebugAddr, ".debug_addr", "debug-addr") 912HANDLE_DWARF_SECTION(DebugAranges, ".debug_aranges", "debug-aranges") 913HANDLE_DWARF_SECTION(DebugInfo, ".debug_info", "debug-info") 914HANDLE_DWARF_SECTION(DebugTypes, ".debug_types", "debug-types") 915HANDLE_DWARF_SECTION(DebugLine, ".debug_line", "debug-line") 916HANDLE_DWARF_SECTION(DebugLineStr, ".debug_line_str", "debug-line-str") 917HANDLE_DWARF_SECTION(DebugLoc, ".debug_loc", "debug-loc") 918HANDLE_DWARF_SECTION(DebugLoclists, ".debug_loclists", "debug-loclists") 919HANDLE_DWARF_SECTION(DebugFrame, ".debug_frame", "debug-frame") 920HANDLE_DWARF_SECTION(DebugMacro, ".debug_macro", "debug-macro") 921HANDLE_DWARF_SECTION(DebugNames, ".debug_names", "debug-names") 922HANDLE_DWARF_SECTION(DebugPubnames, ".debug_pubnames", "debug-pubnames") 923HANDLE_DWARF_SECTION(DebugPubtypes, ".debug_pubtypes", "debug-pubtypes") 924HANDLE_DWARF_SECTION(DebugGnuPubnames, ".debug_gnu_pubnames", "debug-gnu-pubnames") 925HANDLE_DWARF_SECTION(DebugGnuPubtypes, ".debug_gnu_pubtypes", "debug-gnu-pubtypes") 926HANDLE_DWARF_SECTION(DebugRanges, ".debug_ranges", "debug-ranges") 927HANDLE_DWARF_SECTION(DebugRnglists, ".debug_rnglists", "debug-rnglists") 928HANDLE_DWARF_SECTION(DebugStr, ".debug_str", "debug-str") 929HANDLE_DWARF_SECTION(DebugStrOffsets, ".debug_str_offsets", "debug-str-offsets") 930HANDLE_DWARF_SECTION(DebugCUIndex, ".debug_cu_index", "debug-cu-index") 931HANDLE_DWARF_SECTION(DebugTUIndex, ".debug_tu_index", "debug-tu-index") 932// Vendor extensions. 933HANDLE_DWARF_SECTION(AppleNames, ".apple_names", "apple-names") 934HANDLE_DWARF_SECTION(AppleTypes, ".apple_types", "apple-types") 935HANDLE_DWARF_SECTION(AppleNamespaces, ".apple_namespaces", "apple-namespaces") 936HANDLE_DWARF_SECTION(AppleObjC, ".apple_objc", "apple-objc") 937HANDLE_DWARF_SECTION(GdbIndex, ".gdb_index", "gdb-index") 938 939HANDLE_DW_IDX(0x01, compile_unit) 940HANDLE_DW_IDX(0x02, type_unit) 941HANDLE_DW_IDX(0x03, die_offset) 942HANDLE_DW_IDX(0x04, parent) 943HANDLE_DW_IDX(0x05, type_hash) 944 945 946#undef HANDLE_DW_TAG 947#undef HANDLE_DW_AT 948#undef HANDLE_DW_FORM 949#undef HANDLE_DW_OP 950#undef HANDLE_DW_LANG 951#undef HANDLE_DW_ATE 952#undef HANDLE_DW_VIRTUALITY 953#undef HANDLE_DW_DEFAULTED 954#undef HANDLE_DW_CC 955#undef HANDLE_DW_LNS 956#undef HANDLE_DW_LNE 957#undef HANDLE_DW_LNCT 958#undef HANDLE_DW_MACRO 959#undef HANDLE_DW_RLE 960#undef HANDLE_DW_LLE 961#undef HANDLE_DW_CFA 962#undef HANDLE_DW_CFA_PRED 963#undef HANDLE_DW_APPLE_PROPERTY 964#undef HANDLE_DW_UT 965#undef HANDLE_DWARF_SECTION 966#undef HANDLE_DW_IDX 967#undef HANDLE_DW_END 968