public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Export dwarf5_augmentation
@ 2024-01-18 20:38 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2024-01-18 20:38 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d34b0ea1aa113878cd0eb6152e7c261c2f98bce

commit 2d34b0ea1aa113878cd0eb6152e7c261c2f98bce
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Dec 3 15:05:35 2023 -0700

    Export dwarf5_augmentation
    
    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.

Diff:
---
 gdb/dwarf2/read-debug-names.c | 3 +--
 gdb/dwarf2/read-debug-names.h | 2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/gdb/dwarf2/read-debug-names.c b/gdb/dwarf2/read-debug-names.c
index 52caff725ca..e2563e84fcf 100644
--- a/gdb/dwarf2/read-debug-names.c
+++ b/gdb/dwarf2/read-debug-names.c
@@ -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
diff --git a/gdb/dwarf2/read-debug-names.h b/gdb/dwarf2/read-debug-names.h
index 97d477f958b..e616cf887a7 100644
--- a/gdb/dwarf2/read-debug-names.h
+++ b/gdb/dwarf2/read-debug-names.h
@@ -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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-01-18 20:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-18 20:38 [binutils-gdb] Export dwarf5_augmentation Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).