aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-lang.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-06-01 10:53:05 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-06-17 09:25:09 +0100
commiteff93b4d48eb0e79b7879475bb47eec55dbb41be (patch)
tree4f6d1c1c724b5faf2a1d2966e8401b271e2f12fc /gdb/c-lang.c
parentde54374205650be71237ce51ef7981d30ddd78dc (diff)
downloadgdb-eff93b4d48eb0e79b7879475bb47eec55dbb41be.zip
gdb-eff93b4d48eb0e79b7879475bb47eec55dbb41be.tar.gz
gdb-eff93b4d48eb0e79b7879475bb47eec55dbb41be.tar.bz2
gdb: Convert language la_class_name_from_physname field to a method
This commit changes the language_data::la_class_name_from_physname 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_class_name_from_physname initializer. * c-lang.c (c_language_data): Likewise. (cplus_language_data): Likewise. (cplus_language::class_name_from_physname): New member function. (asm_language_data): Delete la_class_name_from_physname initializer. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. * dwarf2/read.c (guess_partial_die_structure_name): Update to call method on language_defn class. (guess_full_die_structure_name): Likewise. * f-lang.c (f_language_data): Delete la_class_name_from_physname initializer. * go-lang.c (go_language_data): Likewise. * language.c (language_class_name_from_physname): Delete. (unk_lang_class_name): Delete. (unknown_language_data): Delete la_class_name_from_physname initializer. (auto_language_data): Likewise. * language.h (language_data): Delete la_class_name_from_physname field. (language_defn::class_name_from_physname): New function. (language_class_name_from_physname): Delete declaration. * m2-lang.c (m2_language_data): Delete la_class_name_from_physname 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.
Diffstat (limited to 'gdb/c-lang.c')
-rw-r--r--gdb/c-lang.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
index 53137e8..bb49706 100644
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -911,8 +911,6 @@ extern const struct language_data c_language_data =
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
- NULL, /* Language specific
- class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
@@ -1019,8 +1017,6 @@ extern const struct language_data cplus_language_data =
"this", /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
- cp_class_name_from_physname, /* Language specific
- class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
@@ -1163,6 +1159,13 @@ public:
{
return cplus_skip_trampoline (fi, pc);
}
+
+ /* See language.h. */
+
+ char *class_name_from_physname (const char *physname) const override
+ {
+ return cp_class_name_from_physname (physname);
+ }
};
/* The single instance of the C++ language class. */
@@ -1198,8 +1201,6 @@ extern const struct language_data asm_language_data =
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
- NULL, /* Language specific
- class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */
@@ -1271,8 +1272,6 @@ extern const struct language_data minimal_language_data =
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
- NULL, /* Language specific
- class_name_from_physname */
c_op_print_tab, /* expression operators for printing */
1, /* c-style arrays */
0, /* String lower bound */