gdb: Convert language_data::la_exp_desc to a method
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 4 Aug 2020 15:31:56 +0000 (16:31 +0100)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 16 Sep 2020 10:04:04 +0000 (11:04 +0100)
commit5aba6ebefb9488163c82e198b73ecf0a05a5d1fd
tree06bbdb7350491a54168495262b53e032a12b0691
parentb63a3f3fc4e998b4efd5fd49aa0eb044e9cee261
gdb: Convert language_data::la_exp_desc to a method

Convert language_data::la_exp_desc member variable to a virtual
method language_defn::expression_ops.  The change of names brings this
method more into line with the existing varobj_ops method, that also
returns a table of function pointers.

There should be no user visible changes after this commit.

gdb/ChangeLog:

* ada-lang.c (ada_language_data): Remove la_exp_desc initializer.
(ada_language::expression_ops): New member function.
* c-lang.c (c_language_data): Remove la_exp_desc initializer.
(c_language::expression_ops): New member function.
(cplus_language_data): Remove la_exp_desc initializer.
(cplus_language::expression_ops): New member function.
(asm_language_data): Remove la_exp_desc initializer.
(asm_language::expression_ops): New member function.
(minimal_language_data): Remove la_exp_desc initializer.
(minimal_language::expression_ops): New member function.
* d-lang.c (d_language_data): Remove la_exp_desc initializer.
(d_language::expression_ops): New member function.
* eval.c (evaluate_subexp): Update call to expression_ops.
* expprint.c (print_subexp): Likewise.
(op_name): Likewise.
(dump_subexp_body): Likewise.
* f-lang.c (f_language_data): Remove la_exp_desc initializer.
(f_language::expression_ops): New member function.
* go-lang.c (go_language_data): Remove la_exp_desc initializer.
(go_language::expression_ops): New member function.
* language.c (language_defn::expression_ops): New function.
(unknown_language_data): Remove la_exp_desc initializer.
(auto_language_data): Likewise.
* language.h (language_data): Remove la_exp_desc field.
(language_defn::expression_ops): Declare new member function.
* m2-lang.c (m2_language_data): Remove la_exp_desc initializer.
(m2_language::expression_ops): New member function.
* objc-lang.c (objc_language_data): Remove la_exp_desc
initializer.
* opencl-lang.c (opencl_language_data): Remove la_exp_desc
initializer.
(opencl_language::expression_ops): New member function.
* p-lang.c (pascal_language_data): Remove la_exp_desc initializer.
* parse.c (operator_length): Update call to expression_ops.
(exp_iterate): Likewise.
* rust-lang.c (rust_language_data): Remove la_exp_desc
initializer.
(ruse_language::expression_ops): New member function.
16 files changed:
gdb/ChangeLog
gdb/ada-lang.c
gdb/c-lang.c
gdb/d-lang.c
gdb/eval.c
gdb/expprint.c
gdb/f-lang.c
gdb/go-lang.c
gdb/language.c
gdb/language.h
gdb/m2-lang.c
gdb/objc-lang.c
gdb/opencl-lang.c
gdb/p-lang.c
gdb/parse.c
gdb/rust-lang.c