From a1d1fa3e417b4bd8e79e2a731f9c6089e2d5f747 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 1 Jun 2020 15:21:33 +0100 Subject: gdb: Convert language la_value_print field to a method This commit changes the language_data::la_value_print function pointer member variable into a member function of language_defn. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Delete la_value_print initializer. (ada_language::value_print): New member function. * c-lang.c (c_language_data): Delete la_value_print initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * f-lang.c (f_language_data): Likewise. * go-lang.c (go_language_data): Likewise. * language.c (unk_lang_value_print): Delete. (language_defn::value_print): Define new member function. (unknown_language_data): Delete la_value_print initializer. (unknown_language::value_print): New member function. (auto_language_data): Delete la_value_print initializer. (auto_language::value_print): New member function. * language.h (language_data): Delete la_value_print field. (language_defn::value_print): Declare new member function. (LA_VALUE_PRINT): Update call to value_print. * m2-lang.c (m2_language_data): Delete la_value_print initializer. * objc-lang.c (objc_language_data): Likewise. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. (pascal_language::value_print): New member function. * rust-lang.c (rust_language_data): Delete la_value_print initializer. --- gdb/ada-lang.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gdb/ada-lang.c') diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 392b1a6..85483d4 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -13765,7 +13765,6 @@ extern const struct language_data ada_language_data = emit_char, /* Function to print single char (not used) */ ada_print_typedef, /* Print a typedef using appropriate syntax */ ada_value_print_inner, /* la_value_print_inner */ - ada_value_print, /* Print a top-level value */ NULL, /* name_of_this */ true, /* la_store_sym_names_in_linkage_form_p */ ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */ @@ -14101,6 +14100,14 @@ public: (xstrprintf ("{%s} %s", name.c_str (), core_addr_to_string (addr))); } + /* See language.h. */ + + void value_print (struct value *val, struct ui_file *stream, + const struct value_print_options *options) const override + { + return ada_value_print (val, stream, options); + } + protected: /* See language.h. */ -- cgit v1.1