| 1 |
/* Declarations and definitions of codes relating to the DWARF2 and |
| 2 |
DWARF3 symbolic debugging information formats. |
| 3 |
Copyright (C) 1992-2025 Free Software Foundation, Inc. |
| 4 |
|
| 5 |
Written by Gary Funck ([email protected]) The Ada Joint Program |
| 6 |
Office (AJPO), Florida State University and Silicon Graphics Inc. |
| 7 |
provided support for this effort -- June 21, 1995. |
| 8 |
|
| 9 |
Derived from the DWARF 1 implementation written by Ron Guilmette |
| 10 |
([email protected]), November 1990. |
| 11 |
|
| 12 |
This file is part of GCC. |
| 13 |
|
| 14 |
GCC is free software; you can redistribute it and/or modify it under |
| 15 |
the terms of the GNU General Public License as published by the Free |
| 16 |
Software Foundation; either version 3, or (at your option) any later |
| 17 |
version. |
| 18 |
|
| 19 |
GCC is distributed in the hope that it will be useful, but WITHOUT |
| 20 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 21 |
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public |
| 22 |
License for more details. |
| 23 |
|
| 24 |
Under Section 7 of GPL version 3, you are granted additional |
| 25 |
permissions described in the GCC Runtime Library Exception, version |
| 26 |
3.1, as published by the Free Software Foundation. |
| 27 |
|
| 28 |
You should have received a copy of the GNU General Public License and |
| 29 |
a copy of the GCC Runtime Library Exception along with this program; |
| 30 |
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 31 |
<http://www.gnu.org/licenses/>. */ |
| 32 |
|
| 33 |
/* This file is derived from the DWARF specification (a public document) |
| 34 |
Revision 2.0.0 (July 27, 1993) developed by the UNIX International |
| 35 |
Programming Languages Special Interest Group (UI/PLSIG) and distributed |
| 36 |
by UNIX International. Copies of this specification are available from |
| 37 |
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. |
| 38 |
|
| 39 |
This file also now contains definitions from the DWARF 3 specification |
| 40 |
published Dec 20, 2005, available from: http://dwarf.freestandards.org. */ |
| 41 |
|
| 42 |
#ifndef _DWARF2_H |
| 43 |
#define _DWARF2_H |
| 44 |
|
| 45 |
#define DW_TAG(name, value) , name = value |
| 46 |
#define DW_TAG_DUP(name, value) , name = value |
| 47 |
#define DW_FORM(name, value) , name = value |
| 48 |
#define DW_AT(name, value) , name = value |
| 49 |
#define DW_AT_DUP(name, value) , name = value |
| 50 |
#define DW_OP(name, value) , name = value |
| 51 |
#define DW_OP_DUP(name, value) , name = value |
| 52 |
#define DW_ATE(name, value) , name = value |
| 53 |
#define DW_ATE_DUP(name, value) , name = value |
| 54 |
#define DW_CFA(name, value) , name = value |
| 55 |
#define DW_CFA_DUP(name, value) , name = value |
| 56 |
#define DW_IDX(name, value) , name = value |
| 57 |
#define DW_IDX_DUP(name, value) , name = value |
| 58 |
#define DW_UT(name, value) , name = value |
| 59 |
|
| 60 |
#define DW_FIRST_TAG(name, value) enum dwarf_tag { \ |
| 61 |
name = value |
| 62 |
#define DW_END_TAG }; |
| 63 |
#define DW_FIRST_FORM(name, value) enum dwarf_form { \ |
| 64 |
name = value |
| 65 |
#define DW_END_FORM }; |
| 66 |
#define DW_FIRST_AT(name, value) enum dwarf_attribute { \ |
| 67 |
name = value |
| 68 |
#define DW_END_AT }; |
| 69 |
#define DW_FIRST_OP(name, value) enum dwarf_location_atom { \ |
| 70 |
name = value |
| 71 |
#define DW_END_OP }; |
| 72 |
#define DW_FIRST_ATE(name, value) enum dwarf_type { \ |
| 73 |
name = value |
| 74 |
#define DW_END_ATE }; |
| 75 |
#ifdef __cplusplus |
| 76 |
#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info: int { \ |
| 77 |
name = value |
| 78 |
#else |
| 79 |
#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \ |
| 80 |
name = value |
| 81 |
#endif |
| 82 |
#define DW_END_CFA }; |
| 83 |
#define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \ |
| 84 |
name = value |
| 85 |
#define DW_END_IDX }; |
| 86 |
#define DW_FIRST_UT(name, value) enum dwarf_unit_type { \ |
| 87 |
name = value |
| 88 |
#define DW_END_UT }; |
| 89 |
|
| 90 |
#include "dwarf2.def" |
| 91 |
|
| 92 |
#undef DW_FIRST_TAG |
| 93 |
#undef DW_END_TAG |
| 94 |
#undef DW_FIRST_FORM |
| 95 |
#undef DW_END_FORM |
| 96 |
#undef DW_FIRST_AT |
| 97 |
#undef DW_END_AT |
| 98 |
#undef DW_FIRST_OP |
| 99 |
#undef DW_END_OP |
| 100 |
#undef DW_FIRST_ATE |
| 101 |
#undef DW_END_ATE |
| 102 |
#undef DW_FIRST_CFA |
| 103 |
#undef DW_END_CFA |
| 104 |
#undef DW_FIRST_IDX |
| 105 |
#undef DW_END_IDX |
| 106 |
#undef DW_FIRST_UT |
| 107 |
#undef DW_END_UT |
| 108 |
|
| 109 |
#undef DW_TAG |
| 110 |
#undef DW_TAG_DUP |
| 111 |
#undef DW_FORM |
| 112 |
#undef DW_AT |
| 113 |
#undef DW_AT_DUP |
| 114 |
#undef DW_OP |
| 115 |
#undef DW_OP_DUP |
| 116 |
#undef DW_ATE |
| 117 |
#undef DW_ATE_DUP |
| 118 |
#undef DW_CFA |
| 119 |
#undef DW_CFA_DUP |
| 120 |
#undef DW_IDX |
| 121 |
#undef DW_IDX_DUP |
| 122 |
#undef DW_UT |
| 123 |
|
| 124 |
/* Flag that tells whether entry has a child or not. */ |
| 125 |
#define DW_children_no 0 |
| 126 |
#define DW_children_yes 1 |
| 127 |
|
| 128 |
#define DW_AT_stride_size DW_AT_bit_stride /* Note: The use of DW_AT_stride_size is deprecated. */ |
| 129 |
#define DW_AT_stride DW_AT_byte_stride /* Note: The use of DW_AT_stride is deprecated. */ |
| 130 |
|
| 131 |
/* Decimal sign encodings. */ |
| 132 |
enum dwarf_decimal_sign_encoding |
| 133 |
{ |
| 134 |
/* DWARF 3. */ |
| 135 |
DW_DS_unsigned = 0x01, |
| 136 |
DW_DS_leading_overpunch = 0x02, |
| 137 |
DW_DS_trailing_overpunch = 0x03, |
| 138 |
DW_DS_leading_separate = 0x04, |
| 139 |
DW_DS_trailing_separate = 0x05 |
| 140 |
}; |
| 141 |
|
| 142 |
/* Endianity encodings. */ |
| 143 |
enum dwarf_endianity_encoding |
| 144 |
{ |
| 145 |
/* DWARF 3. */ |
| 146 |
DW_END_default = 0x00, |
| 147 |
DW_END_big = 0x01, |
| 148 |
DW_END_little = 0x02, |
| 149 |
|
| 150 |
DW_END_lo_user = 0x40, |
| 151 |
DW_END_hi_user = 0xff |
| 152 |
}; |
| 153 |
|
| 154 |
/* Array ordering names and codes. */ |
| 155 |
enum dwarf_array_dim_ordering |
| 156 |
{ |
| 157 |
DW_ORD_row_major = 0, |
| 158 |
DW_ORD_col_major = 1 |
| 159 |
}; |
| 160 |
|
| 161 |
/* Access attribute. */ |
| 162 |
enum dwarf_access_attribute |
| 163 |
{ |
| 164 |
DW_ACCESS_public = 1, |
| 165 |
DW_ACCESS_protected = 2, |
| 166 |
DW_ACCESS_private = 3 |
| 167 |
}; |
| 168 |
|
| 169 |
/* Visibility. */ |
| 170 |
enum dwarf_visibility_attribute |
| 171 |
{ |
| 172 |
DW_VIS_local = 1, |
| 173 |
DW_VIS_exported = 2, |
| 174 |
DW_VIS_qualified = 3 |
| 175 |
}; |
| 176 |
|
| 177 |
/* Virtuality. */ |
| 178 |
enum dwarf_virtuality_attribute |
| 179 |
{ |
| 180 |
DW_VIRTUALITY_none = 0, |
| 181 |
DW_VIRTUALITY_virtual = 1, |
| 182 |
DW_VIRTUALITY_pure_virtual = 2 |
| 183 |
}; |
| 184 |
|
| 185 |
/* Case sensitivity. */ |
| 186 |
enum dwarf_id_case |
| 187 |
{ |
| 188 |
DW_ID_case_sensitive = 0, |
| 189 |
DW_ID_up_case = 1, |
| 190 |
DW_ID_down_case = 2, |
| 191 |
DW_ID_case_insensitive = 3 |
| 192 |
}; |
| 193 |
|
| 194 |
/* Calling convention. */ |
| 195 |
enum dwarf_calling_convention |
| 196 |
{ |
| 197 |
DW_CC_normal = 0x1, |
| 198 |
DW_CC_program = 0x2, |
| 199 |
DW_CC_nocall = 0x3, |
| 200 |
|
| 201 |
/* DWARF 5. */ |
| 202 |
DW_CC_pass_by_reference = 0x4, |
| 203 |
DW_CC_pass_by_value = 0x5, |
| 204 |
|
| 205 |
DW_CC_lo_user = 0x40, |
| 206 |
DW_CC_hi_user = 0xff, |
| 207 |
|
| 208 |
DW_CC_GNU_renesas_sh = 0x40, |
| 209 |
DW_CC_GNU_borland_fastcall_i386 = 0x41, |
| 210 |
|
| 211 |
/* This DW_CC_ value is not currently generated by any toolchain. It is |
| 212 |
used internally to GDB to indicate OpenCL C functions that have been |
| 213 |
compiled with the IBM XL C for OpenCL compiler and use a non-platform |
| 214 |
calling convention for passing OpenCL C vector types. This value may |
| 215 |
be changed freely as long as it does not conflict with any other DW_CC_ |
| 216 |
value defined here. */ |
| 217 |
DW_CC_GDB_IBM_OpenCL = 0xff |
| 218 |
}; |
| 219 |
|
| 220 |
/* Inline attribute. */ |
| 221 |
enum dwarf_inline_attribute |
| 222 |
{ |
| 223 |
DW_INL_not_inlined = 0, |
| 224 |
DW_INL_inlined = 1, |
| 225 |
DW_INL_declared_not_inlined = 2, |
| 226 |
DW_INL_declared_inlined = 3 |
| 227 |
}; |
| 228 |
|
| 229 |
/* Discriminant lists. */ |
| 230 |
enum dwarf_discrim_list |
| 231 |
{ |
| 232 |
DW_DSC_label = 0, |
| 233 |
DW_DSC_range = 1 |
| 234 |
}; |
| 235 |
|
| 236 |
/* Line number opcodes. */ |
| 237 |
enum dwarf_line_number_ops |
| 238 |
{ |
| 239 |
DW_LNS_extended_op = 0, |
| 240 |
DW_LNS_copy = 1, |
| 241 |
DW_LNS_advance_pc = 2, |
| 242 |
DW_LNS_advance_line = 3, |
| 243 |
DW_LNS_set_file = 4, |
| 244 |
DW_LNS_set_column = 5, |
| 245 |
DW_LNS_negate_stmt = 6, |
| 246 |
DW_LNS_set_basic_block = 7, |
| 247 |
DW_LNS_const_add_pc = 8, |
| 248 |
DW_LNS_fixed_advance_pc = 9, |
| 249 |
/* DWARF 3. */ |
| 250 |
DW_LNS_set_prologue_end = 10, |
| 251 |
DW_LNS_set_epilogue_begin = 11, |
| 252 |
DW_LNS_set_isa = 12 |
| 253 |
}; |
| 254 |
|
| 255 |
/* Line number extended opcodes. */ |
| 256 |
enum dwarf_line_number_x_ops |
| 257 |
{ |
| 258 |
DW_LNE_end_sequence = 1, |
| 259 |
DW_LNE_set_address = 2, |
| 260 |
DW_LNE_define_file = 3, |
| 261 |
DW_LNE_set_discriminator = 4, |
| 262 |
/* HP extensions. */ |
| 263 |
DW_LNE_HP_negate_is_UV_update = 0x11, |
| 264 |
DW_LNE_HP_push_context = 0x12, |
| 265 |
DW_LNE_HP_pop_context = 0x13, |
| 266 |
DW_LNE_HP_set_file_line_column = 0x14, |
| 267 |
DW_LNE_HP_set_routine_name = 0x15, |
| 268 |
DW_LNE_HP_set_sequence = 0x16, |
| 269 |
DW_LNE_HP_negate_post_semantics = 0x17, |
| 270 |
DW_LNE_HP_negate_function_exit = 0x18, |
| 271 |
DW_LNE_HP_negate_front_end_logical = 0x19, |
| 272 |
DW_LNE_HP_define_proc = 0x20, |
| 273 |
DW_LNE_HP_source_file_correlation = 0x80, |
| 274 |
|
| 275 |
DW_LNE_lo_user = 0x80, |
| 276 |
DW_LNE_hi_user = 0xff |
| 277 |
}; |
| 278 |
|
| 279 |
/* Sub-opcodes for DW_LNE_HP_source_file_correlation. */ |
| 280 |
enum dwarf_line_number_hp_sfc_ops |
| 281 |
{ |
| 282 |
DW_LNE_HP_SFC_formfeed = 1, |
| 283 |
DW_LNE_HP_SFC_set_listing_line = 2, |
| 284 |
DW_LNE_HP_SFC_associate = 3 |
| 285 |
}; |
| 286 |
|
| 287 |
/* Content type codes in line table directory_entry_format |
| 288 |
and file_name_entry_format sequences. */ |
| 289 |
enum dwarf_line_number_content_type |
| 290 |
{ |
| 291 |
DW_LNCT_path = 0x1, |
| 292 |
DW_LNCT_directory_index = 0x2, |
| 293 |
DW_LNCT_timestamp = 0x3, |
| 294 |
DW_LNCT_size = 0x4, |
| 295 |
DW_LNCT_MD5 = 0x5, |
| 296 |
DW_LNCT_lo_user = 0x2000, |
| 297 |
DW_LNCT_hi_user = 0x3fff |
| 298 |
}; |
| 299 |
|
| 300 |
/* Type codes for location list entries. */ |
| 301 |
enum dwarf_location_list_entry_type |
| 302 |
{ |
| 303 |
DW_LLE_end_of_list = 0x00, |
| 304 |
DW_LLE_base_addressx = 0x01, |
| 305 |
DW_LLE_startx_endx = 0x02, |
| 306 |
DW_LLE_startx_length = 0x03, |
| 307 |
DW_LLE_offset_pair = 0x04, |
| 308 |
DW_LLE_default_location = 0x05, |
| 309 |
DW_LLE_base_address = 0x06, |
| 310 |
DW_LLE_start_end = 0x07, |
| 311 |
DW_LLE_start_length = 0x08, |
| 312 |
|
| 313 |
/* <http://lists.dwarfstd.org/private.cgi/dwarf-discuss-dwarfstd.org/2017-April/004347.html> |
| 314 |
has the proposal for now; only available to list members. |
| 315 |
|
| 316 |
A (possibly updated) copy of the proposal is available at |
| 317 |
<http://people.redhat.com/aoliva/papers/sfn/dwarf6-sfn-lvu.txt>. */ |
| 318 |
DW_LLE_GNU_view_pair = 0x09, |
| 319 |
#define DW_LLE_view_pair DW_LLE_GNU_view_pair |
| 320 |
|
| 321 |
/* Former extension for Fission. |
| 322 |
See http://gcc.gnu.org/wiki/DebugFission. */ |
| 323 |
DW_LLE_GNU_end_of_list_entry = 0x00, |
| 324 |
DW_LLE_GNU_base_address_selection_entry = 0x01, |
| 325 |
DW_LLE_GNU_start_end_entry = 0x02, |
| 326 |
DW_LLE_GNU_start_length_entry = 0x03 |
| 327 |
}; |
| 328 |
|
| 329 |
#define DW_CIE_ID 0xffffffff |
| 330 |
#define DW64_CIE_ID 0xffffffffffffffffULL |
| 331 |
|
| 332 |
#define DW_CFA_extended 0 |
| 333 |
|
| 334 |
#define DW_CHILDREN_no 0x00 |
| 335 |
#define DW_CHILDREN_yes 0x01 |
| 336 |
|
| 337 |
#define DW_ADDR_none 0 |
| 338 |
|
| 339 |
/* Source language names and codes. */ |
| 340 |
enum dwarf_source_language |
| 341 |
{ |
| 342 |
DW_LANG_C89 = 0x0001, |
| 343 |
DW_LANG_C = 0x0002, |
| 344 |
DW_LANG_Ada83 = 0x0003, |
| 345 |
DW_LANG_C_plus_plus = 0x0004, |
| 346 |
DW_LANG_Cobol74 = 0x0005, |
| 347 |
DW_LANG_Cobol85 = 0x0006, |
| 348 |
DW_LANG_Fortran77 = 0x0007, |
| 349 |
DW_LANG_Fortran90 = 0x0008, |
| 350 |
DW_LANG_Pascal83 = 0x0009, |
| 351 |
DW_LANG_Modula2 = 0x000a, |
| 352 |
/* DWARF 3. */ |
| 353 |
DW_LANG_Java = 0x000b, |
| 354 |
DW_LANG_C99 = 0x000c, |
| 355 |
DW_LANG_Ada95 = 0x000d, |
| 356 |
DW_LANG_Fortran95 = 0x000e, |
| 357 |
DW_LANG_PLI = 0x000f, |
| 358 |
DW_LANG_ObjC = 0x0010, |
| 359 |
DW_LANG_ObjC_plus_plus = 0x0011, |
| 360 |
DW_LANG_UPC = 0x0012, |
| 361 |
DW_LANG_D = 0x0013, |
| 362 |
/* DWARF 4. */ |
| 363 |
DW_LANG_Python = 0x0014, |
| 364 |
/* DWARF 5. */ |
| 365 |
DW_LANG_OpenCL = 0x0015, |
| 366 |
DW_LANG_Go = 0x0016, |
| 367 |
DW_LANG_Modula3 = 0x0017, |
| 368 |
DW_LANG_Haskell = 0x0018, |
| 369 |
DW_LANG_C_plus_plus_03 = 0x0019, |
| 370 |
DW_LANG_C_plus_plus_11 = 0x001a, |
| 371 |
DW_LANG_OCaml = 0x001b, |
| 372 |
DW_LANG_Rust = 0x001c, |
| 373 |
DW_LANG_C11 = 0x001d, |
| 374 |
DW_LANG_Swift = 0x001e, |
| 375 |
DW_LANG_Julia = 0x001f, |
| 376 |
DW_LANG_Dylan = 0x0020, |
| 377 |
DW_LANG_C_plus_plus_14 = 0x0021, |
| 378 |
DW_LANG_Fortran03 = 0x0022, |
| 379 |
DW_LANG_Fortran08 = 0x0023, |
| 380 |
DW_LANG_RenderScript = 0x0024, |
| 381 |
DW_LANG_BLISS = 0x0025, |
| 382 |
/* Post DWARF 5 additions to the DWARF set. |
| 383 |
See https://dwarfstd.org/languages.html . */ |
| 384 |
DW_LANG_Kotlin = 0x0026, |
| 385 |
DW_LANG_Zig = 0x0027, |
| 386 |
DW_LANG_Crystal = 0x0028, |
| 387 |
DW_LANG_C_plus_plus_17 = 0x002a, |
| 388 |
DW_LANG_C_plus_plus_20 = 0x002b, |
| 389 |
DW_LANG_C17 = 0x002c, |
| 390 |
DW_LANG_Fortran18 = 0x002d, |
| 391 |
DW_LANG_Ada2005 = 0x002e, |
| 392 |
DW_LANG_Ada2012 = 0x002f, |
| 393 |
DW_LANG_HIP = 0x0030, |
| 394 |
DW_LANG_Assembly = 0x0031, |
| 395 |
DW_LANG_C_sharp = 0x0032, |
| 396 |
DW_LANG_Mojo = 0x0033, |
| 397 |
DW_LANG_GLSL = 0x0034, |
| 398 |
DW_LANG_GLSL_ES = 0x0035, |
| 399 |
DW_LANG_HLSL = 0x0036, |
| 400 |
DW_LANG_OpenCL_CPP = 0x0037, |
| 401 |
DW_LANG_CPP_for_OpenCL = 0x0038, |
| 402 |
DW_LANG_SYCL = 0x0039, |
| 403 |
DW_LANG_C_plus_plus_23 = 0x003a, |
| 404 |
DW_LANG_Odin = 0x003b, |
| 405 |
DW_LANG_P4 = 0x003c, |
| 406 |
DW_LANG_Metal = 0x003d, |
| 407 |
DW_LANG_C23 = 0x003e, |
| 408 |
DW_LANG_Fortran23 = 0x003f, |
| 409 |
DW_LANG_Ruby = 0x0040, |
| 410 |
DW_LANG_Move = 0x0041, |
| 411 |
DW_LANG_Hylo = 0x0042, |
| 412 |
|
| 413 |
DW_LANG_lo_user = 0x8000, /* Implementation-defined range start. */ |
| 414 |
DW_LANG_hi_user = 0xffff, /* Implementation-defined range end. */ |
| 415 |
|
| 416 |
/* MIPS. */ |
| 417 |
DW_LANG_Mips_Assembler = 0x8001, |
| 418 |
/* UPC. */ |
| 419 |
DW_LANG_Upc = 0x8765, |
| 420 |
/* HP extensions. */ |
| 421 |
DW_LANG_HP_Bliss = 0x8003, |
| 422 |
DW_LANG_HP_Basic91 = 0x8004, |
| 423 |
DW_LANG_HP_Pascal91 = 0x8005, |
| 424 |
DW_LANG_HP_IMacro = 0x8006, |
| 425 |
DW_LANG_HP_Assembler = 0x8007, |
| 426 |
|
| 427 |
/* Rust extension, but replaced in DWARF 5. */ |
| 428 |
DW_LANG_Rust_old = 0x9000 |
| 429 |
}; |
| 430 |
|
| 431 |
/* DWARF 6 source language names and codes. */ |
| 432 |
enum dwarf_source_language_name |
| 433 |
{ |
| 434 |
/* https://dwarfstd.org/languages-v6.html */ |
| 435 |
DW_LNAME_Ada = 0x0001, |
| 436 |
DW_LNAME_BLISS = 0x0002, |
| 437 |
DW_LNAME_C = 0x0003, |
| 438 |
DW_LNAME_C_plus_plus = 0x0004, |
| 439 |
DW_LNAME_Cobol = 0x0005, |
| 440 |
DW_LNAME_Crystal = 0x0006, |
| 441 |
DW_LNAME_D = 0x0007, |
| 442 |
DW_LNAME_Dylan = 0x0008, |
| 443 |
DW_LNAME_Fortran = 0x0009, |
| 444 |
DW_LNAME_Go = 0x000a, |
| 445 |
DW_LNAME_Haskell = 0x000b, |
| 446 |
DW_LNAME_Java = 0x000c, |
| 447 |
DW_LNAME_Julia = 0x000d, |
| 448 |
DW_LNAME_Kotlin = 0x000e, |
| 449 |
DW_LNAME_Modula2 = 0x000f, |
| 450 |
DW_LNAME_Modula3 = 0x0010, |
| 451 |
DW_LNAME_ObjC = 0x0011, |
| 452 |
DW_LNAME_ObjC_plus_plus = 0x0012, |
| 453 |
DW_LNAME_OCaml = 0x0013, |
| 454 |
DW_LNAME_OpenCL_C = 0x0014, |
| 455 |
DW_LNAME_Pascal = 0x0015, |
| 456 |
DW_LNAME_PLI = 0x0016, |
| 457 |
DW_LNAME_Python = 0x0017, |
| 458 |
DW_LNAME_RenderScript = 0x0018, |
| 459 |
DW_LNAME_Rust = 0x0019, |
| 460 |
DW_LNAME_Swift = 0x001a, |
| 461 |
DW_LNAME_UPC = 0x001b, |
| 462 |
DW_LNAME_Zig = 0x001c, |
| 463 |
DW_LNAME_Assembly = 0x001d, |
| 464 |
DW_LNAME_C_sharp = 0x001e, |
| 465 |
DW_LNAME_Mojo = 0x001f, |
| 466 |
DW_LNAME_GLSL = 0x0020, |
| 467 |
DW_LNAME_GLSL_ES = 0x0021, |
| 468 |
DW_LNAME_HLSL = 0x0022, |
| 469 |
DW_LNAME_OpenCL_CPP = 0x0023, |
| 470 |
DW_LNAME_CPP_for_OpenCL = 0x0024, |
| 471 |
DW_LNAME_SYCL = 0x0025, |
| 472 |
DW_LNAME_Ruby = 0x0026, |
| 473 |
DW_LNAME_Move = 0x0027, |
| 474 |
DW_LNAME_Hylo = 0x0028, |
| 475 |
DW_LNAME_HIP = 0x0029, |
| 476 |
DW_LNAME_Odin = 0x002a, |
| 477 |
DW_LNAME_P4 = 0x002b, |
| 478 |
DW_LNAME_Metal = 0x002c, |
| 479 |
|
| 480 |
DW_LNAME_lo_user = 0x8000, /* Implementation-defined range start. */ |
| 481 |
DW_LNAME_hi_user = 0xffff /* Implementation-defined range end. */ |
| 482 |
}; |
| 483 |
|
| 484 |
/* Names and codes for macro information. */ |
| 485 |
enum dwarf_macinfo_record_type |
| 486 |
{ |
| 487 |
DW_MACINFO_define = 1, |
| 488 |
DW_MACINFO_undef = 2, |
| 489 |
DW_MACINFO_start_file = 3, |
| 490 |
DW_MACINFO_end_file = 4, |
| 491 |
DW_MACINFO_vendor_ext = 255 |
| 492 |
}; |
| 493 |
|
| 494 |
/* DW_TAG_defaulted/DW_TAG_GNU_defaulted attributes. */ |
| 495 |
enum dwarf_defaulted_attribute |
| 496 |
{ |
| 497 |
DW_DEFAULTED_no = 0x00, |
| 498 |
DW_DEFAULTED_in_class = 0x01, |
| 499 |
DW_DEFAULTED_out_of_class = 0x02 |
| 500 |
}; |
| 501 |
|
| 502 |
/* Names and codes for new style macro information. */ |
| 503 |
enum dwarf_macro_record_type |
| 504 |
{ |
| 505 |
DW_MACRO_define = 0x01, |
| 506 |
DW_MACRO_undef = 0x02, |
| 507 |
DW_MACRO_start_file = 0x03, |
| 508 |
DW_MACRO_end_file = 0x04, |
| 509 |
DW_MACRO_define_strp = 0x05, |
| 510 |
DW_MACRO_undef_strp = 0x06, |
| 511 |
DW_MACRO_import = 0x07, |
| 512 |
DW_MACRO_define_sup = 0x08, |
| 513 |
DW_MACRO_undef_sup = 0x09, |
| 514 |
DW_MACRO_import_sup = 0x0a, |
| 515 |
DW_MACRO_define_strx = 0x0b, |
| 516 |
DW_MACRO_undef_strx = 0x0c, |
| 517 |
DW_MACRO_lo_user = 0xe0, |
| 518 |
DW_MACRO_hi_user = 0xff, |
| 519 |
|
| 520 |
/* Compatibility macros for the GNU .debug_macro extension. */ |
| 521 |
DW_MACRO_GNU_define = 0x01, |
| 522 |
DW_MACRO_GNU_undef = 0x02, |
| 523 |
DW_MACRO_GNU_start_file = 0x03, |
| 524 |
DW_MACRO_GNU_end_file = 0x04, |
| 525 |
DW_MACRO_GNU_define_indirect = 0x05, |
| 526 |
DW_MACRO_GNU_undef_indirect = 0x06, |
| 527 |
DW_MACRO_GNU_transparent_include = 0x07, |
| 528 |
/* Extensions for DWZ multifile. |
| 529 |
See http://www.dwarfstd.org/ShowIssue.php?issue=120604.1&type=open . */ |
| 530 |
DW_MACRO_GNU_define_indirect_alt = 0x08, |
| 531 |
DW_MACRO_GNU_undef_indirect_alt = 0x09, |
| 532 |
DW_MACRO_GNU_transparent_include_alt = 0x0a, |
| 533 |
DW_MACRO_GNU_lo_user = 0xe0, |
| 534 |
DW_MACRO_GNU_hi_user = 0xff |
| 535 |
}; |
| 536 |
|
| 537 |
/* Range list entry kinds in .debug_rnglists* section. */ |
| 538 |
enum dwarf_range_list_entry |
| 539 |
{ |
| 540 |
DW_RLE_end_of_list = 0x00, |
| 541 |
DW_RLE_base_addressx = 0x01, |
| 542 |
DW_RLE_startx_endx = 0x02, |
| 543 |
DW_RLE_startx_length = 0x03, |
| 544 |
DW_RLE_offset_pair = 0x04, |
| 545 |
DW_RLE_base_address = 0x05, |
| 546 |
DW_RLE_start_end = 0x06, |
| 547 |
DW_RLE_start_length = 0x07 |
| 548 |
}; |
| 549 |
|
| 550 |
/* @@@ For use with GNU frame unwind information. */ |
| 551 |
|
| 552 |
#define DW_EH_PE_absptr 0x00 |
| 553 |
#define DW_EH_PE_omit 0xff |
| 554 |
|
| 555 |
#define DW_EH_PE_uleb128 0x01 |
| 556 |
#define DW_EH_PE_udata2 0x02 |
| 557 |
#define DW_EH_PE_udata4 0x03 |
| 558 |
#define DW_EH_PE_udata8 0x04 |
| 559 |
#define DW_EH_PE_sleb128 0x09 |
| 560 |
#define DW_EH_PE_sdata2 0x0A |
| 561 |
#define DW_EH_PE_sdata4 0x0B |
| 562 |
#define DW_EH_PE_sdata8 0x0C |
| 563 |
#define DW_EH_PE_signed 0x08 |
| 564 |
|
| 565 |
#define DW_EH_PE_pcrel 0x10 |
| 566 |
#define DW_EH_PE_textrel 0x20 |
| 567 |
#define DW_EH_PE_datarel 0x30 |
| 568 |
#define DW_EH_PE_funcrel 0x40 |
| 569 |
#define DW_EH_PE_aligned 0x50 |
| 570 |
|
| 571 |
#define DW_EH_PE_indirect 0x80 |
| 572 |
|
| 573 |
/* Codes for the debug sections in a dwarf package (.dwp) file. |
| 574 |
(From the pre-standard formats Extensions for Fission. |
| 575 |
See http://gcc.gnu.org/wiki/DebugFissionDWP). */ |
| 576 |
enum dwarf_sect |
| 577 |
{ |
| 578 |
DW_SECT_INFO = 1, |
| 579 |
DW_SECT_TYPES = 2, |
| 580 |
DW_SECT_ABBREV = 3, |
| 581 |
DW_SECT_LINE = 4, |
| 582 |
DW_SECT_LOC = 5, |
| 583 |
DW_SECT_STR_OFFSETS = 6, |
| 584 |
DW_SECT_MACINFO = 7, |
| 585 |
DW_SECT_MACRO = 8, |
| 586 |
DW_SECT_MAX = 8 |
| 587 |
}; |
| 588 |
|
| 589 |
/* Codes for the debug sections in a dwarf package (.dwp) file. |
| 590 |
(From the official DWARF v5 spec. |
| 591 |
See http://dwarfstd.org/doc/DWARF5.pdf, section 7.3.5). */ |
| 592 |
enum dwarf_sect_v5 |
| 593 |
{ |
| 594 |
DW_SECT_INFO_V5 = 1, |
| 595 |
DW_SECT_RESERVED_V5 = 2, |
| 596 |
DW_SECT_ABBREV_V5 = 3, |
| 597 |
DW_SECT_LINE_V5 = 4, |
| 598 |
DW_SECT_LOCLISTS_V5 = 5, |
| 599 |
DW_SECT_STR_OFFSETS_V5 = 6, |
| 600 |
DW_SECT_MACRO_V5 = 7, |
| 601 |
DW_SECT_RNGLISTS_V5 = 8, |
| 602 |
DW_SECT_MAX_V5 = 8 |
| 603 |
}; |
| 604 |
|
| 605 |
#ifdef __cplusplus |
| 606 |
extern "C" { |
| 607 |
#endif /* __cplusplus */ |
| 608 |
|
| 609 |
/* Return the name of a DW_TAG_ constant, or NULL if the value is not |
| 610 |
recognized. */ |
| 611 |
extern const char *get_DW_TAG_name (unsigned int tag); |
| 612 |
|
| 613 |
/* Return the name of a DW_AT_ constant, or NULL if the value is not |
| 614 |
recognized. */ |
| 615 |
extern const char *get_DW_AT_name (unsigned int attr); |
| 616 |
|
| 617 |
/* Return the name of a DW_FORM_ constant, or NULL if the value is not |
| 618 |
recognized. */ |
| 619 |
extern const char *get_DW_FORM_name (unsigned int form); |
| 620 |
|
| 621 |
/* Return the name of a DW_OP_ constant, or NULL if the value is not |
| 622 |
recognized. */ |
| 623 |
extern const char *get_DW_OP_name (unsigned int op); |
| 624 |
|
| 625 |
/* Return the name of a DW_ATE_ constant, or NULL if the value is not |
| 626 |
recognized. */ |
| 627 |
extern const char *get_DW_ATE_name (unsigned int enc); |
| 628 |
|
| 629 |
/* Return the name of a DW_CFA_ constant, or NULL if the value is not |
| 630 |
recognized. */ |
| 631 |
extern const char *get_DW_CFA_name (unsigned int opc); |
| 632 |
|
| 633 |
/* Return the name of a DW_IDX_ constant, or NULL if the value is not |
| 634 |
recognized. */ |
| 635 |
extern const char *get_DW_IDX_name (unsigned int idx); |
| 636 |
|
| 637 |
/* Return the name of a DW_UT_ constant, or NULL if the value is not |
| 638 |
recognized. */ |
| 639 |
extern const char *get_DW_UT_name (unsigned int ut); |
| 640 |
|
| 641 |
#ifdef __cplusplus |
| 642 |
} |
| 643 |
#endif /* __cplusplus */ |
| 644 |
|
| 645 |
#endif /* _DWARF2_H */ |