diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-08-04 17:07:59 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-09-16 11:04:04 +0100 |
commit | b7c6e27dbbbbe678b2e2f0bf617605e055e1b378 (patch) | |
tree | 2a87e1b858d3b041518218a81cf031ba795e4561 /gdb/expprint.c | |
parent | 5aba6ebefb9488163c82e198b73ecf0a05a5d1fd (diff) | |
download | binutils-b7c6e27dbbbbe678b2e2f0bf617605e055e1b378.zip binutils-b7c6e27dbbbbe678b2e2f0bf617605e055e1b378.tar.gz binutils-b7c6e27dbbbbe678b2e2f0bf617605e055e1b378.tar.bz2 |
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.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r-- | gdb/expprint.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c index 8cca5b4..5bd9553 100644 --- a/gdb/expprint.c +++ b/gdb/expprint.c @@ -73,7 +73,7 @@ print_subexp_standard (struct expression *exp, int *pos, struct value *val; char *tempstr = NULL; - op_print_tab = exp->language_defn->la_op_print_tab; + op_print_tab = exp->language_defn->opcode_print_table (); pc = (*pos)++; opcode = exp->elts[pc].opcode; switch (opcode) @@ -669,7 +669,7 @@ op_string (enum exp_opcode op) int tem; const struct op_print *op_print_tab; - op_print_tab = current_language->la_op_print_tab; + op_print_tab = current_language->opcode_print_table (); for (tem = 0; op_print_tab[tem].opcode != OP_NULL; tem++) if (op_print_tab[tem].opcode == op) return op_print_tab[tem].string; |