]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ada-lang.h
Always use expand_symtabs_matching in ada-lang.c
authorTom Tromey <tromey@adacore.com>
Fri, 10 Nov 2023 18:58:47 +0000 (11:58 -0700)
committerTom Tromey <tromey@adacore.com>
Wed, 6 Dec 2023 17:14:24 +0000 (10:14 -0700)
commit957ce53750b7c92640d9e7c7b6169366ef1788b0
treeb9984e992fa9afcf8bf296db1f3286bf5e195367
parent47cd8fcf54b0ea6b5c4e576e194022500211f06e
Always use expand_symtabs_matching in ada-lang.c

The previous patch fixed the immediate performance problem with Ada
name matching, by having a subset of matches call
expand_symtabs_matching rather than expand_matching_symbols.  However,
it seemed to me that expand_matching_symbols should not be needed at
all.

To achieve this, this patch changes ada_lookup_name_info::split_name
to use the decoded name, rather than the encoded name.  In order to
make this work correctly, a new decoded form is used: one that does
not decode operators (this is already done) and also does not decode
wide characters.  The latter change is done so that changes to the Ada
source charset don't affect the DWARF index.

With this in place, we can change ada-lang.c to always use
expand_symtabs_matching rather than expand_matching_symbols.
gdb/ada-lang.c
gdb/ada-lang.h
gdb/dwarf2/cooked-index.c
gdb/symtab.h