[1/3,gdb/symtab] Allow changing of added cooked_index entries
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Testing passed
|
Commit Message
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(-)
Comments
On Thu, Jan 4, 2024 at 3:19 PM Tom de Vries <tdevries@suse.de> wrote:
> 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.
> ---
>
> I can confirm this change does not introduce any regressions on Fedora
Rawhide, ppc64le.
@@ -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,
@@ -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)
@@ -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);
}