public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/symtab: Allow changing of added cooked_index entries
@ 2024-01-10  9:06 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2024-01-10  9:06 UTC (permalink / raw)
  To: gdb-cvs

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

commit 920bcec068d9416dc8891b79bb49d0d83e6a3857
Author: Tom de Vries <tdevries@suse.de>
Date:   Wed Jan 10 10:06:35 2024 +0100

    gdb/symtab: Allow changing of added cooked_index entries
    
    Make cooked_index_storage::add and cooked_index_entry::add return a
    "cooked_index_entry *" instead of a "const cooked_index_entry *".
    
    Tested on x86_64-linux and ppc64le-linux.
    Tested-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 gdb/dwarf2/cooked-index.c |  2 +-
 gdb/dwarf2/cooked-index.h | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index 661edf5f06e..c82f49e1462 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -245,7 +245,7 @@ cooked_index_entry::write_scope (struct obstack *storage,
 
 /* See cooked-index.h.  */
 
-const cooked_index_entry *
+cooked_index_entry *
 cooked_index_shard::add (sect_offset die_offset, enum dwarf_tag tag,
 			 cooked_index_flag flags, const char *name,
 			 const cooked_index_entry *parent_entry,
diff --git a/gdb/dwarf2/cooked-index.h b/gdb/dwarf2/cooked-index.h
index a26163f1c41..a175f6716f5 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -267,11 +267,11 @@ public:
 
   /* Create a new cooked_index_entry and register it with this object.
      Entries are owned by this object.  The new item is returned.  */
-  const cooked_index_entry *add (sect_offset die_offset, enum dwarf_tag tag,
-				 cooked_index_flag flags,
-				 const char *name,
-				 const cooked_index_entry *parent_entry,
-				 dwarf2_per_cu_data *per_cu);
+  cooked_index_entry *add (sect_offset die_offset, enum dwarf_tag tag,
+			   cooked_index_flag flags,
+			   const char *name,
+			   const cooked_index_entry *parent_entry,
+			   dwarf2_per_cu_data *per_cu);
 
   /* Install a new fixed addrmap from the given mutable addrmap.  */
   void install_addrmap (addrmap_mutable *map)
@@ -383,11 +383,11 @@ public:
 
   /* Add an entry to the index.  The arguments describe the entry; see
      cooked-index.h.  The new entry is returned.  */
-  const cooked_index_entry *add (sect_offset die_offset, enum dwarf_tag tag,
-				 cooked_index_flag flags,
-				 const char *name,
-				 const cooked_index_entry *parent_entry,
-				 dwarf2_per_cu_data *per_cu)
+  cooked_index_entry *add (sect_offset die_offset, enum dwarf_tag tag,
+			   cooked_index_flag flags,
+			   const char *name,
+			   const cooked_index_entry *parent_entry,
+			   dwarf2_per_cu_data *per_cu)
   {
     return m_index->add (die_offset, tag, flags, name, parent_entry, per_cu);
   }

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

only message in thread, other threads:[~2024-01-10  9:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-10  9:06 [binutils-gdb] gdb/symtab: Allow changing of added cooked_index entries Tom de Vries

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).