• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisiónc9debfb97e052c32cf0308157cae529ce2059f48 (tree)
Tiempo2020-06-17 17:25:09
AutorAndrew Burgess <andrew.burgess@embe...>
CommiterAndrew Burgess

Log Message

gdb: Convert language la_get_symbol_name_matcher field to a method

This commit changes the language_data::la_get_symbol_name_matcher
function pointer member variable into a member function of
language_defn.

There should be no user visible changes after this commit.

Before this commit access to the la_get_symbol_name_matcher function
pointer was through the get_symbol_name_matcher function, which looked
something like this (is pseudo-code):

<return-type>
get_symbol_name_matcher (language_defn *lang, <other args>)
{
if (current_language == ada)
current_language->la_get_symbol_name_matcher (<other args>);
else
lang->la_get_symbol_name_matcher (<other args>);
}

In this commit I moved the get_symbol_name_matcher as a non-virtual
function in the language_defn base class, I then add a new virtual
method that is only used from within get_symbol_name_matcher, this can
then be overridden by specific languages as needed. So we now have:

class language_defn
{
<return-type> get_symbol_name_matcher (<args>)
{
if (current_language == ada)
return current_language->get_symbol_name_matcher_inner (<args>);
else
return this->get_symbol_name_matcher_inner (<args>);
}
virtual <return-type> get_symbol_name_matcher_inner (<args>)
{
....
}
}

gdb/ChangeLog:

* ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
(ada_language_data): Delete la_get_symbol_name_matcher
initializer.
(language_defn::get_symbol_name_matcher_inner): New member
function.
* c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
initializer.
(cplus_language_data): Likewise.
(cplus_language::get_symbol_name_matcher_inner): New member
function.
(asm_language_data): Delete la_get_symbol_name_matcher initializer.
(minimal_language_data): Likewise.
* cp-support.h (cp_get_symbol_name_matcher): Update header comment.
* d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
initializer.
* dictionary.c (iter_match_first_hashed): Update call to
get_symbol_name_matcher.
(iter_match_next_hashed): Likewise.
(iter_match_next_linear): Likewise.
* dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
* f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
initializer.
(f_language::get_symbol_name_matcher_inner): New member function.
* go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
initializer.
* language.c (default_symbol_name_matcher): Update header comment,
make static.
(language_defn::get_symbol_name_matcher): New definition.
(language_defn::get_symbol_name_matcher_inner): Likewise.
(get_symbol_name_matcher): Delete.
(unknown_language_data): Delete la_get_symbol_name_matcher
initializer.
(auto_language_data): Likewise.
* language.h (language_data): Delete la_get_symbol_name_matcher
field.
(language_defn::get_symbol_name_matcher): New member function.
(language_defn::get_symbol_name_matcher_inner): Likewise.
(default_symbol_name_matcher): Delete declaration.
* linespec.c (find_methods): Update call to
get_symbol_name_matcher.
* m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
initializer.
* minsyms.c (lookup_minimal_symbol): Update call to
get_symbol_name_matcher.
(iterate_over_minimal_symbols): Likewise.
* objc-lang.c (objc_language_data): Delete
la_get_symbol_name_matcher initializer.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* psymtab.c (psymbol_name_matches): Update call to
get_symbol_name_matcher.
* rust-lang.c (rust_language_data): Delete
la_get_symbol_name_matcher initializer.
* symtab.c (symbol_matches_search_name): Update call to
get_symbol_name_matcher.
(compare_symbol_name): Likewise.

Cambiar Resumen

