forked from Imagelibrary/binutils-gdb
Fix regression in c-linkage-name.exp with gdb index
c-linkage-name.exp started failing with the gdb-index target board due to an earlier patch. The problem here is that some linkage names must be in the index -- but, based on inspection, not C++ linkage names. This patch updates the code to exclude only these.
This commit is contained in:
@@ -1111,12 +1111,13 @@ write_cooked_index (cooked_index_vector *table,
|
|||||||
|
|
||||||
for (const cooked_index_entry *entry : table->all_entries ())
|
for (const cooked_index_entry *entry : table->all_entries ())
|
||||||
{
|
{
|
||||||
/* GDB never put linkage names into .gdb_index. The theory here
|
/* GDB never put C++ linkage names into .gdb_index. The theory
|
||||||
is that a linkage name will normally be in the minimal
|
here is that a linkage name will normally be in the minimal
|
||||||
symbols anyway, so including it in the index is usually
|
symbols anyway, so including it in the index is usually
|
||||||
redundant -- and the cases where it would not be redundant
|
redundant -- and the cases where it would not be redundant
|
||||||
are rare and not worth supporting. */
|
are rare and not worth supporting. */
|
||||||
if ((entry->flags & IS_LINKAGE) != 0)
|
if (entry->per_cu->lang () == language_cplus
|
||||||
|
&& (entry->flags & IS_LINKAGE) != 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const auto it = cu_index_htab.find (entry->per_cu);
|
const auto it = cu_index_htab.find (entry->per_cu);
|
||||||
|
|||||||
Reference in New Issue
Block a user