mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 05:12:33 +08:00
gdb: Convert language_data::la_varobj_ops to a method
Convert language_data::la_varobj_ops member variable to a virtual method language_defn::varobj_ops. There should be no user visible changes after this commit. gdb/ChangeLog: * ada-lang.c (ada_language_data): Remove la_varobj_ops initializer. (ada_language::varobj_ops): New member function. * c-lang.c (c_language_data): Remove la_varobj_ops initializer. (cplus_language_data): Likewise. (cplus_language::varobj_ops): New member function. (asm_language_data): Remove la_varobj_ops initializer. (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 (language_defn::varobj_ops): New function. (unknown_language_data): Remove la_varobj_ops initializer. (auto_language_data): Likewise. * language.h (language_data): Remove la_varobj_ops field. (language_defn::varobj_ops): Declare new member function. * m2-lang.c (m2_language_data): Remove la_varobj_ops 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. * varobj.c (varobj_create): Update call to varobj_ops. * varobj.h (default_varobj_ops): Delete define.
This commit is contained in:
@ -764,6 +764,16 @@ language_defn::get_symbol_name_matcher_inner
|
||||
return default_symbol_name_matcher;
|
||||
}
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
const struct lang_varobj_ops *
|
||||
language_defn::varobj_ops () const
|
||||
{
|
||||
/* The ops for the C language are suitable for the vast majority of the
|
||||
supported languages. */
|
||||
return &c_varobj_ops;
|
||||
}
|
||||
|
||||
/* Return true if TYPE is a string type, otherwise return false. This
|
||||
default implementation only detects TYPE_CODE_STRING. */
|
||||
|
||||
@ -800,7 +810,6 @@ extern const struct language_data unknown_language_data =
|
||||
{
|
||||
&exp_descriptor_standard,
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
&default_varobj_ops,
|
||||
};
|
||||
|
||||
/* Class representing the unknown language. */
|
||||
@ -933,7 +942,6 @@ extern const struct language_data auto_language_data =
|
||||
{
|
||||
&exp_descriptor_standard,
|
||||
unk_op_print_tab, /* expression operators for printing */
|
||||
&default_varobj_ops,
|
||||
};
|
||||
|
||||
/* Class representing the fake "auto" language. */
|
||||
|
Reference in New Issue
Block a user