From 15e5fd35569d555ca53f074c571d4a3d06da67b0 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Fri, 1 May 2020 17:33:22 +0100 Subject: gdb: Convert language la_read_var_value field to a method This commit changes the language_data::la_read_var_value function pointer member variable into a member function of language_defn. An interesting aspect of this change is that the implementation of language_defn::read_var_value is actually in findvar.c. This is partly historical, the new language_defn::read_var_value is a rename of default_read_var_value, which was already in that file, but also, that is the file that contains the helper functions needed by the read_var_value method, so it makes sens that the method implementation should continue to live there (I think). There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_read_var_value): Delete function, move implementation to... (ada_language::read_var_value): ...here. (ada_language_data): Delete la_read_var_value initializer. * c-lang.c (c_language_data): Likewise. (cplus_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * f-lang.c (f_language_data): Likewise. * findvar.c (default_read_var_value): Rename to... (language_defn::read_var_value): ...this. * findvar.c (read_var_value): Update header comment, and change to call member function instead of function pointer. * go-lang.c (go_language_data): Likewise. * language.c (unknown_language_data): Delete la_read_var_value initializer. (auto_language_data): Likewise. * language.h (struct language_data): Delete la_read_var_value field. (language_defn::read_var_value): New member function. (default_read_var_value): Delete declaration. * m2-lang.c (m2_language_data): Delete la_read_var_value initializer. * objc-lang.c (objc_language_data): Likewise. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. * rust-lang.c (rust_language_data): Likewise. * value.h (default_read_var_value): Delete declaration. --- gdb/f-lang.c | 1 - 1 file changed, 1 deletion(-) (limited to 'gdb/f-lang.c') diff --git a/gdb/f-lang.c b/gdb/f-lang.c index 7288e72..53e44db 100644 --- a/gdb/f-lang.c +++ b/gdb/f-lang.c @@ -650,7 +650,6 @@ extern const struct language_data f_language_data = f_print_typedef, /* Print a typedef using appropriate syntax */ f_value_print_innner, /* la_value_print_inner */ c_value_print, /* FIXME */ - default_read_var_value, /* la_read_var_value */ NULL, /* Language specific skip_trampoline */ NULL, /* name_of_this */ false, /* la_store_sym_names_in_linkage_form_p */ -- cgit v1.1