dwarf2.h revision 117395
150397Sobrien/* Declarations and definitions of codes relating to the DWARF2 symbolic
250397Sobrien   debugging information format.
390075Sobrien   Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002
470635Sobrien   Free Software Foundation, Inc.
550397Sobrien
690075Sobrien   Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
790075Sobrien   Office (AJPO), Florida State Unviversity and Silicon Graphics Inc.
890075Sobrien   provided support for this effort -- June 21, 1995.
950397Sobrien
1090075Sobrien   Derived from the DWARF 1 implementation written by Ron Guilmette
1190075Sobrien   (rfg@netcom.com), November 1990.
1250397Sobrien
1390075SobrienThis file is part of GCC.
1450397Sobrien
1590075SobrienGCC is free software; you can redistribute it and/or modify it under
1690075Sobrienthe terms of the GNU General Public License as published by the Free
1790075SobrienSoftware Foundation; either version 2, or (at your option) any later
1890075Sobrienversion.
1990075Sobrien
2090075SobrienGCC is distributed in the hope that it will be useful, but WITHOUT ANY
2190075SobrienWARRANTY; without even the implied warranty of MERCHANTABILITY or
2290075SobrienFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
2390075Sobrienfor more details.
2490075Sobrien
2552284SobrienYou should have received a copy of the GNU General Public License
2690075Sobrienalong with GCC; see the file COPYING.  If not, write to the Free
2790075SobrienSoftware Foundation, 59 Temple Place - Suite 330, Boston, MA
2890075Sobrien02111-1307, USA.  */
2950397Sobrien
3050397Sobrien/* This file is derived from the DWARF specification (a public document)
3150397Sobrien   Revision 2.0.0 (July 27, 1993) developed by the UNIX International
3250397Sobrien   Programming Languages Special Interest Group (UI/PLSIG) and distributed
3350397Sobrien   by UNIX International.  Copies of this specification are available from
3490075Sobrien   UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
3550397Sobrien
3690075Sobrien   This file also now contains definitions from the DWARF 3 specification.  */
3790075Sobrien
3850397Sobrien/* This file is shared between GCC and GDB, and should not contain
3950397Sobrien   prototypes.  */
4050397Sobrien
4150397Sobrien/* Tag names and codes.  */
4250397Sobrienenum dwarf_tag
4350397Sobrien  {
4450397Sobrien    DW_TAG_padding = 0x00,
4550397Sobrien    DW_TAG_array_type = 0x01,
4650397Sobrien    DW_TAG_class_type = 0x02,
4750397Sobrien    DW_TAG_entry_point = 0x03,
4850397Sobrien    DW_TAG_enumeration_type = 0x04,
4950397Sobrien    DW_TAG_formal_parameter = 0x05,
5050397Sobrien    DW_TAG_imported_declaration = 0x08,
5150397Sobrien    DW_TAG_label = 0x0a,
5250397Sobrien    DW_TAG_lexical_block = 0x0b,
5350397Sobrien    DW_TAG_member = 0x0d,
5450397Sobrien    DW_TAG_pointer_type = 0x0f,
5550397Sobrien    DW_TAG_reference_type = 0x10,
5650397Sobrien    DW_TAG_compile_unit = 0x11,
5750397Sobrien    DW_TAG_string_type = 0x12,
5850397Sobrien    DW_TAG_structure_type = 0x13,
5950397Sobrien    DW_TAG_subroutine_type = 0x15,
6050397Sobrien    DW_TAG_typedef = 0x16,
6150397Sobrien    DW_TAG_union_type = 0x17,
6250397Sobrien    DW_TAG_unspecified_parameters = 0x18,
6350397Sobrien    DW_TAG_variant = 0x19,
6450397Sobrien    DW_TAG_common_block = 0x1a,
6550397Sobrien    DW_TAG_common_inclusion = 0x1b,
6650397Sobrien    DW_TAG_inheritance = 0x1c,
6750397Sobrien    DW_TAG_inlined_subroutine = 0x1d,
6850397Sobrien    DW_TAG_module = 0x1e,
6950397Sobrien    DW_TAG_ptr_to_member_type = 0x1f,
7050397Sobrien    DW_TAG_set_type = 0x20,
7150397Sobrien    DW_TAG_subrange_type = 0x21,
7250397Sobrien    DW_TAG_with_stmt = 0x22,
7350397Sobrien    DW_TAG_access_declaration = 0x23,
7450397Sobrien    DW_TAG_base_type = 0x24,
7550397Sobrien    DW_TAG_catch_block = 0x25,
7650397Sobrien    DW_TAG_const_type = 0x26,
7750397Sobrien    DW_TAG_constant = 0x27,
7850397Sobrien    DW_TAG_enumerator = 0x28,
7950397Sobrien    DW_TAG_file_type = 0x29,
8050397Sobrien    DW_TAG_friend = 0x2a,
8150397Sobrien    DW_TAG_namelist = 0x2b,
8250397Sobrien    DW_TAG_namelist_item = 0x2c,
8350397Sobrien    DW_TAG_packed_type = 0x2d,
8450397Sobrien    DW_TAG_subprogram = 0x2e,
8550397Sobrien    DW_TAG_template_type_param = 0x2f,
8650397Sobrien    DW_TAG_template_value_param = 0x30,
8750397Sobrien    DW_TAG_thrown_type = 0x31,
8850397Sobrien    DW_TAG_try_block = 0x32,
8950397Sobrien    DW_TAG_variant_part = 0x33,
9050397Sobrien    DW_TAG_variable = 0x34,
9150397Sobrien    DW_TAG_volatile_type = 0x35,
9290075Sobrien    /* DWARF 3.  */
9390075Sobrien    DW_TAG_dwarf_procedure = 0x36,
9490075Sobrien    DW_TAG_restrict_type = 0x37,
9590075Sobrien    DW_TAG_interface_type = 0x38,
9690075Sobrien    DW_TAG_namespace = 0x39,
9790075Sobrien    DW_TAG_imported_module = 0x3a,
9890075Sobrien    DW_TAG_unspecified_type = 0x3b,
9990075Sobrien    DW_TAG_partial_unit = 0x3c,
10090075Sobrien    DW_TAG_imported_unit = 0x3d,
10190075Sobrien    /* SGI/MIPS Extensions.  */
10250397Sobrien    DW_TAG_MIPS_loop = 0x4081,
10390075Sobrien    /* GNU extensions.  */
10490075Sobrien    DW_TAG_format_label = 0x4101,	/* For FORTRAN 77 and Fortran 90.  */
10590075Sobrien    DW_TAG_function_template = 0x4102,	/* For C++.  */
10690075Sobrien    DW_TAG_class_template = 0x4103,	/* For C++.  */
10790075Sobrien    DW_TAG_GNU_BINCL = 0x4104,
10890075Sobrien    DW_TAG_GNU_EINCL = 0x4105
10950397Sobrien  };
11050397Sobrien
11150397Sobrien#define DW_TAG_lo_user	0x4080
11250397Sobrien#define DW_TAG_hi_user	0xffff
11350397Sobrien
11490075Sobrien/* Flag that tells whether entry has a child or not.  */
11550397Sobrien#define DW_children_no   0
11650397Sobrien#define	DW_children_yes  1
11750397Sobrien
11850397Sobrien/* Form names and codes.  */
11950397Sobrienenum dwarf_form
12050397Sobrien  {
12150397Sobrien    DW_FORM_addr = 0x01,
12250397Sobrien    DW_FORM_block2 = 0x03,
12350397Sobrien    DW_FORM_block4 = 0x04,
12450397Sobrien    DW_FORM_data2 = 0x05,
12550397Sobrien    DW_FORM_data4 = 0x06,
12650397Sobrien    DW_FORM_data8 = 0x07,
12750397Sobrien    DW_FORM_string = 0x08,
12850397Sobrien    DW_FORM_block = 0x09,
12950397Sobrien    DW_FORM_block1 = 0x0a,
13050397Sobrien    DW_FORM_data1 = 0x0b,
13150397Sobrien    DW_FORM_flag = 0x0c,
13250397Sobrien    DW_FORM_sdata = 0x0d,
13350397Sobrien    DW_FORM_strp = 0x0e,
13450397Sobrien    DW_FORM_udata = 0x0f,
13550397Sobrien    DW_FORM_ref_addr = 0x10,
13650397Sobrien    DW_FORM_ref1 = 0x11,
13750397Sobrien    DW_FORM_ref2 = 0x12,
13850397Sobrien    DW_FORM_ref4 = 0x13,
13950397Sobrien    DW_FORM_ref8 = 0x14,
14050397Sobrien    DW_FORM_ref_udata = 0x15,
14150397Sobrien    DW_FORM_indirect = 0x16
14250397Sobrien  };
14350397Sobrien
14450397Sobrien/* Attribute names and codes.  */
14550397Sobrien
14650397Sobrienenum dwarf_attribute
14750397Sobrien  {
14850397Sobrien    DW_AT_sibling = 0x01,
14950397Sobrien    DW_AT_location = 0x02,
15050397Sobrien    DW_AT_name = 0x03,
15150397Sobrien    DW_AT_ordering = 0x09,
15250397Sobrien    DW_AT_subscr_data = 0x0a,
15350397Sobrien    DW_AT_byte_size = 0x0b,
15450397Sobrien    DW_AT_bit_offset = 0x0c,
15550397Sobrien    DW_AT_bit_size = 0x0d,
15650397Sobrien    DW_AT_element_list = 0x0f,
15750397Sobrien    DW_AT_stmt_list = 0x10,
15850397Sobrien    DW_AT_low_pc = 0x11,
15950397Sobrien    DW_AT_high_pc = 0x12,
16050397Sobrien    DW_AT_language = 0x13,
16150397Sobrien    DW_AT_member = 0x14,
16250397Sobrien    DW_AT_discr = 0x15,
16350397Sobrien    DW_AT_discr_value = 0x16,
16450397Sobrien    DW_AT_visibility = 0x17,
16550397Sobrien    DW_AT_import = 0x18,
16650397Sobrien    DW_AT_string_length = 0x19,
16750397Sobrien    DW_AT_common_reference = 0x1a,
16850397Sobrien    DW_AT_comp_dir = 0x1b,
16950397Sobrien    DW_AT_const_value = 0x1c,
17050397Sobrien    DW_AT_containing_type = 0x1d,
17150397Sobrien    DW_AT_default_value = 0x1e,
17250397Sobrien    DW_AT_inline = 0x20,
17350397Sobrien    DW_AT_is_optional = 0x21,
17450397Sobrien    DW_AT_lower_bound = 0x22,
17550397Sobrien    DW_AT_producer = 0x25,
17650397Sobrien    DW_AT_prototyped = 0x27,
17750397Sobrien    DW_AT_return_addr = 0x2a,
17850397Sobrien    DW_AT_start_scope = 0x2c,
17950397Sobrien    DW_AT_stride_size = 0x2e,
18050397Sobrien    DW_AT_upper_bound = 0x2f,
18150397Sobrien    DW_AT_abstract_origin = 0x31,
18250397Sobrien    DW_AT_accessibility = 0x32,
18350397Sobrien    DW_AT_address_class = 0x33,
18450397Sobrien    DW_AT_artificial = 0x34,
18550397Sobrien    DW_AT_base_types = 0x35,
18650397Sobrien    DW_AT_calling_convention = 0x36,
18750397Sobrien    DW_AT_count = 0x37,
18850397Sobrien    DW_AT_data_member_location = 0x38,
18950397Sobrien    DW_AT_decl_column = 0x39,
19050397Sobrien    DW_AT_decl_file = 0x3a,
19150397Sobrien    DW_AT_decl_line = 0x3b,
19250397Sobrien    DW_AT_declaration = 0x3c,
19350397Sobrien    DW_AT_discr_list = 0x3d,
19450397Sobrien    DW_AT_encoding = 0x3e,
19550397Sobrien    DW_AT_external = 0x3f,
19650397Sobrien    DW_AT_frame_base = 0x40,
19750397Sobrien    DW_AT_friend = 0x41,
19850397Sobrien    DW_AT_identifier_case = 0x42,
19950397Sobrien    DW_AT_macro_info = 0x43,
20050397Sobrien    DW_AT_namelist_items = 0x44,
20150397Sobrien    DW_AT_priority = 0x45,
20250397Sobrien    DW_AT_segment = 0x46,
20350397Sobrien    DW_AT_specification = 0x47,
20450397Sobrien    DW_AT_static_link = 0x48,
20550397Sobrien    DW_AT_type = 0x49,
20650397Sobrien    DW_AT_use_location = 0x4a,
20750397Sobrien    DW_AT_variable_parameter = 0x4b,
20850397Sobrien    DW_AT_virtuality = 0x4c,
20950397Sobrien    DW_AT_vtable_elem_location = 0x4d,
21090075Sobrien    /* DWARF 3 values.  */
21190075Sobrien    DW_AT_allocated     = 0x4e,
21290075Sobrien    DW_AT_associated    = 0x4f,
21390075Sobrien    DW_AT_data_location = 0x50,
21490075Sobrien    DW_AT_stride        = 0x51,
21590075Sobrien    DW_AT_entry_pc      = 0x52,
21690075Sobrien    DW_AT_use_UTF8      = 0x53,
21790075Sobrien    DW_AT_extension     = 0x54,
21890075Sobrien    DW_AT_ranges        = 0x55,
21990075Sobrien    DW_AT_trampoline    = 0x56,
22090075Sobrien    DW_AT_call_column   = 0x57,
22190075Sobrien    DW_AT_call_file     = 0x58,
22290075Sobrien    DW_AT_call_line     = 0x59,
22390075Sobrien    /* SGI/MIPS Extensions.  */
22450397Sobrien    DW_AT_MIPS_fde = 0x2001,
22550397Sobrien    DW_AT_MIPS_loop_begin = 0x2002,
22650397Sobrien    DW_AT_MIPS_tail_loop_begin = 0x2003,
22750397Sobrien    DW_AT_MIPS_epilog_begin = 0x2004,
22850397Sobrien    DW_AT_MIPS_loop_unroll_factor = 0x2005,
22950397Sobrien    DW_AT_MIPS_software_pipeline_depth = 0x2006,
23050397Sobrien    DW_AT_MIPS_linkage_name = 0x2007,
23150397Sobrien    DW_AT_MIPS_stride = 0x2008,
23250397Sobrien    DW_AT_MIPS_abstract_name = 0x2009,
23350397Sobrien    DW_AT_MIPS_clone_origin = 0x200a,
23450397Sobrien    DW_AT_MIPS_has_inlines = 0x200b,
23550397Sobrien    /* GNU extensions.  */
23690075Sobrien    DW_AT_sf_names   = 0x2101,
23790075Sobrien    DW_AT_src_info   = 0x2102,
23890075Sobrien    DW_AT_mac_info   = 0x2103,
23950397Sobrien    DW_AT_src_coords = 0x2104,
24050397Sobrien    DW_AT_body_begin = 0x2105,
24190075Sobrien    DW_AT_body_end   = 0x2106,
24296263Sobrien    DW_AT_GNU_vector = 0x2107,
24390075Sobrien    /* VMS Extensions.  */
24490075Sobrien    DW_AT_VMS_rtnbeg_pd_address = 0x2201
24550397Sobrien  };
24650397Sobrien
24790075Sobrien#define DW_AT_lo_user	0x2000	/* Implementation-defined range start.  */
24890075Sobrien#define DW_AT_hi_user	0x3ff0	/* Implementation-defined range end.  */
24950397Sobrien
25050397Sobrien/* Location atom names and codes.  */
25150397Sobrienenum dwarf_location_atom
25250397Sobrien  {
25350397Sobrien    DW_OP_addr = 0x03,
25450397Sobrien    DW_OP_deref = 0x06,
25550397Sobrien    DW_OP_const1u = 0x08,
25650397Sobrien    DW_OP_const1s = 0x09,
25750397Sobrien    DW_OP_const2u = 0x0a,
25850397Sobrien    DW_OP_const2s = 0x0b,
25950397Sobrien    DW_OP_const4u = 0x0c,
26050397Sobrien    DW_OP_const4s = 0x0d,
26150397Sobrien    DW_OP_const8u = 0x0e,
26250397Sobrien    DW_OP_const8s = 0x0f,
26350397Sobrien    DW_OP_constu = 0x10,
26450397Sobrien    DW_OP_consts = 0x11,
26550397Sobrien    DW_OP_dup = 0x12,
26650397Sobrien    DW_OP_drop = 0x13,
26750397Sobrien    DW_OP_over = 0x14,
26850397Sobrien    DW_OP_pick = 0x15,
26950397Sobrien    DW_OP_swap = 0x16,
27050397Sobrien    DW_OP_rot = 0x17,
27150397Sobrien    DW_OP_xderef = 0x18,
27250397Sobrien    DW_OP_abs = 0x19,
27350397Sobrien    DW_OP_and = 0x1a,
27450397Sobrien    DW_OP_div = 0x1b,
27550397Sobrien    DW_OP_minus = 0x1c,
27650397Sobrien    DW_OP_mod = 0x1d,
27750397Sobrien    DW_OP_mul = 0x1e,
27850397Sobrien    DW_OP_neg = 0x1f,
27950397Sobrien    DW_OP_not = 0x20,
28050397Sobrien    DW_OP_or = 0x21,
28150397Sobrien    DW_OP_plus = 0x22,
28250397Sobrien    DW_OP_plus_uconst = 0x23,
28350397Sobrien    DW_OP_shl = 0x24,
28450397Sobrien    DW_OP_shr = 0x25,
28550397Sobrien    DW_OP_shra = 0x26,
28650397Sobrien    DW_OP_xor = 0x27,
28750397Sobrien    DW_OP_bra = 0x28,
28850397Sobrien    DW_OP_eq = 0x29,
28950397Sobrien    DW_OP_ge = 0x2a,
29050397Sobrien    DW_OP_gt = 0x2b,
29150397Sobrien    DW_OP_le = 0x2c,
29250397Sobrien    DW_OP_lt = 0x2d,
29350397Sobrien    DW_OP_ne = 0x2e,
29450397Sobrien    DW_OP_skip = 0x2f,
29550397Sobrien    DW_OP_lit0 = 0x30,
29650397Sobrien    DW_OP_lit1 = 0x31,
29750397Sobrien    DW_OP_lit2 = 0x32,
29850397Sobrien    DW_OP_lit3 = 0x33,
29950397Sobrien    DW_OP_lit4 = 0x34,
30050397Sobrien    DW_OP_lit5 = 0x35,
30150397Sobrien    DW_OP_lit6 = 0x36,
30250397Sobrien    DW_OP_lit7 = 0x37,
30350397Sobrien    DW_OP_lit8 = 0x38,
30450397Sobrien    DW_OP_lit9 = 0x39,
30550397Sobrien    DW_OP_lit10 = 0x3a,
30650397Sobrien    DW_OP_lit11 = 0x3b,
30750397Sobrien    DW_OP_lit12 = 0x3c,
30850397Sobrien    DW_OP_lit13 = 0x3d,
30950397Sobrien    DW_OP_lit14 = 0x3e,
31050397Sobrien    DW_OP_lit15 = 0x3f,
31150397Sobrien    DW_OP_lit16 = 0x40,
31250397Sobrien    DW_OP_lit17 = 0x41,
31350397Sobrien    DW_OP_lit18 = 0x42,
31450397Sobrien    DW_OP_lit19 = 0x43,
31550397Sobrien    DW_OP_lit20 = 0x44,
31650397Sobrien    DW_OP_lit21 = 0x45,
31750397Sobrien    DW_OP_lit22 = 0x46,
31850397Sobrien    DW_OP_lit23 = 0x47,
31950397Sobrien    DW_OP_lit24 = 0x48,
32050397Sobrien    DW_OP_lit25 = 0x49,
32150397Sobrien    DW_OP_lit26 = 0x4a,
32250397Sobrien    DW_OP_lit27 = 0x4b,
32350397Sobrien    DW_OP_lit28 = 0x4c,
32450397Sobrien    DW_OP_lit29 = 0x4d,
32550397Sobrien    DW_OP_lit30 = 0x4e,
32650397Sobrien    DW_OP_lit31 = 0x4f,
32750397Sobrien    DW_OP_reg0 = 0x50,
32850397Sobrien    DW_OP_reg1 = 0x51,
32950397Sobrien    DW_OP_reg2 = 0x52,
33050397Sobrien    DW_OP_reg3 = 0x53,
33150397Sobrien    DW_OP_reg4 = 0x54,
33250397Sobrien    DW_OP_reg5 = 0x55,
33350397Sobrien    DW_OP_reg6 = 0x56,
33450397Sobrien    DW_OP_reg7 = 0x57,
33550397Sobrien    DW_OP_reg8 = 0x58,
33650397Sobrien    DW_OP_reg9 = 0x59,
33750397Sobrien    DW_OP_reg10 = 0x5a,
33850397Sobrien    DW_OP_reg11 = 0x5b,
33950397Sobrien    DW_OP_reg12 = 0x5c,
34050397Sobrien    DW_OP_reg13 = 0x5d,
34150397Sobrien    DW_OP_reg14 = 0x5e,
34250397Sobrien    DW_OP_reg15 = 0x5f,
34350397Sobrien    DW_OP_reg16 = 0x60,
34450397Sobrien    DW_OP_reg17 = 0x61,
34550397Sobrien    DW_OP_reg18 = 0x62,
34650397Sobrien    DW_OP_reg19 = 0x63,
34750397Sobrien    DW_OP_reg20 = 0x64,
34850397Sobrien    DW_OP_reg21 = 0x65,
34950397Sobrien    DW_OP_reg22 = 0x66,
35050397Sobrien    DW_OP_reg23 = 0x67,
35150397Sobrien    DW_OP_reg24 = 0x68,
35250397Sobrien    DW_OP_reg25 = 0x69,
35350397Sobrien    DW_OP_reg26 = 0x6a,
35450397Sobrien    DW_OP_reg27 = 0x6b,
35550397Sobrien    DW_OP_reg28 = 0x6c,
35650397Sobrien    DW_OP_reg29 = 0x6d,
35750397Sobrien    DW_OP_reg30 = 0x6e,
35850397Sobrien    DW_OP_reg31 = 0x6f,
35950397Sobrien    DW_OP_breg0 = 0x70,
36050397Sobrien    DW_OP_breg1 = 0x71,
36150397Sobrien    DW_OP_breg2 = 0x72,
36250397Sobrien    DW_OP_breg3 = 0x73,
36350397Sobrien    DW_OP_breg4 = 0x74,
36450397Sobrien    DW_OP_breg5 = 0x75,
36550397Sobrien    DW_OP_breg6 = 0x76,
36650397Sobrien    DW_OP_breg7 = 0x77,
36750397Sobrien    DW_OP_breg8 = 0x78,
36850397Sobrien    DW_OP_breg9 = 0x79,
36950397Sobrien    DW_OP_breg10 = 0x7a,
37050397Sobrien    DW_OP_breg11 = 0x7b,
37150397Sobrien    DW_OP_breg12 = 0x7c,
37250397Sobrien    DW_OP_breg13 = 0x7d,
37350397Sobrien    DW_OP_breg14 = 0x7e,
37450397Sobrien    DW_OP_breg15 = 0x7f,
37550397Sobrien    DW_OP_breg16 = 0x80,
37650397Sobrien    DW_OP_breg17 = 0x81,
37750397Sobrien    DW_OP_breg18 = 0x82,
37850397Sobrien    DW_OP_breg19 = 0x83,
37950397Sobrien    DW_OP_breg20 = 0x84,
38050397Sobrien    DW_OP_breg21 = 0x85,
38150397Sobrien    DW_OP_breg22 = 0x86,
38250397Sobrien    DW_OP_breg23 = 0x87,
38350397Sobrien    DW_OP_breg24 = 0x88,
38450397Sobrien    DW_OP_breg25 = 0x89,
38550397Sobrien    DW_OP_breg26 = 0x8a,
38650397Sobrien    DW_OP_breg27 = 0x8b,
38750397Sobrien    DW_OP_breg28 = 0x8c,
38850397Sobrien    DW_OP_breg29 = 0x8d,
38950397Sobrien    DW_OP_breg30 = 0x8e,
39050397Sobrien    DW_OP_breg31 = 0x8f,
39150397Sobrien    DW_OP_regx = 0x90,
39250397Sobrien    DW_OP_fbreg = 0x91,
39350397Sobrien    DW_OP_bregx = 0x92,
39450397Sobrien    DW_OP_piece = 0x93,
39550397Sobrien    DW_OP_deref_size = 0x94,
39650397Sobrien    DW_OP_xderef_size = 0x95,
39790075Sobrien    DW_OP_nop = 0x96,
39890075Sobrien    /* DWARF 3 extensions.  */
39990075Sobrien    DW_OP_push_object_address = 0x97,
40090075Sobrien    DW_OP_call2 = 0x98,
40190075Sobrien    DW_OP_call4 = 0x99,
402117395Skan    DW_OP_call_ref = 0x9a,
403117395Skan    /* GNU extensions.  */
404117395Skan    DW_OP_GNU_push_tls_address = 0xe0
40550397Sobrien  };
40650397Sobrien
407117395Skan#define DW_OP_lo_user	0xe0	/* Implementation-defined range start.  */
40890075Sobrien#define DW_OP_hi_user	0xff	/* Implementation-defined range end.  */
40950397Sobrien
41050397Sobrien/* Type encodings.  */
41150397Sobrienenum dwarf_type
41250397Sobrien  {
41350397Sobrien    DW_ATE_void = 0x0,
41450397Sobrien    DW_ATE_address = 0x1,
41550397Sobrien    DW_ATE_boolean = 0x2,
41650397Sobrien    DW_ATE_complex_float = 0x3,
41750397Sobrien    DW_ATE_float = 0x4,
41850397Sobrien    DW_ATE_signed = 0x5,
41950397Sobrien    DW_ATE_signed_char = 0x6,
42050397Sobrien    DW_ATE_unsigned = 0x7,
42190075Sobrien    DW_ATE_unsigned_char = 0x8,
42290075Sobrien    /* DWARF 3.  */
42390075Sobrien    DW_ATE_imaginary_float = 0x9
42450397Sobrien  };
42550397Sobrien
42650397Sobrien#define	DW_ATE_lo_user 0x80
42750397Sobrien#define	DW_ATE_hi_user 0xff
42850397Sobrien
42950397Sobrien/* Array ordering names and codes.  */
43050397Sobrienenum dwarf_array_dim_ordering
43150397Sobrien  {
43250397Sobrien    DW_ORD_row_major = 0,
43350397Sobrien    DW_ORD_col_major = 1
43450397Sobrien  };
43550397Sobrien
43690075Sobrien/* Access attribute.  */
43750397Sobrienenum dwarf_access_attribute
43850397Sobrien  {
43950397Sobrien    DW_ACCESS_public = 1,
44050397Sobrien    DW_ACCESS_protected = 2,
44150397Sobrien    DW_ACCESS_private = 3
44250397Sobrien  };
44350397Sobrien
44490075Sobrien/* Visibility.  */
44550397Sobrienenum dwarf_visibility_attribute
44650397Sobrien  {
44750397Sobrien    DW_VIS_local = 1,
44850397Sobrien    DW_VIS_exported = 2,
44950397Sobrien    DW_VIS_qualified = 3
45050397Sobrien  };
45150397Sobrien
45290075Sobrien/* Virtuality.  */
45350397Sobrienenum dwarf_virtuality_attribute
45450397Sobrien  {
45550397Sobrien    DW_VIRTUALITY_none = 0,
45650397Sobrien    DW_VIRTUALITY_virtual = 1,
45750397Sobrien    DW_VIRTUALITY_pure_virtual = 2
45850397Sobrien  };
45950397Sobrien
46090075Sobrien/* Case sensitivity.  */
46150397Sobrienenum dwarf_id_case
46250397Sobrien  {
46350397Sobrien    DW_ID_case_sensitive = 0,
46450397Sobrien    DW_ID_up_case = 1,
46550397Sobrien    DW_ID_down_case = 2,
46650397Sobrien    DW_ID_case_insensitive = 3
46750397Sobrien  };
46850397Sobrien
46990075Sobrien/* Calling convention.  */
47050397Sobrienenum dwarf_calling_convention
47150397Sobrien  {
47250397Sobrien    DW_CC_normal = 0x1,
47350397Sobrien    DW_CC_program = 0x2,
47450397Sobrien    DW_CC_nocall = 0x3
47550397Sobrien  };
47650397Sobrien
47750397Sobrien#define DW_CC_lo_user 0x40
47850397Sobrien#define DW_CC_hi_user 0xff
47950397Sobrien
48090075Sobrien/* Inline attribute.  */
48150397Sobrienenum dwarf_inline_attribute
48250397Sobrien  {
48350397Sobrien    DW_INL_not_inlined = 0,
48450397Sobrien    DW_INL_inlined = 1,
48550397Sobrien    DW_INL_declared_not_inlined = 2,
48650397Sobrien    DW_INL_declared_inlined = 3
48750397Sobrien  };
48850397Sobrien
48990075Sobrien/* Discriminant lists.  */
49050397Sobrienenum dwarf_discrim_list
49150397Sobrien  {
49250397Sobrien    DW_DSC_label = 0,
49350397Sobrien    DW_DSC_range = 1
49450397Sobrien  };
49550397Sobrien
49690075Sobrien/* Line number opcodes.  */
49750397Sobrienenum dwarf_line_number_ops
49850397Sobrien  {
49950397Sobrien    DW_LNS_extended_op = 0,
50050397Sobrien    DW_LNS_copy = 1,
50150397Sobrien    DW_LNS_advance_pc = 2,
50250397Sobrien    DW_LNS_advance_line = 3,
50350397Sobrien    DW_LNS_set_file = 4,
50450397Sobrien    DW_LNS_set_column = 5,
50550397Sobrien    DW_LNS_negate_stmt = 6,
50650397Sobrien    DW_LNS_set_basic_block = 7,
50750397Sobrien    DW_LNS_const_add_pc = 8,
50890075Sobrien    DW_LNS_fixed_advance_pc = 9,
50990075Sobrien    /* DWARF 3.  */
51090075Sobrien    DW_LNS_set_prologue_end = 10,
51190075Sobrien    DW_LNS_set_epilogue_begin = 11,
51290075Sobrien    DW_LNS_set_isa = 12
51350397Sobrien  };
51450397Sobrien
51590075Sobrien/* Line number extended opcodes.  */
51650397Sobrienenum dwarf_line_number_x_ops
51750397Sobrien  {
51850397Sobrien    DW_LNE_end_sequence = 1,
51950397Sobrien    DW_LNE_set_address = 2,
52050397Sobrien    DW_LNE_define_file = 3
52150397Sobrien  };
52250397Sobrien
52390075Sobrien/* Call frame information.  */
52450397Sobrienenum dwarf_call_frame_info
52550397Sobrien  {
52650397Sobrien    DW_CFA_advance_loc = 0x40,
52750397Sobrien    DW_CFA_offset = 0x80,
52850397Sobrien    DW_CFA_restore = 0xc0,
52950397Sobrien    DW_CFA_nop = 0x00,
53050397Sobrien    DW_CFA_set_loc = 0x01,
53150397Sobrien    DW_CFA_advance_loc1 = 0x02,
53250397Sobrien    DW_CFA_advance_loc2 = 0x03,
53350397Sobrien    DW_CFA_advance_loc4 = 0x04,
53450397Sobrien    DW_CFA_offset_extended = 0x05,
53550397Sobrien    DW_CFA_restore_extended = 0x06,
53650397Sobrien    DW_CFA_undefined = 0x07,
53750397Sobrien    DW_CFA_same_value = 0x08,
53850397Sobrien    DW_CFA_register = 0x09,
53950397Sobrien    DW_CFA_remember_state = 0x0a,
54050397Sobrien    DW_CFA_restore_state = 0x0b,
54150397Sobrien    DW_CFA_def_cfa = 0x0c,
54250397Sobrien    DW_CFA_def_cfa_register = 0x0d,
54350397Sobrien    DW_CFA_def_cfa_offset = 0x0e,
54490075Sobrien
54590075Sobrien    /* DWARF 3.  */
54690075Sobrien    DW_CFA_def_cfa_expression = 0x0f,
54790075Sobrien    DW_CFA_expression = 0x10,
54890075Sobrien    DW_CFA_offset_extended_sf = 0x11,
54990075Sobrien    DW_CFA_def_cfa_sf = 0x12,
55090075Sobrien    DW_CFA_def_cfa_offset_sf = 0x13,
55190075Sobrien
55290075Sobrien    /* SGI/MIPS specific.  */
55350397Sobrien    DW_CFA_MIPS_advance_loc8 = 0x1d,
55450397Sobrien
55590075Sobrien    /* GNU extensions.  */
55650397Sobrien    DW_CFA_GNU_window_save = 0x2d,
55770635Sobrien    DW_CFA_GNU_args_size = 0x2e,
55870635Sobrien    DW_CFA_GNU_negative_offset_extended = 0x2f
55950397Sobrien  };
56050397Sobrien
56150397Sobrien#define DW_CIE_ID	  0xffffffff
56250397Sobrien#define DW_CIE_VERSION	  1
56350397Sobrien
56450397Sobrien#define DW_CFA_extended   0
56550397Sobrien#define DW_CFA_low_user   0x1c
56650397Sobrien#define DW_CFA_high_user  0x3f
56750397Sobrien
56850397Sobrien#define DW_CHILDREN_no		     0x00
56950397Sobrien#define DW_CHILDREN_yes		     0x01
57050397Sobrien
57150397Sobrien#define DW_ADDR_none		0
57250397Sobrien
57350397Sobrien/* Source language names and codes.  */
57450397Sobrienenum dwarf_source_language
57550397Sobrien  {
57650397Sobrien    DW_LANG_C89 = 0x0001,
57750397Sobrien    DW_LANG_C = 0x0002,
57850397Sobrien    DW_LANG_Ada83 = 0x0003,
57950397Sobrien    DW_LANG_C_plus_plus = 0x0004,
58050397Sobrien    DW_LANG_Cobol74 = 0x0005,
58150397Sobrien    DW_LANG_Cobol85 = 0x0006,
58250397Sobrien    DW_LANG_Fortran77 = 0x0007,
58350397Sobrien    DW_LANG_Fortran90 = 0x0008,
58450397Sobrien    DW_LANG_Pascal83 = 0x0009,
58550397Sobrien    DW_LANG_Modula2 = 0x000a,
58690075Sobrien    DW_LANG_Java = 0x000b,
58790075Sobrien    /* DWARF 3.  */
58890075Sobrien    DW_LANG_C99 = 0x000c,
58990075Sobrien    DW_LANG_Ada95 = 0x000d,
59090075Sobrien    DW_LANG_Fortran95 = 0x000e,
59190075Sobrien    /* MIPS.  */
59250397Sobrien    DW_LANG_Mips_Assembler = 0x8001
59350397Sobrien  };
59450397Sobrien
59550397Sobrien
59690075Sobrien#define DW_LANG_lo_user 0x8000	/* Implementation-defined range start.  */
59790075Sobrien#define DW_LANG_hi_user 0xffff	/* Implementation-defined range start.  */
59850397Sobrien
59950397Sobrien/* Names and codes for macro information.  */
60050397Sobrienenum dwarf_macinfo_record_type
60150397Sobrien  {
60250397Sobrien    DW_MACINFO_define = 1,
60350397Sobrien    DW_MACINFO_undef = 2,
60450397Sobrien    DW_MACINFO_start_file = 3,
60550397Sobrien    DW_MACINFO_end_file = 4,
60650397Sobrien    DW_MACINFO_vendor_ext = 255
60750397Sobrien  };
60890075Sobrien
60990075Sobrien/* @@@ For use with GNU frame unwind information.  */
61090075Sobrien
61190075Sobrien#define DW_EH_PE_absptr		0x00
61290075Sobrien#define DW_EH_PE_omit		0xff
61390075Sobrien
61490075Sobrien#define DW_EH_PE_uleb128	0x01
61590075Sobrien#define DW_EH_PE_udata2		0x02
61690075Sobrien#define DW_EH_PE_udata4		0x03
61790075Sobrien#define DW_EH_PE_udata8		0x04
61890075Sobrien#define DW_EH_PE_sleb128	0x09
61990075Sobrien#define DW_EH_PE_sdata2		0x0A
62090075Sobrien#define DW_EH_PE_sdata4		0x0B
62190075Sobrien#define DW_EH_PE_sdata8		0x0C
62290075Sobrien#define DW_EH_PE_signed		0x08
62390075Sobrien
62490075Sobrien#define DW_EH_PE_pcrel		0x10
62590075Sobrien#define DW_EH_PE_textrel	0x20
62690075Sobrien#define DW_EH_PE_datarel	0x30
62790075Sobrien#define DW_EH_PE_funcrel	0x40
62890075Sobrien#define DW_EH_PE_aligned	0x50
62990075Sobrien
63090075Sobrien#define DW_EH_PE_indirect	0x80
631