diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-02 15:42:42 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-18 08:20:16 -0700 |
commit | 5902fa8a555c43780dedfde1ed1a8be933b395f9 (patch) | |
tree | 7ab1bced2ed6fb73f5446b61048b86eb1c43f74a /gdb/dwarf2/index-write.c | |
parent | 374807b60751a5f890005d16dd8b466b22185a3f (diff) | |
download | fsf-binutils-gdb-5902fa8a555c43780dedfde1ed1a8be933b395f9.zip fsf-binutils-gdb-5902fa8a555c43780dedfde1ed1a8be933b395f9.tar.gz fsf-binutils-gdb-5902fa8a555c43780dedfde1ed1a8be933b395f9.tar.bz2 |
Add language to cooked_index_entry
This adds a new 'lang' member to cooked_index_entry. This holds the
language of the symbol. This is primarily useful for the new
.debug_names reader, which will not scan the CUs for languages up
front.
This also changes cooked_index_shard::add to return a non-const
pointer. This doesn't impact the current code, but is needed for the
new reader.
Diffstat (limited to 'gdb/dwarf2/index-write.c')
-rw-r--r-- | gdb/dwarf2/index-write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c index 081046d..2decee6 100644 --- a/gdb/dwarf2/index-write.c +++ b/gdb/dwarf2/index-write.c @@ -1282,7 +1282,7 @@ write_cooked_index (cooked_index *table, const char *name = entry->full_name (symtab->obstack ()); - if (entry->per_cu->lang () == language_ada) + if (entry->lang == language_ada) { /* In order for the index to work when read back into gdb, it has to use the encoded name, with any @@ -1290,7 +1290,7 @@ write_cooked_index (cooked_index *table, std::string encoded = ada_encode (name, false); name = obstack_strdup (symtab->obstack (), encoded.c_str ()); } - else if (entry->per_cu->lang () == language_cplus + else if (entry->lang == language_cplus && (entry->flags & IS_LINKAGE) != 0) { /* GDB never put C++ linkage names into .gdb_index. The |