The gdb index reader rewrite (commit
486bc5ac) broke a couple of Ada
test cases. I didn't notice these at the time because they require
libgnat debuginfo to be installed.
This patch fixes the problem. The issue here is that the Ada code
sometimes requires types to have "linkage name" entries. This is
required because these lookups are done using the verbatim ("<...>")
notation, which won't match the split names in the index.
Removing the need for this is on my wish-list, see PR ada/32142; but I
have not gotten around to figuring this one out yet.
In the meantime, having the gdb-index reader create synthetic linkage
name entries for types fixes the bug.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33443
main_name = nullptr;
}
+ if (this_lang == language_ada
+ && symbol_kind == GDB_INDEX_SYMBOL_KIND_TYPE)
+ result.add (per_cu->sect_off (), tag,
+ flags | IS_LINKAGE | IS_SYNTHESIZED, this_lang,
+ components.back ().data (),
+ nullptr, per_cu);
+
/* Note that this assumes the final component ends in \0. */
cooked_index_entry *entry = result.add (per_cu->sect_off (), tag,
flags, this_lang,