From 0a50df5dabfe12c8bf20f4f724622ff38ef7828b Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 14 May 2020 19:03:45 +0100 Subject: gdb: Convert language la_demangle field to a method This commit changes the language_data::la_demangle function pointer member variable into a member function of language_defn. The only slightly "weird" change in this commit is in f-lang.c, where I have given the Fortran language a demangle method that is identical to the default language_defn::demangle. The only reason for this is to give me somewhere to copy the comment that was previously embedded within the f_language_data structure. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Delete la_demangle initializer. (ada_language::demangle): New member function. * c-lang.c (c_language_data): Delete la_demangle initializer. (cplus_language_data): Delete la_demangle initializer. (cplus_language::demangle): New member function. (asm_language_data): Delete la_demangle initializer. (minimal_language_data): Delete la_demangle initializer. * d-lang.c (d_language_data): Delete la_demangle initializer. (d_language::demangle): New member function. * f-lang.c (f_language_data): Delete la_demangle initializer. (f_language::demangle): New member function. * go-lang.c (go_language_data): Delete la_demangle initializer. (go_language::demangle): New member function. * language.c (language_demangle): Update. (unk_lang_demangle): Delete. (unknown_language_data): Delete la_demangle initializer. (unknown_language::demangle): New member function. (auto_language_data): Delete la_demangle initializer. (auto_language::demangle): New member function. * language.h (language_data): Delete la_demangle field. (language_defn::demangle): New function. * m2-lang.c (m2_language_data): Delete la_demangle initializer. * objc-lang.c (objc_language_data): Delete la_demangle initializer. (objc_language::demangle): New member function. * opencl-lang.c (opencl_language_data): Delete la_demangle initializer. * p-lang.c (pascal_language_data): Likewise. * rust-lang.c (rust_language_data): Likewise. (rust_language::demangle): New member functi --- gdb/p-lang.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gdb/p-lang.c') diff --git a/gdb/p-lang.c b/gdb/p-lang.c index 9aa03de..50b913e 100644 --- a/gdb/p-lang.c +++ b/gdb/p-lang.c @@ -405,7 +405,6 @@ extern const struct language_data pascal_language_data = "this", /* name_of_this */ false, /* la_store_sym_names_in_linkage_form_p */ basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ - NULL, /* Language specific symbol demangler */ NULL, /* Language specific class_name_from_physname */ pascal_op_print_tab, /* expression operators for printing */ 1, /* c-style arrays */ -- cgit v1.1