Sync dwarf2.{def,h} and dwarfnames.c from gcc/libiberty
authorMark Wielaard <mark@klomp.org>
Sat, 14 Jun 2025 19:03:58 +0000 (21:03 +0200)
committerMark Wielaard <mark@klomp.org>
Sat, 14 Jun 2025 19:03:58 +0000 (21:03 +0200)
dwarf2.def
dwarf2.h
dwarfnames.c

index 1ae6e1df298bcc3f1a0a08a3d5b266948d3baf65..989f078041d4a0d5be2ad8387fe0c823bc336d8e 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- c -*-
    Declarations and definitions of codes relating to the DWARF2 and
    DWARF3 symbolic debugging information formats.
-   Copyright (C) 1992-2021 Free Software Foundation, Inc.
+   Copyright (C) 1992-2025 Free Software Foundation, Inc.
 
    Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
    Office (AJPO), Florida State University and Silicon Graphics Inc.
@@ -289,7 +289,7 @@ DW_AT (DW_AT_frame_base, 0x40)
 DW_AT (DW_AT_friend, 0x41)
 DW_AT (DW_AT_identifier_case, 0x42)
 DW_AT (DW_AT_macro_info, 0x43)
-DW_AT (DW_AT_namelist_items, 0x44)
+DW_AT (DW_AT_namelist_item, 0x44)
 DW_AT (DW_AT_priority, 0x45)
 DW_AT (DW_AT_segment, 0x46)
 DW_AT (DW_AT_specification, 0x47)
@@ -364,6 +364,9 @@ DW_AT (DW_AT_export_symbols, 0x89)
 DW_AT (DW_AT_deleted, 0x8a)
 DW_AT (DW_AT_defaulted, 0x8b)
 DW_AT (DW_AT_loclists_base, 0x8c)
+/* DWARF 6.  */
+DW_AT (DW_AT_language_name, 0x90)
+DW_AT (DW_AT_language_version, 0x91)
 
 DW_AT_DUP (DW_AT_lo_user, 0x2000) /* Implementation-defined range start.  */
 DW_AT_DUP (DW_AT_hi_user, 0x3fff) /* Implementation-defined range end.  */
@@ -785,6 +788,8 @@ DW_CFA (DW_CFA_hi_user, 0x3f)
 
 /* SGI/MIPS specific.  */
 DW_CFA (DW_CFA_MIPS_advance_loc8, 0x1d)
+/* AArch64 extensions.  */
+DW_CFA (DW_CFA_AARCH64_negate_ra_state_with_pc, 0x2c)
 /* GNU extensions.
    NOTE: DW_CFA_GNU_window_save is multiplexed on Sparc and AArch64.  */
 DW_CFA (DW_CFA_GNU_window_save, 0x2d)
@@ -802,8 +807,17 @@ DW_IDX (DW_IDX_parent, 4)
 DW_IDX (DW_IDX_type_hash, 5)
 DW_IDX_DUP (DW_IDX_lo_user, 0x2000)
 DW_IDX (DW_IDX_hi_user, 0x3fff)
+/* Internal linkage.  A flag.  */
 DW_IDX (DW_IDX_GNU_internal, 0x2000)
+/* External linkage.  A flag.  Note that gdb no longer generates this;
+   the default is to assume external linkage.  */
 DW_IDX (DW_IDX_GNU_external, 0x2001)
+/* This entry is the program's entry point.  A flag.  */
+DW_IDX (DW_IDX_GNU_main, 0x2002)
+/* Language for this entry.  A DW_LANG_* value.  */
+DW_IDX (DW_IDX_GNU_language, 0x2003)
+/* This entry is a linkage name.  A flag.  */
+DW_IDX (DW_IDX_GNU_linkage_name, 0x2004)
 DW_END_IDX
 
 /* DWARF5 Unit type header encodings  */
