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.
This commit is contained in:
parent
0a50df5dab
commit
f6eee2d098
13 changed files with 84 additions and 65 deletions
|
@ -60,8 +60,6 @@ static void unk_lang_printchar (int c, struct type *type,
|
|||
static void unk_lang_value_print (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
static CORE_ADDR unk_lang_trampoline (struct frame_info *, CORE_ADDR pc);
|
||||
|
||||
/* The current (default at startup) state of type and range checking.
|
||||
(If the modes are set to "auto", though, these are changed based
|
||||
on the default language at startup, and then again based on the
|
||||
|
@ -567,13 +565,10 @@ skip_language_trampoline (struct frame_info *frame, CORE_ADDR pc)
|
|||
{
|
||||
for (const auto &lang : language_defn::languages)
|
||||
{
|
||||
if (lang->skip_trampoline != NULL)
|
||||
{
|
||||
CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
|
||||
CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
|
||||
|
||||
if (real_pc)
|
||||
return real_pc;
|
||||
}
|
||||
if (real_pc != 0)
|
||||
return real_pc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -744,11 +739,6 @@ unk_lang_value_print (struct value *val, struct ui_file *stream,
|
|||
"function unk_lang_value_print called."));
|
||||
}
|
||||
|
||||
static CORE_ADDR unk_lang_trampoline (struct frame_info *frame, CORE_ADDR pc)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *unk_lang_class_name (const char *mangled)
|
||||
{
|
||||
return NULL;
|
||||
|
@ -790,7 +780,6 @@ extern const struct language_data unknown_language_data =
|
|||
default_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
unk_lang_value_print_inner, /* la_value_print_inner */
|
||||
unk_lang_value_print, /* Print a top-level value */
|
||||
unk_lang_trampoline, /* Language specific skip_trampoline */
|
||||
"this", /* name_of_this */
|
||||
true, /* store_sym_names_in_linkage_form_p */
|
||||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
|
@ -868,7 +857,6 @@ extern const struct language_data auto_language_data =
|
|||
default_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
unk_lang_value_print_inner, /* la_value_print_inner */
|
||||
unk_lang_value_print, /* Print a top-level value */
|
||||
unk_lang_trampoline, /* Language specific skip_trampoline */
|
||||
"this", /* name_of_this */
|
||||
false, /* store_sym_names_in_linkage_form_p */
|
||||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue