From f6eee2d098049afd18f90b8f4bb6a5d1a49d900c Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 14 May 2020 23:19:48 +0100 Subject: gdb: Convert language skip_trampoline field to a method This commit changes the language_data::skip_trampoline 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 skip_trampoline initializer. * c-lang.c (c_language_data): Likewise. (cplus_language_data): Likewise. (cplus_language::skip_trampoline): New member function. (asm_language_data): Delete skip_trampoline 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 (unk_lang_trampoline): Delete function. (skip_language_trampoline): Update. (unknown_language_data): Delete skip_trampoline initializer. (auto_language_data): Likewise. * language.h (language_data): Delete skip_trampoline field. (language_defn::skip_trampoline): New function. * m2-lang.c (m2_language_data): Delete skip_trampoline initializer. * objc-lang.c (objc_skip_trampoline): Delete function, move implementation to objc_language::skip_trampoline. (objc_language_data): Delete skip_trampoline initializer. (objc_language::skip_trampoline): New member function with implementation from objc_skip_trampoline. * opencl-lang.c (opencl_language_data): Delete skip_trampoline initializer. * p-lang.c (pascal_language_data): Likewise. * rust-lang.c (rust_language_data): Likewise. --- gdb/c-lang.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'gdb/c-lang.c') diff --git a/gdb/c-lang.c b/gdb/c-lang.c index de7a1bd..364a672 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -908,7 +908,6 @@ extern const struct language_data c_language_data = c_print_typedef, /* Print a typedef using appropriate syntax */ c_value_print_inner, /* la_value_print_inner */ c_value_print, /* Print a top-level value */ - NULL, /* Language specific skip_trampoline */ NULL, /* name_of_this */ true, /* la_store_sym_names_in_linkage_form_p */ basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ @@ -1017,7 +1016,6 @@ extern const struct language_data cplus_language_data = c_print_typedef, /* Print a typedef using appropriate syntax */ c_value_print_inner, /* la_value_print_inner */ c_value_print, /* Print a top-level value */ - cplus_skip_trampoline, /* Language specific skip_trampoline */ "this", /* name_of_this */ false, /* la_store_sym_names_in_linkage_form_p */ cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ @@ -1157,6 +1155,14 @@ public: { c_print_type (type, varstring, stream, show, level, flags); } + + /* See language.h. */ + + CORE_ADDR skip_trampoline (struct frame_info *fi, + CORE_ADDR pc) const override + { + return cplus_skip_trampoline (fi, pc); + } }; /* The single instance of the C++ language class. */ @@ -1189,7 +1195,6 @@ extern const struct language_data asm_language_data = c_print_typedef, /* Print a typedef using appropriate syntax */ c_value_print_inner, /* la_value_print_inner */ c_value_print, /* Print a top-level value */ - NULL, /* Language specific skip_trampoline */ NULL, /* name_of_this */ true, /* la_store_sym_names_in_linkage_form_p */ basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ @@ -1263,7 +1268,6 @@ extern const struct language_data minimal_language_data = c_print_typedef, /* Print a typedef using appropriate syntax */ c_value_print_inner, /* la_value_print_inner */ c_value_print, /* Print a top-level value */ - NULL, /* Language specific skip_trampoline */ NULL, /* name_of_this */ true, /* la_store_sym_names_in_linkage_form_p */ basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ -- cgit v1.1