]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Export dwarf5_augmentation
authorTom Tromey <tom@tromey.com>
Sun, 3 Dec 2023 22:05:35 +0000 (15:05 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 18 Jan 2024 15:20:17 +0000 (08:20 -0700)
I don't know why gdb had the .debug_names augmentation string in two
separate places; this patch exports it in one spot, to be used in
another.

gdb/dwarf2/read-debug-names.c
gdb/dwarf2/read-debug-names.h

index 52caff725ca64153783e145b03c5c383fad27c06..e2563e84fcfa02f63d1dd84515450707110e5524 100644 (file)
@@ -404,8 +404,7 @@ static_assert (sizeof (old_gdb_augmentation) % 4 == 0);
 
 /* DWARF-5 augmentation string for GDB's DW_IDX_GNU_* extension.  This
    must have a size that is a multiple of 4.  */
-static const gdb_byte dwarf5_augmentation[]
-     = { 'G', 'D', 'B', '2', 0, 0, 0, 0 };
+const gdb_byte dwarf5_augmentation[8] = { 'G', 'D', 'B', '2', 0, 0, 0, 0 };
 static_assert (sizeof (dwarf5_augmentation) % 4 == 0);
 
 /* A helper function that reads the .debug_names section in SECTION
index 97d477f958ba6213f698cf19260ed8f52a2bed38..e616cf887a77c6b10a399171bc409fd7e82b6df9 100644 (file)
@@ -22,6 +22,8 @@
 
 struct dwarf2_per_objfile;
 
+extern const gdb_byte dwarf5_augmentation[8];
+
 /* Read .debug_names.  If everything went ok, initialize the "quick"
    elements of all the CUs and return true.  Otherwise, return false.  */