|
|
1.1.1.2 ! root 1: /* Declarations and definitions of codes relating to the DWARF symbolic ! 2: debugging information format. 1.1 root 3: 1.1.1.2 ! root 4: Written by Ron Guilmette ([email protected]) 1.1 root 5: 1.1.1.2 ! root 6: Copyright (C) 1992 Free Software Foundation, Inc. 1.1 root 7: 1.1.1.2 ! root 8: This file is part of GNU CC. 1.1 root 9: 1.1.1.2 ! root 10: GNU CC is free software; you can redistribute it and/or modify ! 11: it under the terms of the GNU General Public License as published by ! 12: the Free Software Foundation; either version 2, or (at your option) ! 13: any later version. ! 14: ! 15: GNU CC is distributed in the hope that it will be useful, ! 16: but WITHOUT ANY WARRANTY; without even the implied warranty of ! 17: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ! 18: GNU General Public License for more details. ! 19: ! 20: You should have received a copy of the GNU General Public License ! 21: along with GNU CC; see the file COPYING. If not, write to ! 22: the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ ! 23: ! 24: /* This file is derived from the DWARF specification (a public document) ! 25: Revision 1.0.1 (April 8, 1992) developed by the UNIX International ! 26: Programming Languages Special Interest Group (UI/PLSIG) and distributed ! 27: by UNIX International. Copies of this specification are available from ! 28: UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. ! 29: */ 1.1 root 30: 1.1.1.2 ! root 31: /* Tag names and codes. */ 1.1 root 32: 1.1.1.2 ! root 33: enum dwarf_tag { ! 34: TAG_padding = 0x0000, ! 35: TAG_array_type = 0x0001, ! 36: TAG_class_type = 0x0002, ! 37: TAG_entry_point = 0x0003, ! 38: TAG_enumeration_type = 0x0004, ! 39: TAG_formal_parameter = 0x0005, ! 40: TAG_global_subroutine = 0x0006, ! 41: TAG_global_variable = 0x0007, ! 42: /* 0x0008 -- reserved */ ! 43: /* 0x0009 -- reserved */ ! 44: TAG_label = 0x000a, ! 45: TAG_lexical_block = 0x000b, ! 46: TAG_local_variable = 0x000c, ! 47: TAG_member = 0x000d, ! 48: /* 0x000e -- reserved */ ! 49: TAG_pointer_type = 0x000f, ! 50: TAG_reference_type = 0x0010, ! 51: TAG_compile_unit = 0x0011, ! 52: TAG_string_type = 0x0012, ! 53: TAG_structure_type = 0x0013, ! 54: TAG_subroutine = 0x0014, ! 55: TAG_subroutine_type = 0x0015, ! 56: TAG_typedef = 0x0016, ! 57: TAG_union_type = 0x0017, ! 58: TAG_unspecified_parameters = 0x0018, ! 59: TAG_variant = 0x0019, ! 60: TAG_common_block = 0x001a, ! 61: TAG_common_inclusion = 0x001b, ! 62: TAG_inheritance = 0x001c, ! 63: TAG_inlined_subroutine = 0x001d, ! 64: TAG_module = 0x001e, ! 65: TAG_ptr_to_member_type = 0x001f, ! 66: TAG_set_type = 0x0020, ! 67: TAG_subrange_type = 0x0021, ! 68: TAG_with_stmt = 0x0022, ! 69: ! 70: /* GNU extensions */ ! 71: ! 72: TAG_format_label = 0x8000, /* for FORTRAN 77 and Fortran 90 */ ! 73: TAG_namelist = 0x8001, /* For Fortran 90 */ ! 74: TAG_function_template = 0x8002, /* for C++ */ ! 75: TAG_class_template = 0x8003 /* for C++ */ ! 76: }; ! 77: ! 78: #define TAG_lo_user 0x8000 /* implementation-defined range start */ ! 79: #define TAG_hi_user 0xffff /* implementation-defined range end */ ! 80: #define TAG_source_file TAG_compile_unit /* for backward compatability */ ! 81: ! 82: /* Form names and codes. */ ! 83: ! 84: enum dwarf_form { ! 85: FORM_ADDR = 0x1, ! 86: FORM_REF = 0x2, ! 87: FORM_BLOCK2 = 0x3, ! 88: FORM_BLOCK4 = 0x4, ! 89: FORM_DATA2 = 0x5, ! 90: FORM_DATA4 = 0x6, ! 91: FORM_DATA8 = 0x7, ! 92: FORM_STRING = 0x8 ! 93: }; ! 94: ! 95: /* Attribute names and codes. */ ! 96: ! 97: enum dwarf_attribute { ! 98: AT_sibling = (0x0010|FORM_REF), ! 99: AT_location = (0x0020|FORM_BLOCK2), ! 100: AT_name = (0x0030|FORM_STRING), ! 101: AT_fund_type = (0x0050|FORM_DATA2), ! 102: AT_mod_fund_type = (0x0060|FORM_BLOCK2), ! 103: AT_user_def_type = (0x0070|FORM_REF), ! 104: AT_mod_u_d_type = (0x0080|FORM_BLOCK2), ! 105: AT_ordering = (0x0090|FORM_DATA2), ! 106: AT_subscr_data = (0x00a0|FORM_BLOCK2), ! 107: AT_byte_size = (0x00b0|FORM_DATA4), ! 108: AT_bit_offset = (0x00c0|FORM_DATA2), ! 109: AT_bit_size = (0x00d0|FORM_DATA4), ! 110: /* (0x00e0|FORM_xxxx) -- reserved */ ! 111: AT_element_list = (0x00f0|FORM_BLOCK4), ! 112: AT_stmt_list = (0x0100|FORM_DATA4), ! 113: AT_low_pc = (0x0110|FORM_ADDR), ! 114: AT_high_pc = (0x0120|FORM_ADDR), ! 115: AT_language = (0x0130|FORM_DATA4), ! 116: AT_member = (0x0140|FORM_REF), ! 117: AT_discr = (0x0150|FORM_REF), ! 118: AT_discr_value = (0x0160|FORM_BLOCK2), ! 119: /* (0x0170|FORM_xxxx) -- reserved */ ! 120: /* (0x0180|FORM_xxxx) -- reserved */ ! 121: AT_string_length = (0x0190|FORM_BLOCK2), ! 122: AT_common_reference = (0x01a0|FORM_REF), ! 123: AT_comp_dir = (0x01b0|FORM_STRING), ! 124: AT_const_value_string = (0x01c0|FORM_STRING), ! 125: AT_const_value_data2 = (0x01c0|FORM_DATA2), ! 126: AT_const_value_data4 = (0x01c0|FORM_DATA4), ! 127: AT_const_value_data8 = (0x01c0|FORM_DATA8), ! 128: AT_const_value_block2 = (0x01c0|FORM_BLOCK2), ! 129: AT_const_value_block4 = (0x01c0|FORM_BLOCK4), ! 130: AT_containing_type = (0x01d0|FORM_REF), ! 131: AT_default_value_addr = (0x01e0|FORM_ADDR), ! 132: AT_default_value_data2 = (0x01e0|FORM_DATA2), ! 133: AT_default_value_data4 = (0x01e0|FORM_DATA4), ! 134: AT_default_value_data8 = (0x01e0|FORM_DATA8), ! 135: AT_default_value_string = (0x01e0|FORM_STRING), ! 136: AT_friends = (0x01f0|FORM_BLOCK2), ! 137: AT_inline = (0x0200|FORM_STRING), ! 138: AT_is_optional = (0x0210|FORM_STRING), ! 139: AT_lower_bound_ref = (0x0220|FORM_REF), ! 140: AT_lower_bound_data2 = (0x0220|FORM_DATA2), ! 141: AT_lower_bound_data4 = (0x0220|FORM_DATA4), ! 142: AT_lower_bound_data8 = (0x0220|FORM_DATA8), ! 143: AT_private = (0x0240|FORM_STRING), ! 144: AT_producer = (0x0250|FORM_STRING), ! 145: AT_program = (0x0230|FORM_STRING), ! 146: AT_protected = (0x0260|FORM_STRING), ! 147: AT_prototyped = (0x0270|FORM_STRING), ! 148: AT_public = (0x0280|FORM_STRING), ! 149: AT_pure_virtual = (0x0290|FORM_STRING), ! 150: AT_return_addr = (0x02a0|FORM_BLOCK2), ! 151: AT_specification = (0x02b0|FORM_REF), ! 152: AT_start_scope = (0x02c0|FORM_DATA4), ! 153: AT_stride_size = (0x02e0|FORM_DATA4), ! 154: AT_upper_bound_ref = (0x02f0|FORM_REF), ! 155: AT_upper_bound_data2 = (0x02f0|FORM_DATA2), ! 156: AT_upper_bound_data4 = (0x02f0|FORM_DATA4), ! 157: AT_upper_bound_data8 = (0x02f0|FORM_DATA8), ! 158: AT_virtual = (0x0300|FORM_STRING), ! 159: ! 160: /* GNU extensions. */ ! 161: ! 162: AT_sf_names = (0x8000|FORM_DATA4), ! 163: AT_src_info = (0x8010|FORM_DATA4), ! 164: AT_mac_info = (0x8020|FORM_DATA4), ! 165: AT_src_coords = (0x8030|FORM_DATA4) ! 166: }; ! 167: ! 168: #define AT_lo_user 0x8000 /* implementation-defined range start */ ! 169: #define AT_hi_user 0xffff /* implementation-defined range end */ ! 170: ! 171: /* Location atom names and codes. */ ! 172: ! 173: enum dwarf_location_atom { ! 174: OP_REG = 0x01, ! 175: OP_BASEREG = 0x02, ! 176: OP_ADDR = 0x03, ! 177: OP_CONST = 0x04, ! 178: OP_DEREF2 = 0x05, ! 179: OP_DEREF4 = 0x06, ! 180: OP_ADD = 0x07 ! 181: }; ! 182: ! 183: #define OP_LO_USER 0x80 /* implementation-defined range start */ ! 184: #define OP_HI_USER 0xff /* implementation-defined range end */ ! 185: ! 186: /* Fundamental type names and codes. */ ! 187: ! 188: enum dwarf_fundamental_type { ! 189: FT_char = 0x0001, ! 190: FT_signed_char = 0x0002, ! 191: FT_unsigned_char = 0x0003, ! 192: FT_short = 0x0004, ! 193: FT_signed_short = 0x0005, ! 194: FT_unsigned_short = 0x0006, ! 195: FT_integer = 0x0007, ! 196: FT_signed_integer = 0x0008, ! 197: FT_unsigned_integer = 0x0009, ! 198: FT_long = 0x000a, ! 199: FT_signed_long = 0x000b, ! 200: FT_unsigned_long = 0x000c, ! 201: FT_pointer = 0x000d, /* an alias for (void *) */ ! 202: FT_float = 0x000e, ! 203: FT_dbl_prec_float = 0x000f, ! 204: FT_ext_prec_float = 0x0010, /* breaks "classic" svr4 SDB */ ! 205: FT_complex = 0x0011, /* breaks "classic" svr4 SDB */ ! 206: FT_dbl_prec_complex = 0x0012, /* breaks "classic" svr4 SDB */ ! 207: /* 0x0013 -- reserved */ ! 208: FT_void = 0x0014, ! 209: FT_boolean = 0x0015, /* breaks "classic" svr4 SDB */ ! 210: FT_ext_prec_complex = 0x0016, /* breaks "classic" svr4 SDB */ ! 211: FT_label = 0x0017, ! 212: ! 213: /* GNU extensions ! 214: The low order byte must indicate the size (in bytes) for the type. ! 215: All of these types will probably break "classic" svr4 SDB */ ! 216: ! 217: FT_long_long = 0x8008, ! 218: FT_signed_long_long = 0x8108, ! 219: FT_unsigned_long_long = 0x8208, ! 220: ! 221: FT_int8 = 0x9001, ! 222: FT_signed_int8 = 0x9101, ! 223: FT_unsigned_int8 = 0x9201, ! 224: FT_int16 = 0x9302, ! 225: FT_signed_int16 = 0x9402, ! 226: FT_unsigned_int16 = 0x9502, ! 227: FT_int32 = 0x9604, ! 228: FT_signed_int32 = 0x9704, ! 229: FT_unsigned_int32 = 0x9804, ! 230: FT_int64 = 0x9908, ! 231: FT_signed_int64 = 0x9a08, ! 232: FT_unsigned_int64 = 0x9b08, ! 233: ! 234: FT_real32 = 0xa004, ! 235: FT_real64 = 0xa108, ! 236: FT_real96 = 0xa20c, ! 237: FT_real128 = 0xa310 ! 238: }; ! 239: ! 240: #define FT_lo_user 0x8000 /* implementation-defined range start */ ! 241: #define FT_hi_user 0xffff /* implementation defined range end */ ! 242: ! 243: /* Type modifier names and codes. */ ! 244: ! 245: enum dwarf_type_modifier { ! 246: MOD_pointer_to = 0x01, ! 247: MOD_reference_to = 0x02, ! 248: MOD_const = 0x03, ! 249: MOD_volatile = 0x04 ! 250: }; ! 251: ! 252: #define MOD_lo_user 0x80 /* implementation-defined range start */ ! 253: #define MOD_hi_user 0xff /* implementation-defined range end */ ! 254: ! 255: /* Array ordering names and codes. */ ! 256: ! 257: enum dwarf_array_dim_ordering { ! 258: ORD_row_major = 0, ! 259: ORD_col_major = 1 ! 260: }; ! 261: ! 262: /* Array subscript format names and codes. */ ! 263: ! 264: enum dwarf_subscr_data_formats { ! 265: FMT_FT_C_C = 0x0, ! 266: FMT_FT_C_X = 0x1, ! 267: FMT_FT_X_C = 0x2, ! 268: FMT_FT_X_X = 0x3, ! 269: FMT_UT_C_C = 0x4, ! 270: FMT_UT_C_X = 0x5, ! 271: FMT_UT_X_C = 0x6, ! 272: FMT_UT_X_X = 0x7, ! 273: FMT_ET = 0x8 ! 274: }; 1.1 root 275: 276: /* Derived from above for ease of use. */ 277: 278: #define FMT_CODE(_FUNDAMENTAL_TYPE_P, _UB_CONST_P, _LB_CONST_P) \ 279: (((_FUNDAMENTAL_TYPE_P) ? 0 : 4) \ 280: | ((_UB_CONST_P) ? 0 : 2) \ 281: | ((_LB_CONST_P) ? 0 : 1)) 282: 1.1.1.2 ! root 283: /* Source language names and codes. */ 1.1 root 284: 1.1.1.2 ! root 285: enum dwarf_source_language { ! 286: LANG_C89 = 0x00000001, ! 287: LANG_C = 0x00000002, ! 288: LANG_ADA83 = 0x00000003, ! 289: LANG_C_PLUS_PLUS = 0x00000004, ! 290: LANG_COBOL74 = 0x00000005, ! 291: LANG_COBOL85 = 0x00000006, ! 292: LANG_FORTRAN77 = 0x00000007, ! 293: LANG_FORTRAN90 = 0x00000008, ! 294: LANG_PASCAL83 = 0x00000009, ! 295: LANG_MODULA2 = 0x0000000a ! 296: }; 1.1 root 297: 1.1.1.2 ! root 298: #define LANG_lo_user 0x00008000 /* implementation-defined range start */ ! 299: #define LANG_hi_user 0x0000ffff /* implementation-defined range end */ 1.1 root 300: 301: /* Names and codes for GNU "macinfo" extension. */ 302: 1.1.1.2 ! root 303: enum dwarf_macinfo_record_type { ! 304: MACINFO_start = 's', ! 305: MACINFO_resume = 'r', ! 306: MACINFO_define = 'd', ! 307: MACINFO_undef = 'u' ! 308: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.