From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/3] [gdb/symtab] Allow changing of added cooked_index entries
Date: Thu, 4 Jan 2024 15:19:09 +0100 [thread overview]
Message-ID: <20240104141911.7596-2-tdevries@suse.de> (raw)
In-Reply-To: <20240104141911.7596-1-tdevries@suse.de>
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.
---
gdb/dwarf2/cooked-index.c | 2 +-
gdb/dwarf2/cooked-index.h | 10 +++++-----
gdb/dwarf2/read.c | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
index ba77f9cb373..f9850d39bd0 100644
--- a/gdb/dwarf2/cooked-index.c
+++ b/gdb/dwarf2/cooked-index.c
@@ -228,7 +228,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 3c6b9c35fd5..452a07ffb80 100644
--- a/gdb/dwarf2/cooked-index.h
+++ b/gdb/dwarf2/cooked-index.h
@@ -257,11 +257,11 @@ class cooked_index_shard
/* 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)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 6c62932520f..61646a5fba0 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -4468,11 +4468,11 @@ class cooked_index_storage
/* 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);
}
--
2.35.3
next prev parent reply other threads:[~2024-01-04 14:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 14:19 [PATCH 0/3] [gdb/symtab] Eliminate deferred_entry Tom de Vries
2024-01-04 14:19 ` Tom de Vries [this message]
2024-01-08 16:54 ` [PATCH 1/3] [gdb/symtab] Allow changing of added cooked_index entries Alexandra Petlanova Hajkova
2024-01-04 14:19 ` [PATCH 2/3] [gdb/symtab] Make cooked_index_entry::parent_entry private Tom de Vries
2024-01-09 11:49 ` Alexandra Petlanova Hajkova
2024-01-04 14:19 ` [PATCH 3/3] [gdb/symtab] Eliminate deferred_entry Tom de Vries
2024-01-09 14:43 ` [PATCH 0/3] " Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240104141911.7596-2-tdevries@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).