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
|
@ -267,12 +267,6 @@ struct language_data
|
|||
void (*la_value_print) (struct value *, struct ui_file *,
|
||||
const struct value_print_options *);
|
||||
|
||||
/* PC is possibly an unknown languages trampoline.
|
||||
If that PC falls in a trampoline belonging to this language,
|
||||
return the address of the first pc in the real function, or 0
|
||||
if it isn't a language tramp for this language. */
|
||||
CORE_ADDR (*skip_trampoline) (struct frame_info *, CORE_ADDR);
|
||||
|
||||
/* Now come some hooks for lookup_symbol. */
|
||||
|
||||
/* If this is non-NULL, specifies the name that of the implicit
|
||||
|
@ -520,6 +514,15 @@ struct language_defn : language_data
|
|||
virtual void print_type (struct type *, const char *, struct ui_file *, int,
|
||||
int, const struct type_print_options *) const = 0;
|
||||
|
||||
/* PC is possibly an unknown languages trampoline.
|
||||
If that PC falls in a trampoline belonging to this language, return
|
||||
the address of the first pc in the real function, or 0 if it isn't a
|
||||
language tramp for this language. */
|
||||
virtual CORE_ADDR skip_trampoline (struct frame_info *fi, CORE_ADDR pc) const
|
||||
{
|
||||
return (CORE_ADDR) 0;
|
||||
}
|
||||
|
||||
/* List of all known languages. */
|
||||
static const struct language_defn *languages[nr_languages];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue