diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-09-04 17:42:07 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 1996-09-04 17:42:07 +0000 |
commit | c76593a7bb4b16c88a468709387bdcc9f901b004 (patch) | |
tree | 62c84052acdb395e399e1d0519fbf9fa291c5be9 /gnu | |
parent | 0c9d37a9d43fb9a93a09112b3f808be3beb2018d (diff) |
Import of binutils, gas, ld & gprof from Cygnus 960904 tree
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/binutils/include/elf/dwarf2.h | 426 |
1 files changed, 137 insertions, 289 deletions
diff --git a/gnu/usr.bin/binutils/include/elf/dwarf2.h b/gnu/usr.bin/binutils/include/elf/dwarf2.h index bede7e297a3..085ab797575 100644 --- a/gnu/usr.bin/binutils/include/elf/dwarf2.h +++ b/gnu/usr.bin/binutils/include/elf/dwarf2.h @@ -1,7 +1,6 @@ -/* Declarations and definitions of codes relating to the DWARF2 symbolic +/* Declarations and definitions of codes relating to the DWARF symbolic debugging information format. - Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002, - 2003 Free Software Foundation, Inc. + Copyright (C) 1992, 1993, 1995, 1996 Free Software Foundation, Inc. Written by Gary Funck (gary@intrepid.com) The Ada Joint Program Office (AJPO), Florida State Unviversity and Silicon Graphics Inc. @@ -10,124 +9,33 @@ Derived from the DWARF 1 implementation written by Ron Guilmette (rfg@netcom.com), November 1990. - This file is part of GCC. +This file is part of GNU CC. - GCC is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free - Software Foundation; either version 2, or (at your option) any later - version. +GNU CC is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. - GCC is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - License for more details. +GNU CC is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING. If not, write to the Free - Software Foundation, 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to the Free +Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This file is derived from the DWARF specification (a public document) Revision 2.0.0 (July 27, 1993) developed by the UNIX International Programming Languages Special Interest Group (UI/PLSIG) and distributed by UNIX International. Copies of this specification are available from - UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. - - This file also now contains definitions from the DWARF 3 specification. */ - -/* This file is shared between GCC and GDB, and should not contain - prototypes. */ + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. */ #ifndef _ELF_DWARF2_H #define _ELF_DWARF2_H -/* Structure found in the .debug_line section. */ -typedef struct -{ - unsigned char li_length [4]; - unsigned char li_version [2]; - unsigned char li_prologue_length [4]; - unsigned char li_min_insn_length [1]; - unsigned char li_default_is_stmt [1]; - unsigned char li_line_base [1]; - unsigned char li_line_range [1]; - unsigned char li_opcode_base [1]; -} -DWARF2_External_LineInfo; - -typedef struct -{ - unsigned long li_length; - unsigned short li_version; - unsigned int li_prologue_length; - unsigned char li_min_insn_length; - unsigned char li_default_is_stmt; - int li_line_base; - unsigned char li_line_range; - unsigned char li_opcode_base; -} -DWARF2_Internal_LineInfo; - -/* Structure found in .debug_pubnames section. */ -typedef struct -{ - unsigned char pn_length [4]; - unsigned char pn_version [2]; - unsigned char pn_offset [4]; - unsigned char pn_size [4]; -} -DWARF2_External_PubNames; - -typedef struct -{ - unsigned long pn_length; - unsigned short pn_version; - unsigned long pn_offset; - unsigned long pn_size; -} -DWARF2_Internal_PubNames; - -/* Structure found in .debug_info section. */ -typedef struct -{ - unsigned char cu_length [4]; - unsigned char cu_version [2]; - unsigned char cu_abbrev_offset [4]; - unsigned char cu_pointer_size [1]; -} -DWARF2_External_CompUnit; - -typedef struct -{ - unsigned long cu_length; - unsigned short cu_version; - unsigned long cu_abbrev_offset; - unsigned char cu_pointer_size; -} -DWARF2_Internal_CompUnit; - -typedef struct -{ - unsigned char ar_length [4]; - unsigned char ar_version [2]; - unsigned char ar_info_offset [4]; - unsigned char ar_pointer_size [1]; - unsigned char ar_segment_size [1]; -} -DWARF2_External_ARange; - -typedef struct -{ - unsigned long ar_length; - unsigned short ar_version; - unsigned long ar_info_offset; - unsigned char ar_pointer_size; - unsigned char ar_segment_size; -} -DWARF2_Internal_ARange; - - /* Tag names and codes. */ + enum dwarf_tag { DW_TAG_padding = 0x00, @@ -178,38 +86,18 @@ enum dwarf_tag DW_TAG_variant_part = 0x33, DW_TAG_variable = 0x34, DW_TAG_volatile_type = 0x35, - /* DWARF 3. */ - DW_TAG_dwarf_procedure = 0x36, - DW_TAG_restrict_type = 0x37, - DW_TAG_interface_type = 0x38, - DW_TAG_namespace = 0x39, - DW_TAG_imported_module = 0x3a, - DW_TAG_unspecified_type = 0x3b, - DW_TAG_partial_unit = 0x3c, - DW_TAG_imported_unit = 0x3d, - /* SGI/MIPS Extensions. */ + /* SGI/MIPS Extensions */ DW_TAG_MIPS_loop = 0x4081, - /* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */ - DW_TAG_HP_array_descriptor = 0x4090, - /* GNU extensions. */ - DW_TAG_format_label = 0x4101, /* For FORTRAN 77 and Fortran 90. */ - DW_TAG_function_template = 0x4102, /* For C++. */ - DW_TAG_class_template = 0x4103, /* For C++. */ - DW_TAG_GNU_BINCL = 0x4104, - DW_TAG_GNU_EINCL = 0x4105, - /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ - DW_TAG_upc_shared_type = 0x8765, - DW_TAG_upc_strict_type = 0x8766, - DW_TAG_upc_relaxed_type = 0x8767, - /* PGI (STMicroelectronics) extensions. No documentation available. */ - DW_TAG_PGI_kanji_type = 0xA000, - DW_TAG_PGI_interface_block = 0xA020 + /* GNU extensions */ + DW_TAG_format_label = 0x4101, /* for FORTRAN 77 and Fortran 90 */ + DW_TAG_function_template = 0x4102, /* for C++ */ + DW_TAG_class_template = 0x4103 /* for C++ */ }; #define DW_TAG_lo_user 0x4080 #define DW_TAG_hi_user 0xffff -/* Flag that tells whether entry has a child or not. */ +/* flag that tells whether entry has a child or not */ #define DW_children_no 0 #define DW_children_yes 1 @@ -240,6 +128,7 @@ enum dwarf_form }; /* Attribute names and codes. */ + enum dwarf_attribute { DW_AT_sibling = 0x01, @@ -304,20 +193,7 @@ enum dwarf_attribute DW_AT_variable_parameter = 0x4b, DW_AT_virtuality = 0x4c, DW_AT_vtable_elem_location = 0x4d, - /* DWARF 3 values. */ - DW_AT_allocated = 0x4e, - DW_AT_associated = 0x4f, - DW_AT_data_location = 0x50, - DW_AT_stride = 0x51, - DW_AT_entry_pc = 0x52, - DW_AT_use_UTF8 = 0x53, - DW_AT_extension = 0x54, - DW_AT_ranges = 0x55, - DW_AT_trampoline = 0x56, - DW_AT_call_column = 0x57, - DW_AT_call_file = 0x58, - DW_AT_call_line = 0x59, - /* SGI/MIPS extensions. */ + /* SGI/MIPS Extensions */ DW_AT_MIPS_fde = 0x2001, DW_AT_MIPS_loop_begin = 0x2002, DW_AT_MIPS_tail_loop_begin = 0x2003, @@ -325,47 +201,20 @@ enum dwarf_attribute DW_AT_MIPS_loop_unroll_factor = 0x2005, DW_AT_MIPS_software_pipeline_depth = 0x2006, DW_AT_MIPS_linkage_name = 0x2007, - DW_AT_MIPS_stride = 0x2008, - DW_AT_MIPS_abstract_name = 0x2009, - DW_AT_MIPS_clone_origin = 0x200a, - DW_AT_MIPS_has_inlines = 0x200b, - /* HP extensions. */ - DW_AT_HP_block_index = 0x2000, - DW_AT_HP_unmodifiable = 0x2001, /* Same as DW_AT_MIPS_fde. */ - DW_AT_HP_actuals_stmt_list = 0x2010, - DW_AT_HP_proc_per_section = 0x2011, - DW_AT_HP_raw_data_ptr = 0x2012, - DW_AT_HP_pass_by_reference = 0x2013, - DW_AT_HP_opt_level = 0x2014, - DW_AT_HP_prof_version_id = 0x2015, - DW_AT_HP_opt_flags = 0x2016, - DW_AT_HP_cold_region_low_pc = 0x2017, - DW_AT_HP_cold_region_high_pc = 0x2018, - DW_AT_HP_all_variables_modifiable = 0x2019, - DW_AT_HP_linkage_name = 0x201a, - DW_AT_HP_prof_flags = 0x201b, /* In comp unit of procs_info for -g. */ /* GNU extensions. */ - DW_AT_sf_names = 0x2101, - DW_AT_src_info = 0x2102, - DW_AT_mac_info = 0x2103, + DW_AT_sf_names = 0x2101, + DW_AT_src_info = 0x2102, + DW_AT_mac_info = 0x2103, DW_AT_src_coords = 0x2104, DW_AT_body_begin = 0x2105, - DW_AT_body_end = 0x2106, - DW_AT_GNU_vector = 0x2107, - /* VMS extensions. */ - DW_AT_VMS_rtnbeg_pd_address = 0x2201, - /* UPC extension. */ - DW_AT_upc_threads_scaled = 0x3210, - /* PGI (STMicroelectronics) extensions. */ - DW_AT_PGI_lbase = 0x3a00, - DW_AT_PGI_soffset = 0x3a01, - DW_AT_PGI_lstride = 0x3a02 + DW_AT_body_end = 0x2106 }; -#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ -#define DW_AT_hi_user 0x3ff0 /* Implementation-defined range end. */ +#define DW_AT_lo_user 0x2000 /* implementation-defined range start */ +#define DW_AT_hi_user 0x3ff0 /* implementation-defined range end */ /* Location atom names and codes. */ + enum dwarf_location_atom { DW_OP_addr = 0x03, @@ -512,28 +361,14 @@ enum dwarf_location_atom DW_OP_piece = 0x93, DW_OP_deref_size = 0x94, DW_OP_xderef_size = 0x95, - DW_OP_nop = 0x96, - /* DWARF 3 extensions. */ - DW_OP_push_object_address = 0x97, - DW_OP_call2 = 0x98, - DW_OP_call4 = 0x99, - DW_OP_call_ref = 0x9a, - /* GNU extensions. */ - DW_OP_GNU_push_tls_address = 0xe0, - /* HP extensions. */ - DW_OP_HP_unknown = 0xe0, /* Ouch, the same as GNU_push_tls_address. */ - DW_OP_HP_is_value = 0xe1, - DW_OP_HP_fltconst4 = 0xe2, - DW_OP_HP_fltconst8 = 0xe3, - DW_OP_HP_mod_range = 0xe4, - DW_OP_HP_unmod_range = 0xe5, - DW_OP_HP_tls = 0xe6 + DW_OP_nop = 0x96 }; -#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */ -#define DW_OP_hi_user 0xff /* Implementation-defined range end. */ +#define DW_OP_lo_user 0x80 /* implementation-defined range start */ +#define DW_OP_hi_user 0xff /* implementation-defined range end */ /* Type encodings. */ + enum dwarf_type { DW_ATE_void = 0x0, @@ -544,17 +379,7 @@ enum dwarf_type DW_ATE_signed = 0x5, DW_ATE_signed_char = 0x6, DW_ATE_unsigned = 0x7, - DW_ATE_unsigned_char = 0x8, - /* DWARF 3. */ - DW_ATE_imaginary_float = 0x9, - /* HP extensions. */ - DW_ATE_HP_float80 = 0x80, /* Floating-point (80 bit). */ - DW_ATE_HP_complex_float80 = 0x81, /* Complex floating-point (80 bit). */ - DW_ATE_HP_float128 = 0x82, /* Floating-point (128 bit). */ - DW_ATE_HP_complex_float128 = 0x83, /* Complex floating-point (128 bit). */ - DW_ATE_HP_floathpintel = 0x84, /* Floating-point (82 bit IA64). */ - DW_ATE_HP_imaginary_float80 = 0x85, - DW_ATE_HP_imaginary_float128 = 0x86 + DW_ATE_unsigned_char = 0x8 }; #define DW_ATE_lo_user 0x80 @@ -567,7 +392,7 @@ enum dwarf_array_dim_ordering DW_ORD_col_major = 1 }; -/* Access attribute. */ +/* access attribute */ enum dwarf_access_attribute { DW_ACCESS_public = 1, @@ -575,7 +400,7 @@ enum dwarf_access_attribute DW_ACCESS_private = 3 }; -/* Visibility. */ +/* visibility */ enum dwarf_visibility_attribute { DW_VIS_local = 1, @@ -583,7 +408,7 @@ enum dwarf_visibility_attribute DW_VIS_qualified = 3 }; -/* Virtuality. */ +/* virtuality */ enum dwarf_virtuality_attribute { DW_VIRTUALITY_none = 0, @@ -591,7 +416,7 @@ enum dwarf_virtuality_attribute DW_VIRTUALITY_pure_virtual = 2 }; -/* Case sensitivity. */ +/* case sensitivity */ enum dwarf_id_case { DW_ID_case_sensitive = 0, @@ -600,7 +425,7 @@ enum dwarf_id_case DW_ID_case_insensitive = 3 }; -/* Calling convention. */ +/* calling convention */ enum dwarf_calling_convention { DW_CC_normal = 0x1, @@ -611,7 +436,7 @@ enum dwarf_calling_convention #define DW_CC_lo_user 0x40 #define DW_CC_hi_user 0xff -/* Inline attribute. */ +/* inline attribute */ enum dwarf_inline_attribute { DW_INL_not_inlined = 0, @@ -620,14 +445,14 @@ enum dwarf_inline_attribute DW_INL_declared_inlined = 3 }; -/* Discriminant lists. */ -enum dwarf_discrim_list +/* descriminant lists */ +enum dwarf_descrim_list { DW_DSC_label = 0, DW_DSC_range = 1 }; -/* Line number opcodes. */ +/* line number opcodes */ enum dwarf_line_number_ops { DW_LNS_extended_op = 0, @@ -639,33 +464,18 @@ enum dwarf_line_number_ops DW_LNS_negate_stmt = 6, DW_LNS_set_basic_block = 7, DW_LNS_const_add_pc = 8, - DW_LNS_fixed_advance_pc = 9, - /* DWARF 3. */ - DW_LNS_set_prologue_end = 10, - DW_LNS_set_epilogue_begin = 11, - DW_LNS_set_isa = 12 + DW_LNS_fixed_advance_pc = 9 }; -/* Line number extended opcodes. */ +/* line number extended opcodes */ enum dwarf_line_number_x_ops { DW_LNE_end_sequence = 1, DW_LNE_set_address = 2, - DW_LNE_define_file = 3, - /* HP extensions. */ - DW_LNE_HP_negate_is_UV_update = 0x11, - DW_LNE_HP_push_context = 0x12, - DW_LNE_HP_pop_context = 0x13, - DW_LNE_HP_set_file_line_column = 0x14, - DW_LNE_HP_set_routine_name = 0x15, - DW_LNE_HP_set_sequence = 0x16, - DW_LNE_HP_negate_post_semantics = 0x17, - DW_LNE_HP_negate_function_exit = 0x18, - DW_LNE_HP_negate_front_end_logical = 0x19, - DW_LNE_HP_define_proc = 0x20 + DW_LNE_define_file = 3 }; -/* Call frame information. */ +/* call frame information */ enum dwarf_call_frame_info { DW_CFA_advance_loc = 0x40, @@ -686,26 +496,92 @@ enum dwarf_call_frame_info DW_CFA_def_cfa = 0x0c, DW_CFA_def_cfa_register = 0x0d, DW_CFA_def_cfa_offset = 0x0e, - /* DWARF 3. */ - DW_CFA_def_cfa_expression = 0x0f, - DW_CFA_expression = 0x10, - DW_CFA_offset_extended_sf = 0x11, - DW_CFA_def_cfa_sf = 0x12, - DW_CFA_def_cfa_offset_sf = 0x13, - /* SGI/MIPS specific. */ - DW_CFA_MIPS_advance_loc8 = 0x1d, - /* GNU extensions. */ - DW_CFA_GNU_window_save = 0x2d, - DW_CFA_GNU_args_size = 0x2e, - DW_CFA_GNU_negative_offset_extended = 0x2f + /* SGI/MIPS specific */ + DW_CFA_MIPS_advance_loc8 = 0x1d }; #define DW_CIE_ID 0xffffffff #define DW_CIE_VERSION 1 #define DW_CFA_extended 0 -#define DW_CFA_lo_user 0x1c -#define DW_CFA_hi_user 0x3f +#define DW_CFA_low_user 0x1c +#define DW_CFA_high_user 0x3f + +/* SGI/MIPS call frame register usage information */ +enum dwarf_call_reg_usage + { + DW_FRAME_CFA_COL = 0, + DW_FRAME_REG1 = 1, + DW_FRAME_REG2 = 2, + DW_FRAME_REG3 = 3, + DW_FRAME_REG4 = 4, + DW_FRAME_REG5 = 5, + DW_FRAME_REG6 = 6, + DW_FRAME_REG7 = 7, + DW_FRAME_REG8 = 8, + DW_FRAME_REG9 = 9, + DW_FRAME_REG10 = 10, + DW_FRAME_REG11 = 11, + DW_FRAME_REG12 = 12, + DW_FRAME_REG13 = 13, + DW_FRAME_REG14 = 14, + DW_FRAME_REG15 = 15, + DW_FRAME_REG16 = 16, + DW_FRAME_REG17 = 17, + DW_FRAME_REG18 = 18, + DW_FRAME_REG19 = 19, + DW_FRAME_REG20 = 20, + DW_FRAME_REG21 = 21, + DW_FRAME_REG22 = 22, + DW_FRAME_REG23 = 23, + DW_FRAME_REG24 = 24, + DW_FRAME_REG25 = 25, + DW_FRAME_REG26 = 26, + DW_FRAME_REG27 = 27, + DW_FRAME_REG28 = 28, + DW_FRAME_REG29 = 29, + DW_FRAME_REG30 = 30, + DW_FRAME_REG31 = 31, + DW_FRAME_FREG0 = 32, + DW_FRAME_FREG1 = 33, + DW_FRAME_FREG2 = 34, + DW_FRAME_FREG3 = 35, + DW_FRAME_FREG4 = 36, + DW_FRAME_FREG5 = 37, + DW_FRAME_FREG6 = 38, + DW_FRAME_FREG7 = 39, + DW_FRAME_FREG8 = 40, + DW_FRAME_FREG9 = 41, + DW_FRAME_FREG10 = 42, + DW_FRAME_FREG11 = 43, + DW_FRAME_FREG12 = 44, + DW_FRAME_FREG13 = 45, + DW_FRAME_FREG14 = 46, + DW_FRAME_FREG15 = 47, + DW_FRAME_FREG16 = 48, + DW_FRAME_FREG17 = 49, + DW_FRAME_FREG18 = 50, + DW_FRAME_FREG19 = 51, + DW_FRAME_FREG20 = 52, + DW_FRAME_FREG21 = 53, + DW_FRAME_FREG22 = 54, + DW_FRAME_FREG23 = 55, + DW_FRAME_FREG24 = 56, + DW_FRAME_FREG25 = 57, + DW_FRAME_FREG26 = 58, + DW_FRAME_FREG27 = 59, + DW_FRAME_FREG28 = 60, + DW_FRAME_FREG29 = 61, + DW_FRAME_FREG30 = 62, + DW_FRAME_FREG31 = 63, + DW_FRAME_RA_COL = 64, + DW_FRAME_STATIC_LINK = 65 + }; + +/* This is the number of columns in the Frame Table. */ +#define DW_FRAME_LAST_REG_NUM 66 + + #define DW_CHILDREN_no 0x00 #define DW_CHILDREN_yes 0x01 @@ -713,6 +589,7 @@ enum dwarf_call_frame_info #define DW_ADDR_none 0 /* Source language names and codes. */ + enum dwarf_source_language { DW_LANG_C89 = 0x0001, @@ -725,51 +602,22 @@ enum dwarf_source_language DW_LANG_Fortran90 = 0x0008, DW_LANG_Pascal83 = 0x0009, DW_LANG_Modula2 = 0x000a, - DW_LANG_Java = 0x000b, - /* DWARF 3. */ - DW_LANG_C99 = 0x000c, - DW_LANG_Ada95 = 0x000d, - DW_LANG_Fortran95 = 0x000e, - /* MIPS. */ - DW_LANG_Mips_Assembler = 0x8001, - /* UPC. */ - DW_LANG_Upc = 0x8765 + DW_LANG_Mips_Assembler = 0x8001 }; -#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ -#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */ -/* Names and codes for macro information. */ +#define DW_LANG_lo_user 0x8000 /* implementation-defined range start */ +#define DW_LANG_hi_user 0xffff /* implementation-defined range start */ + +/* Names and codes for GNU "macinfo" extension. */ + enum dwarf_macinfo_record_type { DW_MACINFO_define = 1, DW_MACINFO_undef = 2, DW_MACINFO_start_file = 3, DW_MACINFO_end_file = 4, - DW_MACINFO_vendor_ext = 255 + DW_MACINFO_vend_ext = 255 }; - -/* @@@ For use with GNU frame unwind information. */ - -#define DW_EH_PE_absptr 0x00 -#define DW_EH_PE_omit 0xff - -#define DW_EH_PE_uleb128 0x01 -#define DW_EH_PE_udata2 0x02 -#define DW_EH_PE_udata4 0x03 -#define DW_EH_PE_udata8 0x04 -#define DW_EH_PE_sleb128 0x09 -#define DW_EH_PE_sdata2 0x0A -#define DW_EH_PE_sdata4 0x0B -#define DW_EH_PE_sdata8 0x0C -#define DW_EH_PE_signed 0x08 - -#define DW_EH_PE_pcrel 0x10 -#define DW_EH_PE_textrel 0x20 -#define DW_EH_PE_datarel 0x30 -#define DW_EH_PE_funcrel 0x40 -#define DW_EH_PE_aligned 0x50 - -#define DW_EH_PE_indirect 0x80 #endif /* _ELF_DWARF2_H */ |