17c478bdstevel@tonic-gate/*
207dc194Richard Lowe  Copyright (C) 2000,2001,2003,2004,2005,2006 Silicon Graphics, Inc.  All Rights Reserved.
307dc194Richard Lowe  Portions Copyright 2002-2010 Sun Microsystems, Inc. All rights reserved.
407dc194Richard Lowe  Portions Copyright 2007-2010 David Anderson. All rights reserved.
57c478bdstevel@tonic-gate
67c478bdstevel@tonic-gate  This program is free software; you can redistribute it and/or modify it
77c478bdstevel@tonic-gate  under the terms of version 2.1 of the GNU Lesser General Public License
87c478bdstevel@tonic-gate  as published by the Free Software Foundation.
97c478bdstevel@tonic-gate
107c478bdstevel@tonic-gate  This program is distributed in the hope that it would be useful, but
117c478bdstevel@tonic-gate  WITHOUT ANY WARRANTY; without even the implied warranty of
127c478bdstevel@tonic-gate  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
137c478bdstevel@tonic-gate
147c478bdstevel@tonic-gate  Further, this software is distributed without any warranty that it is
157c478bdstevel@tonic-gate  free of the rightful claim of any third person regarding infringement
167c478bdstevel@tonic-gate  or the like.  Any license provided herein, whether implied or
177c478bdstevel@tonic-gate  otherwise, applies only to this software file.  Patent licenses, if
187c478bdstevel@tonic-gate  any, provided herein do not apply to combinations of this program with
197c478bdstevel@tonic-gate  other software, or any other product whatsoever.
207c478bdstevel@tonic-gate
2107dc194Richard Lowe  You should have received a copy of the GNU Lesser General Public
2207dc194Richard Lowe  License along with this program; if not, write the Free Software
2307dc194Richard Lowe  Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston MA 02110-1301,
247c478bdstevel@tonic-gate  USA.
257c478bdstevel@tonic-gate
2607dc194Richard Lowe  Contact information:  Silicon Graphics, Inc., 1500 Crittenden Lane,
277c478bdstevel@tonic-gate  Mountain View, CA 94043, or:
287c478bdstevel@tonic-gate
297c478bdstevel@tonic-gate  http://www.sgi.com
307c478bdstevel@tonic-gate
317c478bdstevel@tonic-gate  For further information regarding this notice, see:
327c478bdstevel@tonic-gate
337c478bdstevel@tonic-gate  http://oss.sgi.com/projects/GenInfo/NoticeExplan
347c478bdstevel@tonic-gate
357c478bdstevel@tonic-gate*/
367c478bdstevel@tonic-gate
377c478bdstevel@tonic-gate
387c478bdstevel@tonic-gate#ifndef __DWARF_H
397c478bdstevel@tonic-gate#define __DWARF_H
407c478bdstevel@tonic-gate#ifdef __cplusplus
417c478bdstevel@tonic-gateextern "C" {
427c478bdstevel@tonic-gate#endif
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gate/*
4507dc194Richard Lowe        dwarf.h   DWARF  debugging information values
4607dc194Richard Lowe        $Revision: 1.41 $    $Date: 2006/04/17 00:09:56 $
4749d3bc9Richard Lowe
4807dc194Richard Lowe        The comment "DWARF3" appears where there are
4907dc194Richard Lowe        new entries from DWARF3 as of 2004, "DWARF3f"
5007dc194Richard Lowe        where there are new entries as of the November 2005
5107dc194Richard Lowe        public review document and other comments apply
5207dc194Richard Lowe        where extension entries appear.
537c478bdstevel@tonic-gate
5407dc194Richard Lowe        Extensions part of DWARF4 are marked DWARF4.
5507dc194Richard Lowe
5607dc194Richard Lowe        A few extension names have omitted the 'vendor id'
5707dc194Richard Lowe        (See chapter 7, "Vendor Extensibility"). Please
5807dc194Richard Lowe        always use a 'vendor id' string in extension names.
597c478bdstevel@tonic-gate
6007dc194Richard Lowe        Vendors should use a vendor string in names and
6107dc194Richard Lowe        whereever possible avoid duplicating values used by
6207dc194Richard Lowe        other vendor extensions
637c478bdstevel@tonic-gate
647c478bdstevel@tonic-gate*/
657c478bdstevel@tonic-gate
6607dc194Richard Lowe
6707dc194Richard Lowe#define DW_TAG_array_type               0x01
6807dc194Richard Lowe#define DW_TAG_class_type               0x02
6907dc194Richard Lowe#define DW_TAG_entry_point              0x03
7007dc194Richard Lowe#define DW_TAG_enumeration_type         0x04
7107dc194Richard Lowe#define DW_TAG_formal_parameter         0x05
7207dc194Richard Lowe#define DW_TAG_imported_declaration     0x08
7307dc194Richard Lowe#define DW_TAG_label                    0x0a
7407dc194Richard Lowe#define DW_TAG_lexical_block            0x0b
7507dc194Richard Lowe#define DW_TAG_member                   0x0d
7607dc194Richard Lowe#define DW_TAG_pointer_type             0x0f
7707dc194Richard Lowe#define DW_TAG_reference_type           0x10
7807dc194Richard Lowe#define DW_TAG_compile_unit             0x11
7907dc194Richard Lowe#define DW_TAG_string_type              0x12
8007dc194Richard Lowe#define DW_TAG_structure_type           0x13
8107dc194Richard Lowe#define DW_TAG_subroutine_type          0x15
8207dc194Richard Lowe#define DW_TAG_typedef                  0x16
8307dc194Richard Lowe#define DW_TAG_union_type               0x17
8407dc194Richard Lowe#define DW_TAG_unspecified_parameters   0x18
8507dc194Richard Lowe#define DW_TAG_variant                  0x19
8607dc194Richard Lowe#define DW_TAG_common_block             0x1a
8707dc194Richard Lowe#define DW_TAG_common_inclusion         0x1b
8807dc194Richard Lowe#define DW_TAG_inheritance              0x1c
8907dc194Richard Lowe#define DW_TAG_inlined_subroutine       0x1d
9007dc194Richard Lowe#define DW_TAG_module                   0x1e
9107dc194Richard Lowe#define DW_TAG_ptr_to_member_type       0x1f
9207dc194Richard Lowe#define DW_TAG_set_type                 0x20
9307dc194Richard Lowe#define DW_TAG_subrange_type            0x21
9407dc194Richard Lowe#define DW_TAG_with_stmt                0x22
9507dc194Richard Lowe#define DW_TAG_access_declaration       0x23
9607dc194Richard Lowe#define DW_TAG_base_type                0x24
9707dc194Richard Lowe#define DW_TAG_catch_block              0x25
9807dc194Richard Lowe#define DW_TAG_const_type               0x26
9907dc194Richard Lowe#define DW_TAG_constant                 0x27
10007dc194Richard Lowe#define DW_TAG_enumerator               0x28
10107dc194Richard Lowe#define DW_TAG_file_type                0x29
10207dc194Richard Lowe#define DW_TAG_friend                   0x2a
10307dc194Richard Lowe#define DW_TAG_namelist                 0x2b
10407dc194Richard Lowe        /* Early releases of this header had the following
10507dc194Richard Lowe           misspelled with a trailing 's' */
10607dc194Richard Lowe#define DW_TAG_namelist_item            0x2c /* DWARF3/2 spelling */
10707dc194Richard Lowe#define DW_TAG_namelist_items           0x2c /* SGI misspelling/typo */
10807dc194Richard Lowe#define DW_TAG_packed_type              0x2d
10907dc194Richard Lowe#define DW_TAG_subprogram               0x2e
11007dc194Richard Lowe        /* The DWARF2 document had two spellings of the following
11107dc194Richard Lowe           two TAGs, DWARF3 specifies the longer spelling. */
11207dc194Richard Lowe#define DW_TAG_template_type_parameter  0x2f /* DWARF3/2 spelling*/
11307dc194Richard Lowe#define DW_TAG_template_type_param      0x2f /* DWARF2   spelling*/
11407dc194Richard Lowe#define DW_TAG_template_value_parameter 0x30 /* DWARF3/2 spelling*/
11507dc194Richard Lowe#define DW_TAG_template_value_param     0x30 /* DWARF2   spelling*/
11607dc194Richard Lowe#define DW_TAG_thrown_type              0x31
11707dc194Richard Lowe#define DW_TAG_try_block                0x32
11807dc194Richard Lowe#define DW_TAG_variant_part             0x33
11907dc194Richard Lowe#define DW_TAG_variable                 0x34
12007dc194Richard Lowe#define DW_TAG_volatile_type            0x35
12107dc194Richard Lowe#define DW_TAG_dwarf_procedure          0x36  /* DWARF3 */
12207dc194Richard Lowe#define DW_TAG_restrict_type            0x37  /* DWARF3 */
12307dc194Richard Lowe#define DW_TAG_interface_type           0x38  /* DWARF3 */
12407dc194Richard Lowe#define DW_TAG_namespace                0x39  /* DWARF3 */
12507dc194Richard Lowe#define DW_TAG_imported_module          0x3a  /* DWARF3 */
12607dc194Richard Lowe#define DW_TAG_unspecified_type         0x3b  /* DWARF3 */
12707dc194Richard Lowe#define DW_TAG_partial_unit             0x3c  /* DWARF3 */
12807dc194Richard Lowe#define DW_TAG_imported_unit            0x3d  /* DWARF3 */
12907dc194Richard Lowe        /* Do not use DW_TAG_mutable_type */
13007dc194Richard Lowe#define DW_TAG_mutable_type 0x3e /* Withdrawn from DWARF3 by DWARF3f. */
13107dc194Richard Lowe#define DW_TAG_condition                0x3f  /* DWARF3f */
13207dc194Richard Lowe#define DW_TAG_shared_type              0x40  /* DWARF3f */
13307dc194Richard Lowe#define DW_TAG_type_unit                0x41  /* DWARF4 */
13407dc194Richard Lowe#define DW_TAG_rvalue_reference_type    0x42  /* DWARF4 */
13507dc194Richard Lowe#define DW_TAG_template_alias           0x43  /* DWARF4 */
13607dc194Richard Lowe#define DW_TAG_lo_user                  0x4080
13707dc194Richard Lowe
13807dc194Richard Lowe#define DW_TAG_MIPS_loop                0x4081
13907dc194Richard Lowe
14007dc194Richard Lowe/* HP extensions: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz  */
14107dc194Richard Lowe#define DW_TAG_HP_array_descriptor      0x4090 /* HP */
14207dc194Richard Lowe
14307dc194Richard Lowe/* GNU extensions.  The first 3 missing the GNU_. */
14407dc194Richard Lowe#define DW_TAG_format_label             0x4101 /* GNU. Fortran. */
14507dc194Richard Lowe#define DW_TAG_function_template        0x4102 /* GNU. For C++ */
14607dc194Richard Lowe#define DW_TAG_class_template           0x4103 /* GNU. For C++ */
14707dc194Richard Lowe#define DW_TAG_GNU_BINCL                0x4104 /* GNU */
14807dc194Richard Lowe#define DW_TAG_GNU_EINCL                0x4105 /* GNU */
14907dc194Richard Lowe
15007dc194Richard Lowe
15107dc194Richard Lowe/* GNU extension. http://gcc.gnu.org/wiki/TemplateParmsDwarf */
15207dc194Richard Lowe#define DW_TAG_GNU_template_template_parameter  0x4106 /* GNU */
15307dc194Richard Lowe#define DW_TAG_GNU_template_template_param      0x4106 /* GNU */
15407dc194Richard Lowe#define DW_TAG_GNU_template_parameter_pack      0x4107 /* GNU */
15507dc194Richard Lowe#define DW_TAG_GNU_formal_parameter_pack        0x4108 /* GNU */
15607dc194Richard Lowe
15707dc194Richard Lowe/* ALTIUM extensions */
15807dc194Richard Lowe    /* DSP-C/Starcore __circ qualifier */
15907dc194Richard Lowe#define DW_TAG_ALTIUM_circ_type         0x5101 /* ALTIUM */
16007dc194Richard Lowe    /* Starcore __mwa_circ qualifier */
16107dc194Richard Lowe#define DW_TAG_ALTIUM_mwa_circ_type     0x5102 /* ALTIUM */
16207dc194Richard Lowe    /* Starcore __rev_carry qualifier */
16307dc194Richard Lowe#define DW_TAG_ALTIUM_rev_carry_type    0x5103 /* ALTIUM */
16407dc194Richard Lowe    /* M16 __rom qualifier */
16507dc194Richard Lowe#define DW_TAG_ALTIUM_rom               0x5111 /* ALTIUM */
16607dc194Richard Lowe
16749d3bc9Richard Lowe/* The following 3 are extensions to support UPC */
16849d3bc9Richard Lowe#define DW_TAG_upc_shared_type          0x8765 /* UPC */
16949d3bc9Richard Lowe#define DW_TAG_upc_strict_type          0x8766 /* UPC */
17049d3bc9Richard Lowe#define DW_TAG_upc_relaxed_type         0x8767 /* UPC */
1717c478bdstevel@tonic-gate
17207dc194Richard Lowe/* PGI (STMicroelectronics) extensions. */
17307dc194Richard Lowe#define DW_TAG_PGI_kanji_type           0xa000 /* PGI */
17407dc194Richard Lowe#define DW_TAG_PGI_interface_block      0xa020 /* PGI */
17507dc194Richard Lowe/* The following are SUN extensions */
17607dc194Richard Lowe#define DW_TAG_SUN_function_template    0x4201 /* SUN */
17707dc194Richard Lowe#define DW_TAG_SUN_class_template       0x4202 /* SUN */
17807dc194Richard Lowe#define DW_TAG_SUN_struct_template      0x4203 /* SUN */
17907dc194Richard Lowe#define DW_TAG_SUN_union_template       0x4204 /* SUN */
18007dc194Richard Lowe#define DW_TAG_SUN_indirect_inheritance 0x4205 /* SUN */
18107dc194Richard Lowe#define DW_TAG_SUN_codeflags            0x4206 /* SUN */
18207dc194Richard Lowe#define DW_TAG_SUN_memop_info           0x4207 /* SUN */
18307dc194Richard Lowe#define DW_TAG_SUN_omp_child_func       0x4208 /* SUN */
18407dc194Richard Lowe#define DW_TAG_SUN_rtti_descriptor      0x4209 /* SUN */
18507dc194Richard Lowe#define DW_TAG_SUN_dtor_info            0x420a /* SUN */
18607dc194Richard Lowe#define DW_TAG_SUN_dtor                 0x420b /* SUN */
18707dc194Richard Lowe#define DW_TAG_SUN_f90_interface        0x420c /* SUN */
18807dc194Richard Lowe#define DW_TAG_SUN_fortran_vax_structure 0x420d /* SUN */
18907dc194Richard Lowe#define DW_TAG_SUN_hi                   0x42ff /* SUN */
19007dc194Richard Lowe
19107dc194Richard Lowe
19207dc194Richard Lowe#define DW_TAG_hi_user                  0xffff
19307dc194Richard Lowe
19407dc194Richard Lowe#define DW_children_no                  0
19507dc194Richard Lowe#define DW_children_yes                 1
19607dc194Richard Lowe
19707dc194Richard Lowe
19807dc194Richard Lowe
19907dc194Richard Lowe#define DW_FORM_addr                    0x01
20007dc194Richard Lowe#define DW_FORM_block2                  0x03
20107dc194Richard Lowe#define DW_FORM_block4                  0x04
20207dc194Richard Lowe#define DW_FORM_data2                   0x05
20307dc194Richard Lowe#define DW_FORM_data4                   0x06
20407dc194Richard Lowe#define DW_FORM_data8                   0x07
20507dc194Richard Lowe#define DW_FORM_string                  0x08
20607dc194Richard Lowe#define DW_FORM_block                   0x09
20707dc194Richard Lowe#define DW_FORM_block1                  0x0a
20807dc194Richard Lowe#define DW_FORM_data1                   0x0b
20907dc194Richard Lowe#define DW_FORM_flag                    0x0c
21007dc194Richard Lowe#define DW_FORM_sdata                   0x0d
21107dc194Richard Lowe#define DW_FORM_strp                    0x0e
21207dc194Richard Lowe#define DW_FORM_udata                   0x0f
21307dc194Richard Lowe#define DW_FORM_ref_addr                0x10
21407dc194Richard Lowe#define DW_FORM_ref1                    0x11
21507dc194Richard Lowe#define DW_FORM_ref2                    0x12
21607dc194Richard Lowe#define DW_FORM_ref4                    0x13
21707dc194Richard Lowe#define DW_FORM_ref8                    0x14
21807dc194Richard Lowe#define DW_FORM_ref_udata               0x15
21907dc194Richard Lowe#define DW_FORM_indirect                0x16
22007dc194Richard Lowe#define DW_FORM_sec_offset              0x17 /* DWARF4 */
22107dc194Richard Lowe#define DW_FORM_exprloc                 0x18 /* DWARF4 */
22207dc194Richard Lowe#define DW_FORM_flag_present            0x19 /* DWARF4 */
22307dc194Richard Lowe/* 0x1a thru 0x1f were left unused accidentally. Reserved for future use. */
22407dc194Richard Lowe#define DW_FORM_ref_sig8                0x20 /* DWARF4 */
22507dc194Richard Lowe
22607dc194Richard Lowe#define DW_AT_sibling                           0x01
22707dc194Richard Lowe#define DW_AT_location                          0x02
22807dc194Richard Lowe#define DW_AT_name                              0x03
22907dc194Richard Lowe#define DW_AT_ordering                          0x09
23007dc194Richard Lowe#define DW_AT_subscr_data                       0x0a
23107dc194Richard Lowe#define DW_AT_byte_size                         0x0b
23207dc194Richard Lowe#define DW_AT_bit_offset                        0x0c
23307dc194Richard Lowe#define DW_AT_bit_size                          0x0d
23407dc194Richard Lowe#define DW_AT_element_list                      0x0f
23507dc194Richard Lowe#define DW_AT_stmt_list                         0x10
23607dc194Richard Lowe#define DW_AT_low_pc                            0x11
23707dc194Richard Lowe#define DW_AT_high_pc                           0x12
23807dc194Richard Lowe#define DW_AT_language                          0x13
23907dc194Richard Lowe#define DW_AT_member                            0x14
24007dc194Richard Lowe#define DW_AT_discr                             0x15
24107dc194Richard Lowe#define DW_AT_discr_value                       0x16
24207dc194Richard Lowe#define DW_AT_visibility                        0x17
24307dc194Richard Lowe#define DW_AT_import                            0x18
24407dc194Richard Lowe#define DW_AT_string_length                     0x19
24507dc194Richard Lowe#define DW_AT_common_reference                  0x1a
24607dc194Richard Lowe#define DW_AT_comp_dir                          0x1b
24707dc194Richard Lowe#define DW_AT_const_value                       0x1c
24807dc194Richard Lowe#define DW_AT_containing_type                   0x1d
24907dc194Richard Lowe#define DW_AT_default_value                     0x1e
25007dc194Richard Lowe#define DW_AT_inline                            0x20
25107dc194Richard Lowe#define DW_AT_is_optional                       0x21
25207dc194Richard Lowe#define DW_AT_lower_bound                       0x22
25307dc194Richard Lowe#define DW_AT_producer                          0x25
25407dc194Richard Lowe#define DW_AT_prototyped                        0x27
25507dc194Richard Lowe#define DW_AT_return_addr                       0x2a
25607dc194Richard Lowe#define DW_AT_start_scope                       0x2c
25707dc194Richard Lowe#define DW_AT_bit_stride                        0x2e /* DWARF3 name */
25807dc194Richard Lowe#define DW_AT_stride_size                       0x2e /* DWARF2 name */
25907dc194Richard Lowe#define DW_AT_upper_bound                       0x2f
26007dc194Richard Lowe#define DW_AT_abstract_origin                   0x31
26107dc194Richard Lowe#define DW_AT_accessibility                     0x32
26207dc194Richard Lowe#define DW_AT_address_class                     0x33
26307dc194Richard Lowe#define DW_AT_artificial                        0x34
26407dc194Richard Lowe#define DW_AT_base_types                        0x35
26507dc194Richard Lowe#define DW_AT_calling_convention                0x36
26607dc194Richard Lowe#define DW_AT_count                             0x37
26707dc194Richard Lowe#define DW_AT_data_member_location              0x38
26807dc194Richard Lowe#define DW_AT_decl_column                       0x39
26907dc194Richard Lowe#define DW_AT_decl_file                         0x3a
27007dc194Richard Lowe#define DW_AT_decl_line                         0x3b
27107dc194Richard Lowe#define DW_AT_declaration                       0x3c
27207dc194Richard Lowe#define DW_AT_discr_list                        0x3d
27307dc194Richard Lowe#define DW_AT_encoding                          0x3e
27407dc194Richard Lowe#define DW_AT_external                          0x3f
27507dc194Richard Lowe#define DW_AT_frame_base                        0x40
27607dc194Richard Lowe#define DW_AT_friend                            0x41
27707dc194Richard Lowe#define DW_AT_identifier_case                   0x42
27807dc194Richard Lowe#define DW_AT_macro_info                        0x43
27907dc194Richard Lowe#define DW_AT_namelist_item                     0x44
28007dc194Richard Lowe#define DW_AT_priority                          0x45
28107dc194Richard Lowe#define DW_AT_segment                           0x46
28207dc194Richard Lowe#define DW_AT_specification                     0x47
28307dc194Richard Lowe#define DW_AT_static_link                       0x48
28407dc194Richard Lowe#define DW_AT_type                              0x49
28507dc194Richard Lowe#define DW_AT_use_location                      0x4a
28607dc194Richard Lowe#define DW_AT_variable_parameter                0x4b
28707dc194Richard Lowe#define DW_AT_virtuality                        0x4c
28807dc194Richard Lowe#define DW_AT_vtable_elem_location              0x4d
28907dc194Richard Lowe#define DW_AT_allocated                         0x4e /* DWARF3 */
29007dc194Richard Lowe#define DW_AT_associated                        0x4f /* DWARF3 */
29107dc194Richard Lowe#define DW_AT_data_location                     0x50 /* DWARF3 */
29207dc194Richard Lowe#define DW_AT_byte_stride                       0x51 /* DWARF3f */
29307dc194Richard Lowe#define DW_AT_stride                            0x51 /* DWARF3 (do not use) */
29407dc194Richard Lowe#define DW_AT_entry_pc                          0x52 /* DWARF3 */
29507dc194Richard Lowe#define DW_AT_use_UTF8                          0x53 /* DWARF3 */
29607dc194Richard Lowe#define DW_AT_extension                         0x54 /* DWARF3 */
29707dc194Richard Lowe#define DW_AT_ranges                            0x55 /* DWARF3 */
29807dc194Richard Lowe#define DW_AT_trampoline                        0x56 /* DWARF3 */
29907dc194Richard Lowe#define DW_AT_call_column                       0x57 /* DWARF3 */
30007dc194Richard Lowe#define DW_AT_call_file                         0x58 /* DWARF3 */
30107dc194Richard Lowe#define DW_AT_call_line                         0x59 /* DWARF3 */
30207dc194Richard Lowe#define DW_AT_description                       0x5a /* DWARF3 */
30307dc194Richard Lowe#define DW_AT_binary_scale                      0x5b /* DWARF3f */
30407dc194Richard Lowe#define DW_AT_decimal_scale                     0x5c /* DWARF3f */
30507dc194Richard Lowe#define DW_AT_small                             0x5d /* DWARF3f */
30607dc194Richard Lowe#define DW_AT_decimal_sign                      0x5e /* DWARF3f */
30707dc194Richard Lowe#define DW_AT_digit_count                       0x5f /* DWARF3f */
30807dc194Richard Lowe#define DW_AT_picture_string                    0x60 /* DWARF3f */
30907dc194Richard Lowe#define DW_AT_mutable                           0x61 /* DWARF3f */
31007dc194Richard Lowe#define DW_AT_threads_scaled                    0x62 /* DWARF3f */
31107dc194Richard Lowe#define DW_AT_explicit                          0x63 /* DWARF3f */
31207dc194Richard Lowe#define DW_AT_object_pointer                    0x64 /* DWARF3f */
31307dc194Richard Lowe#define DW_AT_endianity                         0x65 /* DWARF3f */
31407dc194Richard Lowe#define DW_AT_elemental                         0x66 /* DWARF3f */
31507dc194Richard Lowe#define DW_AT_pure                              0x67 /* DWARF3f */
31607dc194Richard Lowe#define DW_AT_recursive                         0x68 /* DWARF3f */
31707dc194Richard Lowe#define DW_AT_signature                         0x69 /* DWARF4 */
31807dc194Richard Lowe#define DW_AT_main_subprogram                   0x6a /* DWARF4 */
31907dc194Richard Lowe#define DW_AT_data_bit_offset                   0x6b /* DWARF4 */
32007dc194Richard Lowe#define DW_AT_const_expr                        0x6c /* DWARF4 */
32107dc194Richard Lowe#define DW_AT_enum_class                        0x6d /* DWARF4 */
32207dc194Richard Lowe#define DW_AT_linkage_name                      0x6e /* DWARF4 */
32307dc194Richard Lowe
32407dc194Richard Lowe/* In extensions, we attempt to include the vendor extension
32507dc194Richard Lowe   in the name even when the vendor leaves it out. */
32607dc194Richard Lowe
32707dc194Richard Lowe/* HP extensions. */
32807dc194Richard Lowe#define DW_AT_HP_block_index                    0x2000  /* HP */
32907dc194Richard Lowe
33007dc194Richard Lowe/* Follows extension so dwarfdump prints the most-likely-useful name. */
33107dc194Richard Lowe#define DW_AT_lo_user                           0x2000
33207dc194Richard Lowe
33307dc194Richard Lowe#define DW_AT_MIPS_fde                          0x2001 /* MIPS/SGI */
33407dc194Richard Lowe#define DW_AT_MIPS_loop_begin                   0x2002 /* MIPS/SGI */
33507dc194Richard Lowe#define DW_AT_MIPS_tail_loop_begin              0x2003 /* MIPS/SGI */
33607dc194Richard Lowe#define DW_AT_MIPS_epilog_begin                 0x2004 /* MIPS/SGI */
33707dc194Richard Lowe#define DW_AT_MIPS_loop_unroll_factor           0x2005 /* MIPS/SGI */
33807dc194Richard Lowe#define DW_AT_MIPS_software_pipeline_depth      0x2006 /* MIPS/SGI */
33907dc194Richard Lowe#define DW_AT_MIPS_linkage_name                 0x2007 /* MIPS/SGI, GNU, and others.*/
34007dc194Richard Lowe#define DW_AT_MIPS_stride                       0x2008 /* MIPS/SGI */
34107dc194Richard Lowe#define DW_AT_MIPS_abstract_name                0x2009 /* MIPS/SGI */
34207dc194Richard Lowe#define DW_AT_MIPS_clone_origin                 0x200a /* MIPS/SGI */
34307dc194Richard Lowe#define DW_AT_MIPS_has_inlines                  0x200b /* MIPS/SGI */
34407dc194Richard Lowe#define DW_AT_MIPS_stride_byte                  0x200c /* MIPS/SGI */
34507dc194Richard Lowe#define DW_AT_MIPS_stride_elem                  0x200d /* MIPS/SGI */
34607dc194Richard Lowe#define DW_AT_MIPS_ptr_dopetype                 0x200e /* MIPS/SGI */
34707dc194Richard Lowe#define DW_AT_MIPS_allocatable_dopetype         0x200f /* MIPS/SGI */
34807dc194Richard Lowe#define DW_AT_MIPS_assumed_shape_dopetype       0x2010 /* MIPS/SGI */
34907dc194Richard Lowe#define DW_AT_MIPS_assumed_size                 0x2011 /* MIPS/SGI */
35007dc194Richard Lowe
35107dc194Richard Lowe/* HP extensions. */
35207dc194Richard Lowe#define DW_AT_HP_unmodifiable                   0x2001 /* conflict: MIPS */
35307dc194Richard Lowe#define DW_AT_HP_actuals_stmt_list              0x2010 /* conflict: MIPS */
35407dc194Richard Lowe#define DW_AT_HP_proc_per_section               0x2011 /* conflict: MIPS */
35507dc194Richard Lowe#define DW_AT_HP_raw_data_ptr                   0x2012 /* HP */
35607dc194Richard Lowe#define DW_AT_HP_pass_by_reference              0x2013 /* HP */
35707dc194Richard Lowe#define DW_AT_HP_opt_level                      0x2014 /* HP */
35807dc194Richard Lowe#define DW_AT_HP_prof_version_id                0x2015 /* HP */
35907dc194Richard Lowe#define DW_AT_HP_opt_flags                      0x2016 /* HP */
36007dc194Richard Lowe#define DW_AT_HP_cold_region_low_pc             0x2017 /* HP */
36107dc194Richard Lowe#define DW_AT_HP_cold_region_high_pc            0x2018 /* HP */
36207dc194Richard Lowe#define DW_AT_HP_all_variables_modifiable       0x2019 /* HP */
36307dc194Richard Lowe#define DW_AT_HP_linkage_name                   0x201a /* HP */
36407dc194Richard Lowe#define DW_AT_HP_prof_flags                     0x201b /* HP */
36507dc194Richard Lowe
36607dc194Richard Lowe#define DW_AT_CPQ_discontig_ranges              0x2001 /* COMPAQ/HP */
36707dc194Richard Lowe#define DW_AT_CPQ_semantic_events               0x2002 /* COMPAQ/HP */
36807dc194Richard Lowe#define DW_AT_CPQ_split_lifetimes_var           0x2003 /* COMPAQ/HP */
36907dc194Richard Lowe#define DW_AT_CPQ_split_lifetimes_rtn           0x2004 /* COMPAQ/HP */
37007dc194Richard Lowe#define DW_AT_CPQ_prologue_length               0x2005 /* COMPAQ/HP */
37107dc194Richard Lowe
37207dc194Richard Lowe#define DW_AT_INTEL_other_endian                0x2026 /* Intel, 1 if byte swapped. */
37307dc194Richard Lowe
37407dc194Richard Lowe/* GNU extensions. */
37507dc194Richard Lowe#define DW_AT_sf_names                          0x2101 /* GNU */
37607dc194Richard Lowe#define DW_AT_src_info                          0x2102 /* GNU */
37707dc194Richard Lowe#define DW_AT_mac_info                          0x2103 /* GNU */
37807dc194Richard Lowe#define DW_AT_src_coords                        0x2104 /* GNU */
37907dc194Richard Lowe#define DW_AT_body_begin                        0x2105 /* GNU */
38007dc194Richard Lowe#define DW_AT_body_end                          0x2106 /* GNU */
38107dc194Richard Lowe#define DW_AT_GNU_vector                        0x2107 /* GNU */
38207dc194Richard Lowe#define DW_AT_GNU_template_name                 0x2108 /* GNU */
38307dc194Richard Lowe
38407dc194Richard Lowe/* ALTIUM extension: ALTIUM Compliant location lists (flag) */
38507dc194Richard Lowe#define DW_AT_ALTIUM_loclist    0x2300          /* ALTIUM  */
3867c478bdstevel@tonic-gate
3877c478bdstevel@tonic-gate/* Sun extensions */
38807dc194Richard Lowe#define DW_AT_SUN_template                      0x2201 /* SUN */
38907dc194Richard Lowe#define DW_AT_VMS_rtnbeg_pd_address             0x2201 /* VMS */
39007dc194Richard Lowe#define DW_AT_SUN_alignment                     0x2202 /* SUN */
39107dc194Richard Lowe#define DW_AT_SUN_vtable                        0x2203 /* SUN */
39207dc194Richard Lowe#define DW_AT_SUN_count_guarantee               0x2204 /* SUN */
39307dc194Richard Lowe#define DW_AT_SUN_command_line                  0x2205 /* SUN */
39407dc194Richard Lowe#define DW_AT_SUN_vbase                         0x2206 /* SUN */
39507dc194Richard Lowe#define DW_AT_SUN_compile_options               0x2207 /* SUN */
39607dc194Richard Lowe#define DW_AT_SUN_language                      0x2208 /* SUN */
39707dc194Richard Lowe#define DW_AT_SUN_browser_file                  0x2209 /* SUN */
39807dc194Richard Lowe#define DW_AT_SUN_vtable_abi                    0x2210 /* SUN */
39907dc194Richard Lowe#define DW_AT_SUN_func_offsets                  0x2211 /* SUN */
40007dc194Richard Lowe#define DW_AT_SUN_cf_kind                       0x2212 /* SUN */
40107dc194Richard Lowe#define DW_AT_SUN_vtable_index                  0x2213 /* SUN */
40207dc194Richard Lowe#define DW_AT_SUN_omp_tpriv_addr                0x2214 /* SUN */
40307dc194Richard Lowe#define DW_AT_SUN_omp_child_func                0x2215 /* SUN */
40407dc194Richard Lowe#define DW_AT_SUN_func_offset                   0x2216 /* SUN */
40507dc194Richard Lowe#define DW_AT_SUN_memop_type_ref                0x2217 /* SUN */
40607dc194Richard Lowe#define DW_AT_SUN_profile_id                    0x2218 /* SUN */
40707dc194Richard Lowe#define DW_AT_SUN_memop_signature               0x2219 /* SUN */
40807dc194Richard Lowe#define DW_AT_SUN_obj_dir                       0x2220 /* SUN */
40907dc194Richard Lowe#define DW_AT_SUN_obj_file                      0x2221 /* SUN */
41007dc194Richard Lowe#define DW_AT_SUN_original_name                 0x2222 /* SUN */
41107dc194Richard Lowe#define DW_AT_SUN_hwcprof_signature             0x2223 /* SUN */
41207dc194Richard Lowe#define DW_AT_SUN_amd64_parmdump                0x2224 /* SUN */
41307dc194Richard Lowe#define DW_AT_SUN_part_link_name                0x2225 /* SUN */
41407dc194Richard Lowe#define DW_AT_SUN_link_name                     0x2226 /* SUN */
41507dc194Richard Lowe#define DW_AT_SUN_pass_with_const               0x2227 /* SUN */
41607dc194Richard Lowe#define DW_AT_SUN_return_with_const             0x2228 /* SUN */
41707dc194Richard Lowe#define DW_AT_SUN_import_by_name                0x2229 /* SUN */
41807dc194Richard Lowe#define DW_AT_SUN_f90_pointer                   0x222a /* SUN */
41907dc194Richard Lowe#define DW_AT_SUN_pass_by_ref                   0x222b /* SUN */
42007dc194Richard Lowe#define DW_AT_SUN_f90_allocatable               0x222c /* SUN */
42107dc194Richard Lowe#define DW_AT_SUN_f90_assumed_shape_array       0x222d /* SUN */
42207dc194Richard Lowe#define DW_AT_SUN_c_vla                         0x222e /* SUN */
42307dc194Richard Lowe#define DW_AT_SUN_return_value_ptr              0x2230 /* SUN */
42407dc194Richard Lowe#define DW_AT_SUN_dtor_start                    0x2231 /* SUN */
42507dc194Richard Lowe#define DW_AT_SUN_dtor_length                   0x2232 /* SUN */
42607dc194Richard Lowe#define DW_AT_SUN_dtor_state_initial            0x2233 /* SUN */
42707dc194Richard Lowe#define DW_AT_SUN_dtor_state_final              0x2234 /* SUN */
42807dc194Richard Lowe#define DW_AT_SUN_dtor_state_deltas             0x2235 /* SUN */
42907dc194Richard Lowe#define DW_AT_SUN_import_by_lname               0x2236 /* SUN */
43007dc194Richard Lowe#define DW_AT_SUN_f90_use_only                  0x2237 /* SUN */
43107dc194Richard Lowe#define DW_AT_SUN_namelist_spec                 0x2238 /* SUN */
43207dc194Richard Lowe#define DW_AT_SUN_is_omp_child_func             0x2239 /* SUN */
43307dc194Richard Lowe#define DW_AT_SUN_fortran_main_alias            0x223a /* SUN */
43407dc194Richard Lowe#define DW_AT_SUN_fortran_based                 0x223b /* SUN */
4357c478bdstevel@tonic-gate
43607dc194Richard Lowe/* UPC extension */
43707dc194Richard Lowe#define DW_AT_upc_threads_scaled                0x3210 /* UPC */
43807dc194Richard Lowe
43907dc194Richard Lowe/* PGI (STMicroelectronics) extensions. */
44007dc194Richard Lowe#define DW_AT_PGI_lbase                         0x3a00 /* PGI. Block, constant, reference. This attribute is an ASTPLAB extension used to describe the array local base.  */
44107dc194Richard Lowe#define DW_AT_PGI_soffset                       0x3a01  /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the section offset, or the offset to the first element in the dimension. */
44207dc194Richard Lowe#define DW_AT_PGI_lstride                       0x3a02  /* PGI. Block, constant, reference. ASTPLAB adds this attribute to describe the linear stride or the distance between elements in the dimension. */
44307dc194Richard Lowe
44407dc194Richard Lowe/* Apple Extensions for closures  */
44507dc194Richard Lowe#define DW_AT_APPLE_closure                     0x3fe4 /* Apple */
44607dc194Richard Lowe/* Apple Extensions for Objective-C runtime info */
44707dc194Richard Lowe#define DW_AT_APPLE_major_runtime_vers          0x3fe5 /* Apple */
44807dc194Richard Lowe#define DW_AT_APPLE_runtime_class               0x3fe6 /* Apple */
44907dc194Richard Lowe
45007dc194Richard Lowe
45107dc194Richard Lowe#define DW_AT_hi_user                           0x3fff
45207dc194Richard Lowe
45307dc194Richard Lowe#define DW_OP_addr                      0x03
45407dc194Richard Lowe#define DW_OP_deref                     0x06
45507dc194Richard Lowe#define DW_OP_const1u                   0x08
45607dc194Richard Lowe#define DW_OP_const1s                   0x09
45707dc194Richard Lowe#define DW_OP_const2u                   0x0a
45807dc194Richard Lowe#define DW_OP_const2s                   0x0b
45907dc194Richard Lowe#define DW_OP_const4u                   0x0c
46007dc194Richard Lowe#define DW_OP_const4s                   0x0d
46107dc194Richard Lowe#define DW_OP_const8u                   0x0e
46207dc194Richard Lowe#define DW_OP_const8s                   0x0f
46307dc194Richard Lowe#define DW_OP_constu                    0x10
46407dc194Richard Lowe#define DW_OP_consts                    0x11
46507dc194Richard Lowe#define DW_OP_dup                       0x12
46607dc194Richard Lowe#define DW_OP_drop                      0x13
46707dc194Richard Lowe#define DW_OP_over                      0x14
46807dc194Richard Lowe#define DW_OP_pick                      0x15
46907dc194Richard Lowe#define DW_OP_swap                      0x16
47007dc194Richard Lowe#define DW_OP_rot                       0x17
47107dc194Richard Lowe#define DW_OP_xderef                    0x18
47207dc194Richard Lowe#define DW_OP_abs                       0x19
47307dc194Richard Lowe#define DW_OP_and                       0x1a
47407dc194Richard Lowe#define DW_OP_div                       0x1b
47507dc194Richard Lowe#define DW_OP_minus                     0x1c
47607dc194Richard Lowe#define DW_OP_mod                       0x1d
47707dc194Richard Lowe#define DW_OP_mul                       0x1e
47807dc194Richard Lowe#define DW_OP_neg                       0x1f
47907dc194Richard Lowe#define DW_OP_not                       0x20
48007dc194Richard Lowe#define DW_OP_or                        0x21
48107dc194Richard Lowe#define DW_OP_plus                      0x22
48207dc194Richard Lowe#define DW_OP_plus_uconst               0x23
48307dc194Richard Lowe#define DW_OP_shl                       0x24
48407dc194Richard Lowe#define DW_OP_shr                       0x25
48507dc194Richard Lowe#define DW_OP_shra                      0x26
48607dc194Richard Lowe#define DW_OP_xor                       0x27
48707dc194Richard Lowe#define DW_OP_bra                       0x28
48807dc194Richard Lowe#define DW_OP_eq                        0x29
48907dc194Richard Lowe#define DW_OP_ge                        0x2a
49007dc194Richard Lowe#define DW_OP_gt                        0x2b
49107dc194Richard Lowe#define DW_OP_le                        0x2c
49207dc194Richard Lowe#define DW_OP_lt                        0x2d
49307dc194Richard Lowe#define DW_OP_ne                        0x2e
49407dc194Richard Lowe#define DW_OP_skip                      0x2f
49507dc194Richard Lowe#define DW_OP_lit0                      0x30
49607dc194Richard Lowe#define DW_OP_lit1                      0x31
49707dc194Richard Lowe#define DW_OP_lit2                      0x32
49807dc194Richard Lowe#define DW_OP_lit3                      0x33
49907dc194Richard Lowe#define DW_OP_lit4                      0x34
50007dc194Richard Lowe#define DW_OP_lit5                      0x35
50107dc194Richard Lowe#define DW_OP_lit6                      0x36
50207dc194Richard Lowe#define DW_OP_lit7                      0x37
50307dc194Richard Lowe#define DW_OP_lit8                      0x38
50407dc194Richard Lowe#define DW_OP_lit9                      0x39
50507dc194Richard Lowe#define DW_OP_lit10                     0x3a
50607dc194Richard Lowe#define DW_OP_lit11                     0x3b
50707dc194Richard Lowe#define DW_OP_lit12                     0x3c
50807dc194Richard Lowe#define DW_OP_lit13                     0x3d
50907dc194Richard Lowe#define DW_OP_lit14                     0x3e
51007dc194Richard Lowe#define DW_OP_lit15                     0x3f
51107dc194Richard Lowe#define DW_OP_lit16                     0x40
51207dc194Richard Lowe#define DW_OP_lit17                     0x41
51307dc194Richard Lowe#define DW_OP_lit18                     0x42
51407dc194Richard Lowe#define DW_OP_lit19                     0x43
51507dc194Richard Lowe#define DW_OP_lit20                     0x44
51607dc194Richard Lowe#define DW_OP_lit21                     0x45
51707dc194Richard Lowe#define DW_OP_lit22                     0x46
51807dc194Richard Lowe#define DW_OP_lit23                     0x47
51907dc194Richard Lowe#define DW_OP_lit24                     0x48
52007dc194Richard Lowe#define DW_OP_lit25                     0x49
52107dc194Richard Lowe#define DW_OP_lit26                     0x4a
52207dc194Richard Lowe#define DW_OP_lit27                     0x4b
52307dc194Richard Lowe#define DW_OP_lit28                     0x4c
52407dc194Richard Lowe#define DW_OP_lit29                     0x4d
52507dc194Richard Lowe#define DW_OP_lit30                     0x4e
52607dc194Richard Lowe#define DW_OP_lit31                     0x4f
52707dc194Richard Lowe#define DW_OP_reg0                      0x50
52807dc194Richard Lowe#define DW_OP_reg1                      0x51
52907dc194Richard Lowe#define DW_OP_reg2                      0x52
53007dc194Richard Lowe#define DW_OP_reg3                      0x53
53107dc194Richard Lowe#define DW_OP_reg4                      0x54
53207dc194Richard Lowe#define DW_OP_reg5                      0x55
53307dc194Richard Lowe#define DW_OP_reg6                      0x56
53407dc194Richard Lowe#define DW_OP_reg7                      0x57
53507dc194Richard Lowe#define DW_OP_reg8                      0x58
53607dc194Richard Lowe#define DW_OP_reg9                      0x59
53707dc194Richard Lowe#define DW_OP_reg10                     0x5a
53807dc194Richard Lowe#define DW_OP_reg11                     0x5b
53907dc194Richard Lowe#define DW_OP_reg12                     0x5c
54007dc194Richard Lowe#define DW_OP_reg13                     0x5d
54107dc194Richard Lowe#define DW_OP_reg14                     0x5e
54207dc194Richard Lowe#define DW_OP_reg15                     0x5f
54307dc194Richard Lowe#define DW_OP_reg16                     0x60
54407dc194Richard Lowe#define DW_OP_reg17                     0x61
54507dc194Richard Lowe#define DW_OP_reg18                     0x62
54607dc194Richard Lowe#define DW_OP_reg19                     0x63
54707dc194Richard Lowe#define DW_OP_reg20                     0x64
54807dc194Richard Lowe#define DW_OP_reg21                     0x65
54907dc194Richard Lowe#define DW_OP_reg22                     0x66
55007dc194Richard Lowe#define DW_OP_reg23                     0x67
55107dc194Richard Lowe#define DW_OP_reg24                     0x68
55207dc194Richard Lowe#define DW_OP_reg25                     0x69
55307dc194Richard Lowe#define DW_OP_reg26                     0x6a
55407dc194Richard Lowe#define DW_OP_reg27                     0x6b
55507dc194Richard Lowe#define DW_OP_reg28                     0x6c
55607dc194Richard Lowe#define DW_OP_reg29                     0x6d
55707dc194Richard Lowe#define DW_OP_reg30                     0x6e
55807dc194Richard Lowe#define DW_OP_reg31                     0x6f
55907dc194Richard Lowe#define DW_OP_breg0                     0x70
56007dc194Richard Lowe#define DW_OP_breg1                     0x71
56107dc194Richard Lowe#define DW_OP_breg2                     0x72
56207dc194Richard Lowe#define DW_OP_breg3                     0x73
56307dc194Richard Lowe#define DW_OP_breg4                     0x74
56407dc194Richard Lowe#define DW_OP_breg5                     0x75
56507dc194Richard Lowe#define DW_OP_breg6                     0x76
56607dc194Richard Lowe#define DW_OP_breg7                     0x77
56707dc194Richard Lowe#define DW_OP_breg8                     0x78
56807dc194Richard Lowe#define DW_OP_breg9                     0x79
56907dc194Richard Lowe#define DW_OP_breg10                    0x7a
57007dc194Richard Lowe#define DW_OP_breg11                    0x7b
57107dc194Richard Lowe#define DW_OP_breg12                    0x7c
57207dc194Richard Lowe#define DW_OP_breg13                    0x7d
57307dc194Richard Lowe#define DW_OP_breg14                    0x7e
57407dc194Richard Lowe#define DW_OP_breg15                    0x7f
57507dc194Richard Lowe#define DW_OP_breg16                    0x80
57607dc194Richard Lowe#define DW_OP_breg17                    0x81
57707dc194Richard Lowe#define DW_OP_breg18                    0x82
57807dc194Richard Lowe#define DW_OP_breg19                    0x83
57907dc194Richard Lowe#define DW_OP_breg20                    0x84
58007dc194Richard Lowe#define DW_OP_breg21                    0x85
58107dc194Richard Lowe#define DW_OP_breg22                    0x86
58207dc194Richard Lowe#define DW_OP_breg23                    0x87
58307dc194Richard Lowe#define DW_OP_breg24                    0x88
58407dc194Richard Lowe#define DW_OP_breg25                    0x89
58507dc194Richard Lowe#define DW_OP_breg26                    0x8a
58607dc194Richard Lowe#define DW_OP_breg27                    0x8b
58707dc194Richard Lowe#define DW_OP_breg28                    0x8c
58807dc194Richard Lowe#define DW_OP_breg29                    0x8d
58907dc194Richard Lowe#define DW_OP_breg30                    0x8e
59007dc194Richard Lowe#define DW_OP_breg31                    0x8f
59107dc194Richard Lowe#define DW_OP_regx                      0x90
59207dc194Richard Lowe#define DW_OP_fbreg                     0x91
59307dc194Richard Lowe#define DW_OP_bregx                     0x92
59407dc194Richard Lowe#define DW_OP_piece                     0x93
59507dc194Richard Lowe#define DW_OP_deref_size                0x94
59607dc194Richard Lowe#define DW_OP_xderef_size               0x95
59707dc194Richard Lowe#define DW_OP_nop                       0x96
59807dc194Richard Lowe#define DW_OP_push_object_address       0x97 /* DWARF3 */
59907dc194Richard Lowe#define DW_OP_call2                     0x98 /* DWARF3 */
60007dc194Richard Lowe#define DW_OP_call4                     0x99 /* DWARF3 */
60107dc194Richard Lowe#define DW_OP_call_ref                  0x9a /* DWARF3 */
60207dc194Richard Lowe#define DW_OP_form_tls_address          0x9b /* DWARF3f */
60307dc194Richard Lowe#define DW_OP_call_frame_cfa            0x9c /* DWARF3f */
60407dc194Richard Lowe#define DW_OP_bit_piece                 0x9d /* DWARF3f */
60507dc194Richard Lowe#define DW_OP_implicit_value            0x9e /* DWARF4 */
60607dc194Richard Lowe#define DW_OP_stack_value               0x9f /* DWARF4 */
60707dc194Richard Lowe
60807dc194Richard Lowe
60907dc194Richard Lowe    /* GNU extensions. */
61007dc194Richard Lowe#define DW_OP_GNU_push_tls_address      0xe0 /* GNU */
61107dc194Richard Lowe
61207dc194Richard Lowe/* Follows extension so dwarfdump prints the most-likely-useful name. */
61307dc194Richard Lowe#define DW_OP_lo_user                   0xe0
61407dc194Richard Lowe
61507dc194Richard Lowe    /* HP extensions. */
61607dc194Richard Lowe#define DW_OP_HP_unknown                0xe0 /* HP conflict: GNU */
61707dc194Richard Lowe#define DW_OP_HP_is_value               0xe1 /* HP */
61807dc194Richard Lowe#define DW_OP_HP_fltconst4              0xe2 /* HP */
61907dc194Richard Lowe#define DW_OP_HP_fltconst8              0xe3 /* HP */
62007dc194Richard Lowe#define DW_OP_HP_mod_range              0xe4 /* HP */
62107dc194Richard Lowe#define DW_OP_HP_unmod_range            0xe5 /* HP */
62207dc194Richard Lowe#define DW_OP_HP_tls                    0xe6 /* HP */
62307dc194Richard Lowe
62407dc194Richard Lowe#define DW_OP_INTEL_bit_piece           0xe8 /* Intel: made obsolete by DW_OP_bit_piece above. */
62507dc194Richard Lowe
62607dc194Richard Lowe
62707dc194Richard Lowe   /* Apple extension. */
62807dc194Richard Lowe#define DW_OP_APPLE_uninit              0xf0 /* Apple */
62907dc194Richard Lowe
63007dc194Richard Lowe#define DW_OP_hi_user                   0xff
63107dc194Richard Lowe
63207dc194Richard Lowe#define DW_ATE_address                  0x1
63307dc194Richard Lowe#define DW_ATE_boolean                  0x2
63407dc194Richard Lowe#define DW_ATE_complex_float            0x3
63507dc194Richard Lowe#define DW_ATE_float                    0x4
63607dc194Richard Lowe#define DW_ATE_signed                   0x5
63707dc194Richard Lowe#define DW_ATE_signed_char              0x6
63807dc194Richard Lowe#define DW_ATE_unsigned                 0x7
63907dc194Richard Lowe#define DW_ATE_unsigned_char            0x8
64007dc194Richard Lowe#define DW_ATE_imaginary_float          0x9  /* DWARF3 */
64107dc194Richard Lowe#define DW_ATE_packed_decimal           0xa  /* DWARF3f */
64207dc194Richard Lowe#define DW_ATE_numeric_string           0xb  /* DWARF3f */
64307dc194Richard Lowe#define DW_ATE_edited                   0xc  /* DWARF3f */
64407dc194Richard Lowe#define DW_ATE_signed_fixed             0xd  /* DWARF3f */
64507dc194Richard Lowe#define DW_ATE_unsigned_fixed           0xe  /* DWARF3f */
64607dc194Richard Lowe#define DW_ATE_decimal_float            0xf  /* DWARF3f */
64707dc194Richard Lowe
64807dc194Richard Lowe
64907dc194Richard Lowe/* ALTIUM extensions. x80, x81 */
65007dc194Richard Lowe#define DW_ATE_ALTIUM_fract           0x80 /* ALTIUM __fract type */
65107dc194Richard Lowe
65207dc194Richard Lowe/* Follows extension so dwarfdump prints the most-likely-useful name. */
65307dc194Richard Lowe#define DW_ATE_lo_user                  0x80
65407dc194Richard Lowe
65507dc194Richard Lowe/* Shown here to help dwarfdump build script. */
65607dc194Richard Lowe#define DW_ATE_ALTIUM_accum           0x81 /* ALTIUM __accum type */
65707dc194Richard Lowe
65807dc194Richard Lowe/* HP Floating point extensions. */
65907dc194Richard Lowe#define DW_ATE_HP_float80             0x80 /* (80 bit). HP */
66007dc194Richard Lowe
66107dc194Richard Lowe
66207dc194Richard Lowe#define DW_ATE_HP_complex_float80     0x81 /* Complex (80 bit). HP  */
66307dc194Richard Lowe#define DW_ATE_HP_float128            0x82 /* (128 bit). HP */
66407dc194Richard Lowe#define DW_ATE_HP_complex_float128    0x83 /* Complex (128 bit). HP */
66507dc194Richard Lowe#define DW_ATE_HP_floathpintel        0x84 /* (82 bit IA64). HP */
66607dc194Richard Lowe#define DW_ATE_HP_imaginary_float80   0x85 /* HP */
66707dc194Richard Lowe#define DW_ATE_HP_imaginary_float128  0x86 /* HP */
6687c478bdstevel@tonic-gate
6697c478bdstevel@tonic-gate/* Sun extensions */
6707c478bdstevel@tonic-gate#define DW_ATE_SUN_interval_float       0x91
6717c478bdstevel@tonic-gate#define DW_ATE_SUN_imaginary_float      0x92 /* Obsolete: See DW_ATE_imaginary_float */
6727c478bdstevel@tonic-gate
67307dc194Richard Lowe#define DW_ATE_hi_user                  0xff
67407dc194Richard Lowe
6757c478bdstevel@tonic-gate
67607dc194Richard Lowe/* Decimal Sign codes. */
67707dc194Richard Lowe#define DW_DS_unsigned                  0x01 /* DWARF3f */
67807dc194Richard Lowe#define DW_DS_leading_overpunch         0x02 /* DWARF3f */
67907dc194Richard Lowe#define DW_DS_trailing_overpunch        0x03 /* DWARF3f */
68007dc194Richard Lowe#define DW_DS_leading_separate          0x04 /* DWARF3f */
68107dc194Richard Lowe
68207dc194Richard Lowe#define DW_DS_trailing_separate         0x05 /* DWARF3f */
68307dc194Richard Lowe
68407dc194Richard Lowe/* Endian code name. */
68507dc194Richard Lowe#define DW_END_default                  0x00 /* DWARF3f */
68607dc194Richard Lowe#define DW_END_big                      0x01 /* DWARF3f */
68707dc194Richard Lowe#define DW_END_little                   0x02 /* DWARF3f */
68807dc194Richard Lowe
68907dc194Richard Lowe#define DW_END_lo_user                  0x40 /* DWARF3f */
69007dc194Richard Lowe#define DW_END_hi_user                  0xff /* DWARF3f */
69107dc194Richard Lowe
69207dc194Richard Lowe/* For use with DW_TAG_SUN_codeflags
6937c478bdstevel@tonic-gate * If DW_TAG_SUN_codeflags is accepted as a dwarf standard, then
6947c478bdstevel@tonic-gate * standard dwarf ATCF entries start at 0x01
6957c478bdstevel@tonic-gate */
69607dc194Richard Lowe#define DW_ATCF_lo_user                 0x40 /* SUN */
69707dc194Richard Lowe#define DW_ATCF_SUN_mop_bitfield        0x41 /* SUN */
69807dc194Richard Lowe#define DW_ATCF_SUN_mop_spill           0x42 /* SUN */
69907dc194Richard Lowe#define DW_ATCF_SUN_mop_scopy           0x43 /* SUN */
70007dc194Richard Lowe#define DW_ATCF_SUN_func_start          0x44 /* SUN */
70107dc194Richard Lowe#define DW_ATCF_SUN_end_ctors           0x45 /* SUN */
70207dc194Richard Lowe#define DW_ATCF_SUN_branch_target       0x46 /* SUN */
70307dc194Richard Lowe#define DW_ATCF_SUN_mop_stack_probe     0x47 /* SUN */
70407dc194Richard Lowe#define DW_ATCF_SUN_func_epilog         0x48 /* SUN */
70507dc194Richard Lowe#define DW_ATCF_hi_user                 0xff /* SUN */
70607dc194Richard Lowe
70707dc194Richard Lowe/* Accessibility code name. */
70807dc194Richard Lowe#define DW_ACCESS_public                0x01
70907dc194Richard Lowe#define DW_ACCESS_protected             0x02
71007dc194Richard Lowe#define DW_ACCESS_private               0x03
71107dc194Richard Lowe
71207dc194Richard Lowe/* Visibility code name. */
71307dc194Richard Lowe#define DW_VIS_local                    0x01
71407dc194Richard Lowe#define DW_VIS_exported                 0x02
71507dc194Richard Lowe#define DW_VIS_qualified                0x03
71607dc194Richard Lowe
71707dc194Richard Lowe/* Virtuality code name. */
71807dc194Richard Lowe#define DW_VIRTUALITY_none              0x00
71907dc194Richard Lowe#define DW_VIRTUALITY_virtual           0x01
72007dc194Richard Lowe#define DW_VIRTUALITY_pure_virtual      0x02
72107dc194Richard Lowe
72207dc194Richard Lowe#define DW_LANG_C89                     0x0001
72307dc194Richard Lowe#define DW_LANG_C                       0x0002
72407dc194Richard Lowe#define DW_LANG_Ada83                   0x0003
72507dc194Richard Lowe#define DW_LANG_C_plus_plus             0x0004
72607dc194Richard Lowe#define DW_LANG_Cobol74                 0x0005
72707dc194Richard Lowe#define DW_LANG_Cobol85                 0x0006
72807dc194Richard Lowe#define DW_LANG_Fortran77               0x0007
72907dc194Richard Lowe#define DW_LANG_Fortran90               0x0008
73007dc194Richard Lowe#define DW_LANG_Pascal83                0x0009
73107dc194Richard Lowe#define DW_LANG_Modula2                 0x000a
73207dc194Richard Lowe#define DW_LANG_Java                    0x000b /* DWARF3 */
73307dc194Richard Lowe#define DW_LANG_C99                     0x000c /* DWARF3 */
73407dc194Richard Lowe#define DW_LANG_Ada95                   0x000d /* DWARF3 */
73507dc194Richard Lowe#define DW_LANG_Fortran95               0x000e /* DWARF3 */
73607dc194Richard Lowe#define DW_LANG_PLI                     0x000f /* DWARF3 */
73707dc194Richard Lowe#define DW_LANG_ObjC                    0x0010 /* DWARF3f */
73807dc194Richard Lowe#define DW_LANG_ObjC_plus_plus          0x0011 /* DWARF3f */
73907dc194Richard Lowe#define DW_LANG_UPC                     0x0012 /* DWARF3f */
74007dc194Richard Lowe#define DW_LANG_D                       0x0013 /* DWARF3f */
74107dc194Richard Lowe#define DW_LANG_Python                  0x0014 /* DWARF4 */
74207dc194Richard Lowe/* The following 2 are not yet formally approved October 2010, but
74307dc194Richard Lowe   it seems extremely likely they will be approved as the committee
74407dc194Richard Lowe   chair agrees these should be ok and no one on the committee
74507dc194Richard Lowe   has objected. */
74607dc194Richard Lowe#define DW_LANG_OpenCL                  0x0015 /* Provisionally DWARF5 */
74707dc194Richard Lowe#define DW_LANG_Go                      0x0016 /* Provisionally DWARF5 */
74807dc194Richard Lowe#define DW_LANG_lo_user                 0x8000
74907dc194Richard Lowe#define DW_LANG_Mips_Assembler          0x8001 /* MIPS   */
75007dc194Richard Lowe#define DW_LANG_Upc                     0x8765 /* UPC, use
75107dc194Richard Lowe                                        DW_LANG_UPC instead. */
75207dc194Richard Lowe/* ALTIUM extension */
75307dc194Richard Lowe#define DW_LANG_ALTIUM_Assembler        0x9101  /* ALTIUM */
7547c478bdstevel@tonic-gate
7557c478bdstevel@tonic-gate/* Sun extensions */
75607dc194Richard Lowe#define DW_LANG_SUN_Assembler           0x9001 /* SUN */
75707dc194Richard Lowe
75807dc194Richard Lowe#define DW_LANG_hi_user                 0xffff
75907dc194Richard Lowe
76007dc194Richard Lowe/* Identifier case name. */
76107dc194Richard Lowe#define DW_ID_case_sensitive            0x00
76207dc194Richard Lowe#define DW_ID_up_case                   0x01
76307dc194Richard Lowe#define DW_ID_down_case                 0x02
76407dc194Richard Lowe#define DW_ID_case_insensitive          0x03
76507dc194Richard Lowe
76607dc194Richard Lowe/* Calling Convention Name. */
76707dc194Richard Lowe#define DW_CC_normal                    0x01
76807dc194Richard Lowe#define DW_CC_program                   0x02
76907dc194Richard Lowe#define DW_CC_nocall                    0x03
77007dc194Richard Lowe#define DW_CC_lo_user                   0x40
77107dc194Richard Lowe
77207dc194Richard Lowe/* ALTIUM extensions. */
77307dc194Richard Lowe/* Function is an interrupt handler, return address on system stack. */
77407dc194Richard Lowe#define DW_CC_ALTIUM_interrupt          0x65  /* ALTIUM*/
77507dc194Richard Lowe
77607dc194Richard Lowe/* Near function model, return address on system stack. */
77707dc194Richard Lowe#define DW_CC_ALTIUM_near_system_stack  0x66  /*ALTIUM */
77807dc194Richard Lowe
77907dc194Richard Lowe/* Near function model, return address on user stack. */
78007dc194Richard Lowe#define DW_CC_ALTIUM_near_user_stack    0x67  /* ALTIUM */
78107dc194Richard Lowe
78207dc194Richard Lowe/* Huge function model, return address on user stack.  */
78307dc194Richard Lowe#define DW_CC_ALTIUM_huge_user_stack    0x68  /* ALTIUM */
78407dc194Richard Lowe
78507dc194Richard Lowe
78607dc194Richard Lowe#define DW_CC_hi_user                   0xff
78707dc194Richard Lowe
78807dc194Richard Lowe/* Inline Code Name. */
78907dc194Richard Lowe#define DW_INL_not_inlined              0x00
79007dc194Richard Lowe#define DW_INL_inlined                  0x01
79107dc194Richard Lowe#define DW_INL_declared_not_inlined     0x02
79207dc194Richard Lowe#define DW_INL_declared_inlined         0x03
79307dc194Richard Lowe
79407dc194Richard Lowe/* Ordering Name. */
79507dc194Richard Lowe#define DW_ORD_row_major                0x00
79607dc194Richard Lowe#define DW_ORD_col_major                0x01
79707dc194Richard Lowe
79807dc194Richard Lowe/* Discriminant Descriptor Name. */
79907dc194Richard Lowe#define DW_DSC_label                    0x00
80007dc194Richard Lowe#define DW_DSC_range                    0x01
80107dc194Richard Lowe
80207dc194Richard Lowe/* Line number standard opcode name. */
80307dc194Richard Lowe#define DW_LNS_copy                     0x01
80407dc194Richard Lowe#define DW_LNS_advance_pc               0x02
80507dc194Richard Lowe#define DW_LNS_advance_line             0x03
80607dc194Richard Lowe#define DW_LNS_set_file                 0x04
80707dc194Richard Lowe#define DW_LNS_set_column               0x05
80807dc194Richard Lowe#define DW_LNS_negate_stmt              0x06
80907dc194Richard Lowe#define DW_LNS_set_basic_block          0x07
81007dc194Richard Lowe#define DW_LNS_const_add_pc             0x08
81107dc194Richard Lowe#define DW_LNS_fixed_advance_pc         0x09
81207dc194Richard Lowe#define DW_LNS_set_prologue_end         0x0a /* DWARF3 */
81307dc194Richard Lowe#define DW_LNS_set_epilogue_begin       0x0b /* DWARF3 */
81407dc194Richard Lowe#define DW_LNS_set_isa                  0x0c /* DWARF3 */
81507dc194Richard Lowe
81607dc194Richard Lowe/* Line number extended opcode name. */
81707dc194Richard Lowe#define DW_LNE_end_sequence             0x01
81807dc194Richard Lowe#define DW_LNE_set_address              0x02
81907dc194Richard Lowe#define DW_LNE_define_file              0x03
82007dc194Richard Lowe#define DW_LNE_set_discriminator        0x04  /* DWARF4 */
82107dc194Richard Lowe
82207dc194Richard Lowe/* HP extensions. */
82307dc194Richard Lowe#define DW_LNE_HP_negate_is_UV_update       0x11 /* 17 HP */
82407dc194Richard Lowe#define DW_LNE_HP_push_context              0x12 /* 18 HP */
82507dc194Richard Lowe#define DW_LNE_HP_pop_context               0x13 /* 19 HP */
82607dc194Richard Lowe#define DW_LNE_HP_set_file_line_column      0x14 /* 20 HP */
82707dc194Richard Lowe#define DW_LNE_HP_set_routine_name          0x15 /* 21 HP */
82807dc194Richard Lowe#define DW_LNE_HP_set_sequence              0x16 /* 22 HP */
82907dc194Richard Lowe#define DW_LNE_HP_negate_post_semantics     0x17 /* 23 HP */
83007dc194Richard Lowe#define DW_LNE_HP_negate_function_exit      0x18 /* 24 HP */
83107dc194Richard Lowe#define DW_LNE_HP_negate_front_end_logical  0x19 /* 25 HP */
83207dc194Richard Lowe#define DW_LNE_HP_define_proc               0x20 /* 32 HP */
83307dc194Richard Lowe
83407dc194Richard Lowe#define DW_LNE_lo_user                  0x80 /* DWARF3 */
83507dc194Richard Lowe#define DW_LNE_hi_user                  0xff /* DWARF3 */
83607dc194Richard Lowe
83707dc194Richard Lowe/* These are known values for DW_LNS_set_isa. */
83807dc194Richard Lowe#define DW_ISA_UNKNOWN   0
83907dc194Richard Lowe/* The following two are ARM specific. */
84007dc194Richard Lowe#define DW_ISA_ARM_thumb 1 /* ARM ISA */
84107dc194Richard Lowe#define DW_ISA_ARM_arm   2 /* ARM ISA */
84207dc194Richard Lowe
84307dc194Richard Lowe/* Macro information. */
84407dc194Richard Lowe#define DW_MACINFO_define               0x01
84507dc194Richard Lowe#define DW_MACINFO_undef                0x02
84607dc194Richard Lowe#define DW_MACINFO_start_file           0x03
84707dc194Richard Lowe#define DW_MACINFO_end_file             0x04
84807dc194Richard Lowe#define DW_MACINFO_vendor_ext           0xff
84907dc194Richard Lowe
85007dc194Richard Lowe/* CFA operator compaction (a space saving measure, see
85107dc194Richard Lowe   the DWARF standard) means DW_CFA_extended and DW_CFA_nop
85207dc194Richard Lowe   have the same value here.  */
8537c478bdstevel@tonic-gate#define DW_CFA_advance_loc        0x40
8547c478bdstevel@tonic-gate#define DW_CFA_offset             0x80
8557c478bdstevel@tonic-gate#define DW_CFA_restore            0xc0
8567c478bdstevel@tonic-gate#define DW_CFA_extended           0
8577c478bdstevel@tonic-gate
8587c478bdstevel@tonic-gate#define DW_CFA_nop              0x00
8597c478bdstevel@tonic-gate#define DW_CFA_set_loc          0x01
8607c478bdstevel@tonic-gate#define DW_CFA_advance_loc1     0x02
8617c478bdstevel@tonic-gate#define DW_CFA_advance_loc2     0x03
8627c478bdstevel@tonic-gate#define DW_CFA_advance_loc4     0x04
8637c478bdstevel@tonic-gate#define DW_CFA_offset_extended  0x05
8647c478bdstevel@tonic-gate#define DW_CFA_restore_extended 0x06
8657c478bdstevel@tonic-gate#define DW_CFA_undefined        0x07
8667c478bdstevel@tonic-gate#define DW_CFA_same_value       0x08
8677c478bdstevel@tonic-gate#define DW_CFA_register         0x09
86807dc194Richard Lowe#define DW_CFA_remember_state   0x0a
8697c478bdstevel@tonic-gate#define DW_CFA_restore_state    0x0b
8707c478bdstevel@tonic-gate#define DW_CFA_def_cfa          0x0c
8717c478bdstevel@tonic-gate#define DW_CFA_def_cfa_register 0x0d
8727c478bdstevel@tonic-gate#define DW_CFA_def_cfa_offset   0x0e
87349d3bc9Richard Lowe#define DW_CFA_def_cfa_expression 0x0f     /* DWARF3 */
87449d3bc9Richard Lowe#define DW_CFA_expression       0x10       /* DWARF3 */
87507dc194Richard Lowe#define DW_CFA_offset_extended_sf 0x11     /* DWARF3 */
87649d3bc9Richard Lowe#define DW_CFA_def_cfa_sf       0x12       /* DWARF3 */
87749d3bc9Richard Lowe#define DW_CFA_def_cfa_offset_sf 0x13      /* DWARF3 */
87807dc194Richard Lowe#define DW_CFA_val_offset        0x14      /* DWARF3f */
87907dc194Richard Lowe#define DW_CFA_val_offset_sf     0x15      /* DWARF3f */
88007dc194Richard Lowe#define DW_CFA_val_expression    0x16      /* DWARF3f */
8817c478bdstevel@tonic-gate
88207dc194Richard Lowe#define DW_CFA_lo_user           0x1c
88307dc194Richard Lowe#define DW_CFA_low_user          0x1c  /* Incorrect spelling, do not use. */
8847c478bdstevel@tonic-gate
88507dc194Richard Lowe/* SGI/MIPS extension. */
88607dc194Richard Lowe#define DW_CFA_MIPS_advance_loc8 0x1d   /* MIPS */
88707dc194Richard Lowe
88807dc194Richard Lowe/* GNU extensions. */
88907dc194Richard Lowe#define DW_CFA_GNU_window_save   0x2d  /* GNU */
89007dc194Richard Lowe#define DW_CFA_GNU_args_size     0x2e /* GNU  */
89107dc194Richard Lowe#define DW_CFA_GNU_negative_offset_extended  0x2f /* GNU */
8927c478bdstevel@tonic-gate
8937c478bdstevel@tonic-gate#define DW_CFA_high_user         0x3f
8947c478bdstevel@tonic-gate
89507dc194Richard Lowe/* GNU exception header encoding.  See the Generic
89607dc194Richard Lowe   Elf Specification of the Linux Standard Base (LSB).
89707dc194Richard Lowe   http://refspecs.freestandards.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/dwarfext.html
89807dc194Richard Lowe   The upper 4 bits indicate how the value is to be applied.
89907dc194Richard Lowe   The lower 4 bits indicate the format of the data.
90007dc194Richard Lowe*/
90107dc194Richard Lowe#define DW_EH_PE_absptr   0x00  /* GNU */
90207dc194Richard Lowe#define DW_EH_PE_uleb128  0x01  /* GNU */
90307dc194Richard Lowe#define DW_EH_PE_udata2   0x02  /* GNU */
90407dc194Richard Lowe#define DW_EH_PE_udata4   0x03  /* GNU */
90507dc194Richard Lowe#define DW_EH_PE_udata8   0x04  /* GNU */
90607dc194Richard Lowe#define DW_EH_PE_sleb128  0x09  /* GNU */
90707dc194Richard Lowe#define DW_EH_PE_sdata2   0x0A  /* GNU */
90807dc194Richard Lowe#define DW_EH_PE_sdata4   0x0B  /* GNU */
90907dc194Richard Lowe#define DW_EH_PE_sdata8   0x0C  /* GNU */
91007dc194Richard Lowe
91107dc194Richard Lowe#define DW_EH_PE_pcrel    0x10  /* GNU */
91207dc194Richard Lowe#define DW_EH_PE_textrel  0x20  /* GNU */
91307dc194Richard Lowe#define DW_EH_PE_datarel  0x30  /* GNU */
91407dc194Richard Lowe#define DW_EH_PE_funcrel  0x40  /* GNU */
91507dc194Richard Lowe#define DW_EH_PE_aligned  0x50  /* GNU */
91607dc194Richard Lowe
91707dc194Richard Lowe#define DW_EH_PE_omit     0xff  /* GNU.  Means no value present. */
91807dc194Richard Lowe
9197c478bdstevel@tonic-gate
9207c478bdstevel@tonic-gate/* Mapping from machine registers and pseudo-regs into the .debug_frame table.
9217c478bdstevel@tonic-gate   DW_FRAME entries are machine specific. These describe
92207dc194Richard Lowe   MIPS/SGI R3000, R4K, R4400 and all later MIPS/SGI IRIX machines.
92307dc194Richard Lowe   They describe a mapping from hardware register number to
92407dc194Richard Lowe   the number used in the table to identify that register.
9257c478bdstevel@tonic-gate
92607dc194Richard Lowe   The CFA (Canonical Frame Address) described in DWARF is called
9277c478bdstevel@tonic-gate   the Virtual Frame Pointer on MIPS/SGI machines.
9287c478bdstevel@tonic-gate
92907dc194Richard Lowe   The DW_FRAME* names here are MIPS/SGI specfic.
93007dc194Richard Lowe   Libdwarf interfaces defined in 2008 make the
93107dc194Richard Lowe   frame definitions
93207dc194Richard Lowe   here (and the fixed table sizes they imply) obsolete.
93307dc194Richard Lowe   They are left here for compatibility.
9347c478bdstevel@tonic-gate*/
93507dc194Richard Lowe/* Default column used for CFA in the libdwarf reader client.
93607dc194Richard Lowe   Assumes reg 0 never appears as
93707dc194Richard Lowe   a register in DWARF information. Usable for MIPS,
93807dc194Richard Lowe   but never a good idea, really.    */
93907dc194Richard Lowe#define DW_FRAME_CFA_COL 0
94007dc194Richard Lowe
94107dc194Richard Lowe#define DW_FRAME_REG1   1  /* integer reg 1 */
94207dc194Richard Lowe#define DW_FRAME_REG2   2  /* integer reg 2 */
94307dc194Richard Lowe#define DW_FRAME_REG3   3  /* integer reg 3 */
94407dc194Richard Lowe#define DW_FRAME_REG4   4  /* integer reg 4 */
94507dc194Richard Lowe#define DW_FRAME_REG5   5  /* integer reg 5 */
94607dc194Richard Lowe#define DW_FRAME_REG6   6  /* integer reg 6 */
94707dc194Richard Lowe#define DW_FRAME_REG7   7  /* integer reg 7 */
94807dc194Richard Lowe#define DW_FRAME_REG8   8  /* integer reg 8 */
94907dc194Richard Lowe#define DW_FRAME_REG9   9  /* integer reg 9 */
95007dc194Richard Lowe#define DW_FRAME_REG10  10 /* integer reg 10 */
95107dc194Richard Lowe#define DW_FRAME_REG11  11 /* integer reg 11 */
95207dc194Richard Lowe#define DW_FRAME_REG12  12 /* integer reg 12 */
95307dc194Richard Lowe#define DW_FRAME_REG13  13 /* integer reg 13 */
95407dc194Richard Lowe#define DW_FRAME_REG14  14 /* integer reg 14 */
95507dc194Richard Lowe#define DW_FRAME_REG15  15 /* integer reg 15 */
95607dc194Richard Lowe#define DW_FRAME_REG16  16 /* integer reg 16 */
95707dc194Richard Lowe#define DW_FRAME_REG17  17 /* integer reg 17 */
95807dc194Richard Lowe#define DW_FRAME_REG18  18 /* integer reg 18 */
95907dc194Richard Lowe#define DW_FRAME_REG19  19 /* integer reg 19 */
96007dc194Richard Lowe#define DW_FRAME_REG20  20 /* integer reg 20 */
96107dc194Richard Lowe#define DW_FRAME_REG21  21 /* integer reg 21 */
96207dc194Richard Lowe#define DW_FRAME_REG22  22 /* integer reg 22 */
96307dc194Richard Lowe#define DW_FRAME_REG23  23 /* integer reg 23 */
96407dc194Richard Lowe#define DW_FRAME_REG24  24 /* integer reg 24 */
96507dc194Richard Lowe#define DW_FRAME_REG25  25 /* integer reg 25 */
96607dc194Richard Lowe#define DW_FRAME_REG26  26 /* integer reg 26 */
96707dc194Richard Lowe#define DW_FRAME_REG27  27 /* integer reg 27 */
96807dc194Richard Lowe#define DW_FRAME_REG28  28 /* integer reg 28 */
96907dc194Richard Lowe#define DW_FRAME_REG29  29 /* integer reg 29 */
97007dc194Richard Lowe#define DW_FRAME_REG30  30 /* integer reg 30 */
97107dc194Richard Lowe#define DW_FRAME_REG31  31 /* integer reg 31, aka ra */
97207dc194Richard Lowe
97307dc194Richard Lowe        /* MIPS1, 2 have only some of these 64-bit registers.
97407dc194Richard Lowe        ** MIPS1  save/restore takes 2 instructions per 64-bit reg, and
97507dc194Richard Lowe        ** in that case, the register is considered stored after the second
97607dc194Richard Lowe        ** swc1.
97707dc194Richard Lowe        */
9787c478bdstevel@tonic-gate#define DW_FRAME_FREG0  32 /* 64-bit floating point reg 0 */
9797c478bdstevel@tonic-gate#define DW_FRAME_FREG1  33 /* 64-bit floating point reg 1 */
9807c478bdstevel@tonic-gate#define DW_FRAME_FREG2  34 /* 64-bit floating point reg 2 */
9817c478bdstevel@tonic-gate#define DW_FRAME_FREG3  35 /* 64-bit floating point reg 3 */
9827c478bdstevel@tonic-gate#define DW_FRAME_FREG4  36 /* 64-bit floating point reg 4 */
9837c478bdstevel@tonic-gate#define DW_FRAME_FREG5  37 /* 64-bit floating point reg 5 */
9847c478bdstevel@tonic-gate#define DW_FRAME_FREG6  38 /* 64-bit floating point reg 6 */
9857c478bdstevel@tonic-gate#define DW_FRAME_FREG7  39 /* 64-bit floating point reg 7 */
9867c478bdstevel@tonic-gate#define DW_FRAME_FREG8  40 /* 64-bit floating point reg 8 */
9877c478bdstevel@tonic-gate#define DW_FRAME_FREG9  41 /* 64-bit floating point reg 9 */
9887c478bdstevel@tonic-gate#define DW_FRAME_FREG10 42 /* 64-bit floating point reg 10 */
9897c478bdstevel@tonic-gate#define DW_FRAME_FREG11 43 /* 64-bit floating point reg 11 */
9907c478bdstevel@tonic-gate#define DW_FRAME_FREG12 44 /* 64-bit floating point reg 12 */
9917c478bdstevel@tonic-gate#define DW_FRAME_FREG13 45 /* 64-bit floating point reg 13 */
9927c478bdstevel@tonic-gate#define DW_FRAME_FREG14 46 /* 64-bit floating point reg 14 */
9937c478bdstevel@tonic-gate#define DW_FRAME_FREG15 47 /* 64-bit floating point reg 15 */
9947c478bdstevel@tonic-gate#define DW_FRAME_FREG16 48 /* 64-bit floating point reg 16 */
9957c478bdstevel@tonic-gate#define DW_FRAME_FREG17 49 /* 64-bit floating point reg 17 */
9967c478bdstevel@tonic-gate#define DW_FRAME_FREG18 50 /* 64-bit floating point reg 18 */
9977c478bdstevel@tonic-gate#define DW_FRAME_FREG19 51 /* 64-bit floating point reg 19 */
9987c478bdstevel@tonic-gate#define DW_FRAME_FREG20 52 /* 64-bit floating point reg 20 */
9997c478bdstevel@tonic-gate#define DW_FRAME_FREG21 53 /* 64-bit floating point reg 21 */
10007c478bdstevel@tonic-gate#define DW_FRAME_FREG22 54 /* 64-bit floating point reg 22 */
10017c478bdstevel@tonic-gate#define DW_FRAME_FREG23 55 /* 64-bit floating point reg 23 */
10027c478bdstevel@tonic-gate#define DW_FRAME_FREG24 56 /* 64-bit floating point reg 24 */
10037c478bdstevel@tonic-gate#define DW_FRAME_FREG25 57 /* 64-bit floating point reg 25 */
10047c478bdstevel@tonic-gate#define DW_FRAME_FREG26 58 /* 64-bit floating point reg 26 */
10057c478bdstevel@tonic-gate#define DW_FRAME_FREG27 59 /* 64-bit floating point reg 27 */
10067c478bdstevel@tonic-gate#define DW_FRAME_FREG28 60 /* 64-bit floating point reg 28 */
10077c478bdstevel@tonic-gate#define DW_FRAME_FREG29 61 /* 64-bit floating point reg 29 */
10087c478bdstevel@tonic-gate#define DW_FRAME_FREG30 62 /* 64-bit floating point reg 30 */
10097c478bdstevel@tonic-gate#define DW_FRAME_FREG31 63 /* 64-bit floating point reg 31 */
10107c478bdstevel@tonic-gate
101107dc194Richard Lowe/*  ***IMPORTANT NOTE, TARGET DEPENDENCY ****
101207dc194Richard Lowe    The following 4 #defines are dependent on
101307dc194Richard Lowe    the target cpu(s) that you apply libdwarf to.
101407dc194Richard Lowe    Ensure that DW_FRAME_UNDEFINED_VAL  and DW_FRAME_SAME_VAL
101507dc194Richard Lowe    do not conflict with the range [0-DW_FRAME_STATIC_LINK].
101607dc194Richard Lowe    The value 63 works for MIPS cpus at least up to the R16000.
10177c478bdstevel@tonic-gate
101807dc194Richard Lowe    For a cpu with more than 63 real registers
101907dc194Richard Lowe    DW_FRAME_HIGHEST_NORMAL_REGISTER
102007dc194Richard Lowe    must be increased for things to work properly!
102107dc194Richard Lowe    Also ensure that DW_FRAME_UNDEFINED_VAL DW_FRAME_SAME_VAL
102207dc194Richard Lowe    are not in the range [0-DW_FRAME_STATIC_LINK]
10237c478bdstevel@tonic-gate
102407dc194Richard Lowe    Having DW_FRAME_HIGHEST_NORMAL_REGISTER be higher than
102507dc194Richard Lowe    is strictly needed is safe.
102607dc194Richard Lowe
102707dc194Richard Lowe*/
102807dc194Richard Lowe
102907dc194Richard Lowe#ifndef DW_FRAME_HIGHEST_NORMAL_REGISTER
103007dc194Richard Lowe#define DW_FRAME_HIGHEST_NORMAL_REGISTER 63
103107dc194Richard Lowe#endif
103207dc194Richard Lowe/* This is the number of columns in the Frame Table.
103307dc194Richard Lowe   This constant should
103407dc194Richard Lowe   be kept in sync with DW_REG_TABLE_SIZE defined in libdwarf.h
103507dc194Richard Lowe   It must also be large enough to be beyond the highest
103607dc194Richard Lowe   compiler-defined-register (meaning DW_FRAME_RA_COL DW_FRAME_STATIC_LINK
103707dc194Richard Lowe   in the MIPS/IRIX case */
103807dc194Richard Lowe#ifndef DW_FRAME_LAST_REG_NUM
103907dc194Richard Lowe#define DW_FRAME_LAST_REG_NUM   (DW_FRAME_HIGHEST_NORMAL_REGISTER + 3)
104007dc194Richard Lowe#endif
10417c478bdstevel@tonic-gate
10427c478bdstevel@tonic-gate
104307dc194Richard Lowe/* Column recording ra (return address from a function call).
104407dc194Richard Lowe   This is common to many architectures, but as a 'simple register'
104507dc194Richard Lowe   is not necessarily adequate for all architectures.
104607dc194Richard Lowe   For MIPS/IRIX this register number is actually recorded on disk
104707dc194Richard Lowe   in the .debug_frame section.
104807dc194Richard Lowe   */
104907dc194Richard Lowe#define DW_FRAME_RA_COL  (DW_FRAME_HIGHEST_NORMAL_REGISTER + 1)
105007dc194Richard Lowe
105107dc194Richard Lowe/* Column recording static link applicable to up-level
105207dc194Richard Lowe   addressing, as in IRIX mp code, pascal, etc.
105307dc194Richard Lowe   This is common to many architectures but
105407dc194Richard Lowe   is not necessarily adequate for all architectures.
105507dc194Richard Lowe   For MIPS/IRIX this register number is actually recorded on disk
105607dc194Richard Lowe   in the .debug_frame section.
105707dc194Richard Lowe*/
105807dc194Richard Lowe#define DW_FRAME_STATIC_LINK (DW_FRAME_HIGHEST_NORMAL_REGISTER + 2)
105907dc194Richard Lowe
106007dc194Richard Lowe
106107dc194Richard Lowe
106207dc194Richard Lowe/*
10637c478bdstevel@tonic-gate  DW_FRAME_UNDEFINED_VAL and  DW_FRAME_SAME_VAL  are
10647c478bdstevel@tonic-gate  never on disk, just generated by libdwarf. See libdwarf.h
10657c478bdstevel@tonic-gate  for their values.
10667c478bdstevel@tonic-gate*/
10677c478bdstevel@tonic-gate
10687c478bdstevel@tonic-gate
10697c478bdstevel@tonic-gate
107007dc194Richard Lowe#define DW_CHILDREN_no               0x00
107107dc194Richard Lowe#define DW_CHILDREN_yes              0x01
10727c478bdstevel@tonic-gate
107307dc194Richard Lowe#define DW_ADDR_none            0
10747c478bdstevel@tonic-gate
10757c478bdstevel@tonic-gate#ifdef __cplusplus
10767c478bdstevel@tonic-gate}
10777c478bdstevel@tonic-gate#endif
10787c478bdstevel@tonic-gate#endif /* __DWARF_H */
1079