index 50b6ddb1f11b6196d4b57c2a6d79b12aae1bed93..344447fbc3688aff19ba82551c05f7fdd3e81ab3 100644 (file)
--- a/dwarf2.h
+++ b/dwarf2.h
@@ -1,6 +1,6 @@
 /* Declarations and definitions of codes relating to the DWARF2 and
    DWARF3 symbolic debugging information formats.
-   Copyright (C) 1992-2021 Free Software Foundation, Inc.
+   Copyright (C) 1992-2025 Free Software Foundation, Inc.
 
    Written by Gary Funck (gary@intrepid.com) The Ada Joint Program
    Office (AJPO), Florida State University and Silicon Graphics Inc.
 #define DW_FIRST_ATE(name, value) enum dwarf_type { \
   name = value
 #define DW_END_ATE };
+#ifdef __cplusplus
+#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info: int { \
+  name = value
+#else
 #define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \
   name = value
+#endif
 #define DW_END_CFA };
 #define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \
   name = value
@@ -373,9 +378,40 @@ enum dwarf_source_language
     DW_LANG_Fortran03 = 0x0022,
     DW_LANG_Fortran08 = 0x0023,
     DW_LANG_RenderScript = 0x0024,
+    DW_LANG_BLISS = 0x0025,
+    /* Post DWARF 5 additions to the DWARF set.
+       See https://dwarfstd.org/languages.html .  */
+    DW_LANG_Kotlin = 0x0026,
+    DW_LANG_Zig = 0x0027,
+    DW_LANG_Crystal = 0x0028,
+    DW_LANG_C_plus_plus_17 = 0x002a,
+    DW_LANG_C_plus_plus_20 = 0x002b,
+    DW_LANG_C17 = 0x002c,
+    DW_LANG_Fortran18 = 0x002d,
+    DW_LANG_Ada2005 = 0x002e,
+    DW_LANG_Ada2012 = 0x002f,
+    DW_LANG_HIP = 0x0030,
+    DW_LANG_Assembly = 0x0031,
+    DW_LANG_C_sharp = 0x0032,
+    DW_LANG_Mojo = 0x0033,
+    DW_LANG_GLSL = 0x0034,
+    DW_LANG_GLSL_ES = 0x0035,
+    DW_LANG_HLSL = 0x0036,
+    DW_LANG_OpenCL_CPP = 0x0037,
+    DW_LANG_CPP_for_OpenCL = 0x0038,
+    DW_LANG_SYCL = 0x0039,
+    DW_LANG_C_plus_plus_23 = 0x003a,
+    DW_LANG_Odin = 0x003b,
+    DW_LANG_P4 = 0x003c,
+    DW_LANG_Metal = 0x003d,
+    DW_LANG_C23 = 0x003e,
+    DW_LANG_Fortran23 = 0x003f,
+    DW_LANG_Ruby = 0x0040,
+    DW_LANG_Move = 0x0041,
+    DW_LANG_Hylo = 0x0042,
 
     DW_LANG_lo_user = 0x8000,  /* Implementation-defined range start.  */
-    DW_LANG_hi_user = 0xffff,  /* Implementation-defined range start.  */
+    DW_LANG_hi_user = 0xffff,  /* Implementation-defined range end.  */
 
     /* MIPS.  */
     DW_LANG_Mips_Assembler = 0x8001,
@@ -392,6 +428,59 @@ enum dwarf_source_language
     DW_LANG_Rust_old = 0x9000
   };
 
+/* DWARF 6 source language names and codes.  */
+enum dwarf_source_language_name
+  {
+    /* https://dwarfstd.org/languages-v6.html */
+    DW_LNAME_Ada = 0x0001,
+    DW_LNAME_BLISS = 0x0002,
+    DW_LNAME_C = 0x0003,
+    DW_LNAME_C_plus_plus = 0x0004,
+    DW_LNAME_Cobol = 0x0005,
+    DW_LNAME_Crystal = 0x0006,
+    DW_LNAME_D = 0x0007,
+    DW_LNAME_Dylan = 0x0008,
+    DW_LNAME_Fortran = 0x0009,
+    DW_LNAME_Go = 0x000a,
+    DW_LNAME_Haskell = 0x000b,
+    DW_LNAME_Java = 0x000c,
+    DW_LNAME_Julia = 0x000d,
+    DW_LNAME_Kotlin = 0x000e,
+    DW_LNAME_Modula2 = 0x000f,
+    DW_LNAME_Modula3 = 0x0010,
+    DW_LNAME_ObjC = 0x0011,
+    DW_LNAME_ObjC_plus_plus = 0x0012,
+    DW_LNAME_OCaml = 0x0013,
+    DW_LNAME_OpenCL_C = 0x0014,
+    DW_LNAME_Pascal = 0x0015,
+    DW_LNAME_PLI = 0x0016,
+    DW_LNAME_Python = 0x0017,
+    DW_LNAME_RenderScript = 0x0018,
+    DW_LNAME_Rust = 0x0019,
+    DW_LNAME_Swift = 0x001a,
+    DW_LNAME_UPC = 0x001b,
+    DW_LNAME_Zig = 0x001c,
+    DW_LNAME_Assembly = 0x001d,
+    DW_LNAME_C_sharp = 0x001e,
+    DW_LNAME_Mojo = 0x001f,
+    DW_LNAME_GLSL = 0x0020,
+    DW_LNAME_GLSL_ES = 0x0021,
+    DW_LNAME_HLSL = 0x0022,
+    DW_LNAME_OpenCL_CPP = 0x0023,
+    DW_LNAME_CPP_for_OpenCL = 0x0024,
+    DW_LNAME_SYCL = 0x0025,
+    DW_LNAME_Ruby = 0x0026,
+    DW_LNAME_Move = 0x0027,
+    DW_LNAME_Hylo = 0x0028,
+    DW_LNAME_HIP = 0x0029,
+    DW_LNAME_Odin = 0x002a,
+    DW_LNAME_P4 = 0x002b,
+    DW_LNAME_Metal = 0x002c,
+
+    DW_LNAME_lo_user = 0x8000, /* Implementation-defined range start.  */
+    DW_LNAME_hi_user = 0xffff  /* Implementation-defined range end.  */
+  };
+
 /* Names and codes for macro information.  */
 enum dwarf_macinfo_record_type
   {
index 630d841724266e1ea108c6fe7e8ac6bfdb2bf4d0..cf0780cfa315dedb72e131115a2add0d1cc3a615 100644 (file)
@@ -1,5 +1,5 @@
 /* Names of various DWARF tags.
-   Copyright (C) 2012-2021 Free Software Foundation, Inc.
+   Copyright (C) 2012-2025 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
    
This page took 0.061388 seconds and 5 git commands to generate.