Diferencia incremental

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,64 @@
11 2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
22
3+ * ada-lang.c (ada_get_symbol_name_matcher): Update header comment.
4+ (ada_language_data): Delete la_get_symbol_name_matcher
5+ initializer.
6+ (language_defn::get_symbol_name_matcher_inner): New member
7+ function.
8+ * c-lang.c (c_language_data): Delete la_get_symbol_name_matcher
9+ initializer.
10+ (cplus_language_data): Likewise.
11+ (cplus_language::get_symbol_name_matcher_inner): New member
12+ function.
13+ (asm_language_data): Delete la_get_symbol_name_matcher initializer.
14+ (minimal_language_data): Likewise.
15+ * cp-support.h (cp_get_symbol_name_matcher): Update header comment.
16+ * d-lang.c (d_language_data): Delete la_get_symbol_name_matcher
17+ initializer.
18+ * dictionary.c (iter_match_first_hashed): Update call to
19+ get_symbol_name_matcher.
20+ (iter_match_next_hashed): Likewise.
21+ (iter_match_next_linear): Likewise.
22+ * dwarf2/read.c (dw2_expand_symtabs_matching_symbol): Likewise.
23+ * f-lang.c (f_language_data): Delete la_get_symbol_name_matcher
24+ initializer.
25+ (f_language::get_symbol_name_matcher_inner): New member function.
26+ * go-lang.c (go_language_data): Delete la_get_symbol_name_matcher
27+ initializer.
28+ * language.c (default_symbol_name_matcher): Update header comment,
29+ make static.
30+ (language_defn::get_symbol_name_matcher): New definition.
31+ (language_defn::get_symbol_name_matcher_inner): Likewise.
32+ (get_symbol_name_matcher): Delete.
33+ (unknown_language_data): Delete la_get_symbol_name_matcher
34+ initializer.
35+ (auto_language_data): Likewise.
36+ * language.h (language_data): Delete la_get_symbol_name_matcher
37+ field.
38+ (language_defn::get_symbol_name_matcher): New member function.
39+ (language_defn::get_symbol_name_matcher_inner): Likewise.
40+ (default_symbol_name_matcher): Delete declaration.
41+ * linespec.c (find_methods): Update call to
42+ get_symbol_name_matcher.
43+ * m2-lang.c (m2_language_data): Delete la_get_symbol_name_matcher
44+ initializer.
45+ * minsyms.c (lookup_minimal_symbol): Update call to
46+ get_symbol_name_matcher.
47+ (iterate_over_minimal_symbols): Likewise.
48+ * objc-lang.c (objc_language_data): Delete
49+ la_get_symbol_name_matcher initializer.
50+ * opencl-lang.c (opencl_language_data): Likewise.
51+ * p-lang.c (pascal_language_data): Likewise.
52+ * psymtab.c (psymbol_name_matches): Update call to
53+ get_symbol_name_matcher.
54+ * rust-lang.c (rust_language_data): Delete
55+ la_get_symbol_name_matcher initializer.
56+ * symtab.c (symbol_matches_search_name): Update call to
57+ get_symbol_name_matcher.
58+ (compare_symbol_name): Likewise.
59+
60+2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
61+
362 * ada-lang.c (ada_language_data): Delete la_compute_program
463 initializer.
564 * c-lang.c (c_language_data): Likewise.
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -13862,7 +13862,7 @@ literal_symbol_name_matcher (const char *symbol_search_name,
1386213862 return false;
1386313863 }
1386413864
13865-/* Implement the "la_get_symbol_name_matcher" language_defn method for
13865+/* Implement the "get_symbol_name_matcher" language_defn method for
1386613866 Ada. */
1386713867
1386813868 static symbol_name_matcher_ftype *
@@ -13920,7 +13920,6 @@ extern const struct language_data ada_language_data =
1392013920 ada_get_gdb_completer_word_break_characters,
1392113921 ada_collect_symbol_completion_matches,
1392213922 ada_watch_location_expression,
13923- ada_get_symbol_name_matcher, /* la_get_symbol_name_matcher */
1392413923 &ada_varobj_ops,
1392513924 ada_is_string_type,
1392613925 "(...)" /* la_struct_too_deep_ellipsis */
@@ -14105,6 +14104,15 @@ public:
1410514104 {
1410614105 ada_print_type (type, varstring, stream, show, level, flags);
1410714106 }
14107+
14108+protected:
14109+ /* See language.h. */
14110+
14111+ symbol_name_matcher_ftype *get_symbol_name_matcher_inner
14112+ (const lookup_name_info &lookup_name) const override
14113+ {
14114+ return ada_get_symbol_name_matcher (lookup_name);
14115+ }
1410814116 };
1410914117
1411014118 /* Single instance of the Ada language class. */
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -917,7 +917,6 @@ extern const struct language_data c_language_data =
917917 default_word_break_characters,
918918 default_collect_symbol_completion_matches,
919919 c_watch_location_expression,
920- NULL, /* la_get_symbol_name_matcher */
921920 &c_varobj_ops,
922921 c_is_string_type_p,
923922 "{...}" /* la_struct_too_deep_ellipsis */
@@ -1032,7 +1031,6 @@ extern const struct language_data cplus_language_data =
10321031 default_word_break_characters,
10331032 default_collect_symbol_completion_matches,
10341033 c_watch_location_expression,
1035- cp_get_symbol_name_matcher,
10361034 &cplus_varobj_ops,
10371035 c_is_string_type_p,
10381036 "{...}" /* la_struct_too_deep_ellipsis */
@@ -1184,6 +1182,16 @@ public:
11841182 {
11851183 return cp_class_name_from_physname (physname);
11861184 }
1185+
1186+protected:
1187+
1188+ /* See language.h. */
1189+
1190+ symbol_name_matcher_ftype *get_symbol_name_matcher_inner
1191+ (const lookup_name_info &lookup_name) const override
1192+ {
1193+ return cp_get_symbol_name_matcher (lookup_name);
1194+ }
11871195 };
11881196
11891197 /* The single instance of the C++ language class. */
@@ -1225,7 +1233,6 @@ extern const struct language_data asm_language_data =
12251233 default_word_break_characters,
12261234 default_collect_symbol_completion_matches,
12271235 c_watch_location_expression,
1228- NULL, /* la_get_symbol_name_matcher */
12291236 &default_varobj_ops,
12301237 c_is_string_type_p,
12311238 "{...}" /* la_struct_too_deep_ellipsis */
@@ -1295,7 +1302,6 @@ extern const struct language_data minimal_language_data =
12951302 default_word_break_characters,
12961303 default_collect_symbol_completion_matches,
12971304 c_watch_location_expression,
1298- NULL, /* la_get_symbol_name_matcher */
12991305 &default_varobj_ops,
13001306 c_is_string_type_p,
13011307 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/cp-support.h
+++ b/gdb/cp-support.h
@@ -127,8 +127,7 @@ extern struct type *cp_lookup_rtti_type (const char *name,
127127 "function" or "bar::function" in all namespaces is possible. */
128128 extern unsigned int cp_search_name_hash (const char *search_name);
129129
130-/* Implement the "la_get_symbol_name_matcher" language_defn method for
131- C++. */
130+/* Implement the "get_symbol_name_matcher" language_defn method for C++. */
132131 extern symbol_name_matcher_ftype *cp_get_symbol_name_matcher
133132 (const lookup_name_info &lookup_name);
134133
--- a/gdb/d-lang.c
+++ b/gdb/d-lang.c
@@ -160,7 +160,6 @@ extern const struct language_data d_language_data =
160160 default_word_break_characters,
161161 default_collect_symbol_completion_matches,
162162 c_watch_location_expression,
163- NULL, /* la_get_symbol_name_matcher */
164163 &default_varobj_ops,
165164 c_is_string_type_p,
166165 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/dictionary.c
+++ b/gdb/dictionary.c
@@ -584,7 +584,7 @@ iter_match_first_hashed (const struct dictionary *dict,
584584 unsigned int hash_index = (name.search_name_hash (lang->la_language)
585585 % DICT_HASHED_NBUCKETS (dict));
586586 symbol_name_matcher_ftype *matches_name
587- = get_symbol_name_matcher (lang, name);
587+ = lang->get_symbol_name_matcher (name);
588588 struct symbol *sym;
589589
590590 DICT_ITERATOR_DICT (iterator) = dict;
@@ -612,7 +612,7 @@ iter_match_next_hashed (const lookup_name_info &name,
612612 {
613613 const language_defn *lang = DICT_LANGUAGE (DICT_ITERATOR_DICT (iterator));
614614 symbol_name_matcher_ftype *matches_name
615- = get_symbol_name_matcher (lang, name);
615+ = lang->get_symbol_name_matcher (name);
616616 struct symbol *next;
617617
618618 for (next = DICT_ITERATOR_CURRENT (iterator)->hash_next;
@@ -828,7 +828,7 @@ iter_match_next_linear (const lookup_name_info &name,
828828 const struct dictionary *dict = DICT_ITERATOR_DICT (iterator);
829829 const language_defn *lang = DICT_LANGUAGE (dict);
830830 symbol_name_matcher_ftype *matches_name
831- = get_symbol_name_matcher (lang, name);
831+ = lang->get_symbol_name_matcher (name);
832832
833833 int i, nsyms = DICT_LINEAR_NSYMS (dict);
834834 struct symbol *sym, *retval = NULL;
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -4097,7 +4097,7 @@ dw2_expand_symtabs_matching_symbol
40974097
40984098 const language_defn *lang = language_def (lang_e);
40994099 symbol_name_matcher_ftype *name_matcher
4100- = get_symbol_name_matcher (lang, lookup_name_without_params);
4100+ = lang->get_symbol_name_matcher (lookup_name_without_params);
41014101
41024102 name_and_matcher key {
41034103 name_matcher,
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -620,7 +620,6 @@ extern const struct language_data f_language_data =
620620 f_word_break_characters,
621621 f_collect_symbol_completion_matches,
622622 c_watch_location_expression,
623- cp_get_symbol_name_matcher, /* la_get_symbol_name_matcher */
624623 &default_varobj_ops,
625624 f_is_string_type_p,
626625 "(...)" /* la_struct_too_deep_ellipsis */
@@ -699,6 +698,16 @@ public:
699698 {
700699 f_print_type (type, varstring, stream, show, level, flags);
701700 }
701+
702+protected:
703+
704+ /* See language.h. */
705+
706+ symbol_name_matcher_ftype *get_symbol_name_matcher_inner
707+ (const lookup_name_info &lookup_name) const override
708+ {
709+ return cp_get_symbol_name_matcher (lookup_name);
710+ }
702711 };
703712
704713 /* Single instance of the Fortran language class. */
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -545,7 +545,6 @@ extern const struct language_data go_language_data =
545545 default_word_break_characters,
546546 default_collect_symbol_completion_matches,
547547 c_watch_location_expression,
548- NULL, /* la_get_symbol_name_matcher */
549548 &default_varobj_ops,
550549 go_is_string_type_p,
551550 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -622,9 +622,10 @@ language_defn::print_array_index (struct type *index_type, LONGEST index,
622622 fprintf_filtered (stream, "] = ");
623623 }
624624
625-/* See language.h. */
625+/* The default implementation of the get_symbol_name_matcher_inner method
626+ from the language_defn class. Matches with strncmp_iw. */
626627
627-bool
628+static bool
628629 default_symbol_name_matcher (const char *symbol_search_name,
629630 const lookup_name_info &lookup_name,
630631 completion_match_result *comp_match_res)
@@ -649,6 +650,31 @@ default_symbol_name_matcher (const char *symbol_search_name,
649650
650651 /* See language.h. */
651652
653+symbol_name_matcher_ftype *
654+language_defn::get_symbol_name_matcher
655+ (const lookup_name_info &lookup_name) const
656+{
657+ /* If currently in Ada mode, and the lookup name is wrapped in
658+ '<...>', hijack all symbol name comparisons using the Ada
659+ matcher, which handles the verbatim matching. */
660+ if (current_language->la_language == language_ada
661+ && lookup_name.ada ().verbatim_p ())
662+ return current_language->get_symbol_name_matcher_inner (lookup_name);
663+
664+ return this->get_symbol_name_matcher_inner (lookup_name);
665+}
666+
667+/* See language.h. */
668+
669+symbol_name_matcher_ftype *
670+language_defn::get_symbol_name_matcher_inner
671+ (const lookup_name_info &lookup_name) const
672+{
673+ return default_symbol_name_matcher;
674+}
675+
676+/* See language.h. */
677+
652678 bool
653679 default_is_string_type_p (struct type *type)
654680 {
@@ -661,24 +687,6 @@ default_is_string_type_p (struct type *type)
661687 return (type->code () == TYPE_CODE_STRING);
662688 }
663689
664-/* See language.h. */
665-
666-symbol_name_matcher_ftype *
667-get_symbol_name_matcher (const language_defn *lang,
668- const lookup_name_info &lookup_name)
669-{
670- /* If currently in Ada mode, and the lookup name is wrapped in
671- '<...>', hijack all symbol name comparisons using the Ada
672- matcher, which handles the verbatim matching. */
673- if (current_language->la_language == language_ada
674- && lookup_name.ada ().verbatim_p ())
675- return current_language->la_get_symbol_name_matcher (lookup_name);
676-
677- if (lang->la_get_symbol_name_matcher != nullptr)
678- return lang->la_get_symbol_name_matcher (lookup_name);
679- return default_symbol_name_matcher;
680-}
681-
682690 /* Define the language that is no language. */
683691
684692 static int
@@ -774,7 +782,6 @@ extern const struct language_data unknown_language_data =
774782 default_word_break_characters,
775783 default_collect_symbol_completion_matches,
776784 c_watch_location_expression,
777- NULL, /* la_get_symbol_name_matcher */
778785 &default_varobj_ops,
779786 default_is_string_type_p,
780787 "{...}" /* la_struct_too_deep_ellipsis */
@@ -848,7 +855,6 @@ extern const struct language_data auto_language_data =
848855 default_word_break_characters,
849856 default_collect_symbol_completion_matches,
850857 c_watch_location_expression,
851- NULL, /* la_get_symbol_name_matcher */
852858 &default_varobj_ops,
853859 default_is_string_type_p,
854860 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -338,19 +338,6 @@ struct language_data
338338 gdb::unique_xmalloc_ptr<char> (*la_watch_location_expression)
339339 (struct type *type, CORE_ADDR addr);
340340
341- /* Return a pointer to the function that should be used to match a
342- symbol name against LOOKUP_NAME, according to this language's
343- rules. The matching algorithm depends on LOOKUP_NAME. For
344- example, on Ada, the matching algorithm depends on the symbol
345- name (wild/full/verbatim matching), and on whether we're doing
346- a normal lookup or a completion match lookup.
347-
348- This field may be NULL, in which case
349- default_symbol_name_matcher is used to perform the
350- matching. */
351- symbol_name_matcher_ftype *(*la_get_symbol_name_matcher)
352- (const lookup_name_info &);
353-
354341 /* Various operations on varobj. */
355342 const struct lang_varobj_ops *la_varobj_ops;
356343
@@ -443,6 +430,20 @@ struct language_defn : language_data
443430 return ::iterate_over_symbols (block, name, domain, callback);
444431 }
445432
433+ /* Return a pointer to the function that should be used to match a
434+ symbol name against LOOKUP_NAME, according to this language's
435+ rules. The matching algorithm depends on LOOKUP_NAME. For
436+ example, on Ada, the matching algorithm depends on the symbol
437+ name (wild/full/verbatim matching), and on whether we're doing
438+ a normal lookup or a completion match lookup.
439+
440+ As Ada wants to capture symbol matching for all languages in some
441+ cases, then this method is a non-overridable interface. Languages
442+ should override GET_SYMBOL_NAME_MATCHER_INNER if they need to. */
443+
444+ symbol_name_matcher_ftype *get_symbol_name_matcher
445+ (const lookup_name_info &lookup_name) const;
446+
446447 /* If this language allows compilation from the gdb command line, then
447448 this method will return an instance of struct gcc_context appropriate
448449 to the language. If compilation for this language is generally
@@ -530,6 +531,14 @@ struct language_defn : language_data
530531
531532 /* List of all known languages. */
532533 static const struct language_defn *languages[nr_languages];
534+
535+protected:
536+
537+ /* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
538+ See that method for a description of the arguments. */
539+
540+ virtual symbol_name_matcher_ftype *get_symbol_name_matcher_inner
541+ (const lookup_name_info &lookup_name) const;
533542 };
534543
535544 /* Pointer to the language_defn for our current language. This pointer
@@ -698,13 +707,6 @@ void c_get_string (struct value *value,
698707 int *length, struct type **char_type,
699708 const char **charset);
700709
701-/* The default implementation of la_symbol_name_matcher. Matches with
702- strncmp_iw. */
703-extern bool default_symbol_name_matcher
704- (const char *symbol_search_name,
705- const lookup_name_info &lookup_name,
706- completion_match_result *comp_match_res);
707-
708710 /* Get LANG's symbol_name_matcher method for LOOKUP_NAME. Returns
709711 default_symbol_name_matcher if not set. LANG is used as a hint;
710712 the function may ignore it depending on the current language and
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1232,7 +1232,7 @@ find_methods (struct type *t, enum language t_lang, const char *name,
12321232 int method_counter;
12331233 lookup_name_info lookup_name (name, symbol_name_match_type::FULL);
12341234 symbol_name_matcher_ftype *symbol_name_compare
1235- = get_symbol_name_matcher (language_def (t_lang), lookup_name);
1235+ = language_def (t_lang)->get_symbol_name_matcher (lookup_name);
12361236
12371237 t = check_typedef (t);
12381238
--- a/gdb/m2-lang.c
+++ b/gdb/m2-lang.c
@@ -379,7 +379,6 @@ extern const struct language_data m2_language_data =
379379 default_word_break_characters,
380380 default_collect_symbol_completion_matches,
381381 c_watch_location_expression,
382- NULL, /* la_get_symbol_name_matcher */
383382 &default_varobj_ops,
384383 m2_is_string_type_p,
385384 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/minsyms.c
+++ b/gdb/minsyms.c
@@ -363,8 +363,8 @@ lookup_minimal_symbol (const char *name, const char *sfile,
363363 % MINIMAL_SYMBOL_HASH_SIZE);
364364
365365 symbol_name_matcher_ftype *match
366- = get_symbol_name_matcher (language_def (lang),
367- lookup_name);
366+ = language_def (lang)->get_symbol_name_matcher
367+ (lookup_name);
368368 struct minimal_symbol **msymbol_demangled_hash
369369 = objfile->per_bfd->msymbol_demangled_hash;
370370
@@ -507,7 +507,7 @@ iterate_over_minimal_symbols
507507 enum language lang = (enum language) liter;
508508 const language_defn *lang_def = language_def (lang);
509509 symbol_name_matcher_ftype *name_match
510- = get_symbol_name_matcher (lang_def, lookup_name);
510+ = lang_def->get_symbol_name_matcher (lookup_name);
511511
512512 unsigned int hash
513513 = lookup_name.search_name_hash (lang) % MINIMAL_SYMBOL_HASH_SIZE;
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -354,7 +354,6 @@ extern const struct language_data objc_language_data =
354354 default_word_break_characters,
355355 default_collect_symbol_completion_matches,
356356 c_watch_location_expression,
357- NULL, /* la_get_symbol_name_matcher */
358357 &default_varobj_ops,
359358 c_is_string_type_p,
360359 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/opencl-lang.c
+++ b/gdb/opencl-lang.c
@@ -1033,7 +1033,6 @@ extern const struct language_data opencl_language_data =
10331033 default_word_break_characters,
10341034 default_collect_symbol_completion_matches,
10351035 c_watch_location_expression,
1036- NULL, /* la_get_symbol_name_matcher */
10371036 &default_varobj_ops,
10381037 c_is_string_type_p,
10391038 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/p-lang.c
+++ b/gdb/p-lang.c
@@ -410,7 +410,6 @@ extern const struct language_data pascal_language_data =
410410 default_word_break_characters,
411411 default_collect_symbol_completion_matches,
412412 c_watch_location_expression,
413- NULL, /* la_compare_symbol_for_completion */
414413 &default_varobj_ops,
415414 pascal_is_string_type_p,
416415 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -557,7 +557,7 @@ psymbol_name_matches (partial_symbol *psym,
557557 {
558558 const language_defn *lang = language_def (psym->ginfo.language ());
559559 symbol_name_matcher_ftype *name_match
560- = get_symbol_name_matcher (lang, lookup_name);
560+ = lang->get_symbol_name_matcher (lookup_name);
561561 return name_match (psym->ginfo.search_name (), lookup_name, NULL);
562562 }
563563
--- a/gdb/rust-lang.c
+++ b/gdb/rust-lang.c
@@ -2065,7 +2065,6 @@ extern const struct language_data rust_language_data =
20652065 default_word_break_characters,
20662066 default_collect_symbol_completion_matches,
20672067 rust_watch_location_expression,
2068- NULL, /* la_get_symbol_name_matcher */
20692068 &default_varobj_ops,
20702069 rust_is_string_type_p,
20712070 "{...}" /* la_struct_too_deep_ellipsis */
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -1016,7 +1016,7 @@ symbol_matches_search_name (const struct general_symbol_info *gsymbol,
10161016 const lookup_name_info &name)
10171017 {
10181018 symbol_name_matcher_ftype *name_match
1019- = get_symbol_name_matcher (language_def (gsymbol->language ()), name);
1019+ = language_def (gsymbol->language ())->get_symbol_name_matcher (name);
10201020 return name_match (gsymbol->search_name (), name, NULL);
10211021 }
10221022
@@ -5258,7 +5258,7 @@ compare_symbol_name (const char *symbol_name, language symbol_language,
52585258 const language_defn *lang = language_def (symbol_language);
52595259
52605260 symbol_name_matcher_ftype *name_match
5261- = get_symbol_name_matcher (lang, lookup_name);
5261+ = lang->get_symbol_name_matcher (lookup_name);
52625262
52635263 return name_match (symbol_name, lookup_name, &match_res);
52645264 }