gdb: Convert language_data::la_op_print_tab to a method
Convert language_data::la_op_print_tab member variable to a virtual method language_defn::opcode_print_table. I changed the name in order to make it clearer (I hope) what the method does. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Remove la_op_print_tab initializer. (ada_language::opcode_print_table): New member function. * c-lang.c (c_language_data): Remove la_op_print_tab initializer. (c_language::opcode_print_table): New member function. (cplus_language_data): Remove la_op_print_tab initializer. (cplus_language::opcode_print_table): New member function. (asm_language_data): Remove la_op_print_tab initializer. (asm_language::opcode_print_table): New member function. (minimal_language_data): Remove la_op_print_tab initializer. (minimal_language::opcode_print_table): New member function. * d-lang.c (d_language_data): Remove la_op_print_tab initializer. (d_language::opcode_print_table): New member function. * expprint.c (print_subexp_standard): Update call to opcode_print_table. (op_string): Likewise. * f-lang.c (f_language_data): Remove la_op_print_tab initializer. (f_language::opcode_print_table): New member function. * go-lang.c (go_language_data): Remove la_op_print_tab initializer. (go_language::opcode_print_table): New member function. * language.c (unknown_language_data): Remove la_op_print_tab initializer. (unknown_language::opcode_print_table): New member function. (auto_language_data): Remove la_op_print_tab initializer. (auto_language::opcode_print_table): New member function. * language.h (language_data): Remove la_op_print_tab field. (language_defn::opcode_print_table): Declare new member function. * m2-lang.c (m2_language_data): Remove la_op_print_tab initializer. (m2_language::opcode_print_table): New member function. * objc-lang.c (objc_language_data): Remove la_op_print_tab initializer. (objc_language::opcode_print_table): New member function. * opencl-lang.c (opencl_language_data): Remove la_op_print_tab initializer. (opencl_language::opcode_print_table): New member function. * p-lang.c (pascal_language_data): Remove la_op_print_tab initializer. (pascal_language::opcode_print_table): New member function. * rust-lang.c (rust_language_data): Remove la_op_print_tab initializer. (rust_language::opcode_print_table): New member function.
This commit is contained in:
parent
5aba6ebefb
commit
b7c6e27dbb
14 changed files with 127 additions and 20 deletions
|
@ -816,7 +816,6 @@ unknown_language_arch_info (struct gdbarch *gdbarch,
|
|||
|
||||
extern const struct language_data unknown_language_data =
|
||||
{
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
};
|
||||
|
||||
/* Class representing the unknown language. */
|
||||
|
@ -937,6 +936,11 @@ public:
|
|||
|
||||
bool store_sym_names_in_linkage_form_p () const override
|
||||
{ return true; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
const struct op_print *opcode_print_table () const override
|
||||
{ return unk_op_print_tab; }
|
||||
};
|
||||
|
||||
/* Single instance of the unknown language class. */
|
||||
|
@ -947,7 +951,6 @@ static unknown_language unknown_language_defn;
|
|||
|
||||
extern const struct language_data auto_language_data =
|
||||
{
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
};
|
||||
|
||||
/* Class representing the fake "auto" language. */
|
||||
|
@ -1063,6 +1066,11 @@ public:
|
|||
|
||||
const char *name_of_this () const override
|
||||
{ return "this"; }
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
const struct op_print *opcode_print_table () const override
|
||||
{ return unk_op_print_tab; }
|
||||
};
|
||||
|
||||
/* Single instance of the fake "auto" language. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue