gdb: Convert language la_value_print_inner field to a method
This commit changes the language_data::la_value_print_inner 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_value_print_inner initializer. (ada_language::value_print_inner): New member function. * c-lang.c (c_language_data): Delete la_value_print_inner initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (minimal_language_data): Likewise. * d-lang.c (d_language_data): Likewise. (d_language::value_print_inner): New member function. * f-lang.c (f_language_data): Delete la_value_print_inner initializer. (f_language::value_print_inner): New member function. * f-lang.h (f_value_print_innner): Rename to... (f_value_print_inner): ...this (note spelling of 'inner'). * f-valprint.c (f_value_print_innner): Rename to... (f_value_print_inner): ...this (note spelling of 'inner'). * go-lang.c (go_language_data): Delete la_value_print_inner initializer. (go_language::value_print_inner): New member function. * language.c (language_defn::value_print_inner): Define new member function. (unk_lang_value_print_inner): Delete. (unknown_language_data): Delete la_value_print_inner initializer. (unknown_language::value_print_inner): New member function. (auto_language_data): Delete la_value_print_inner initializer. (auto_language::value_print_inner): New member function. * language.h (language_data): Delete la_value_print_inner field. (language_defn::value_print_inner): Delcare new member function. * m2-lang.c (m2_language_data): Delete la_value_print_inner initializer. (m2_language::value_print_inner): New member function. * objc-lang.c (objc_language_data): Delete la_value_print_inner initializer. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. (pascal_language::value_print_inner): New member function. * rust-lang.c (rust_language_data): Delete la_value_print_inner initializer. (rust_language::value_print_inner): New member function. * valprint.c (do_val_print): Update call to value_print_inner.
This commit is contained in:
parent
a1d1fa3e41
commit
ebe2334ee6
16 changed files with 145 additions and 34 deletions
|
@ -641,6 +641,16 @@ language_defn::value_print (struct value *val, struct ui_file *stream,
|
|||
return c_value_print (val, stream, options);
|
||||
}
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
void
|
||||
language_defn::value_print_inner
|
||||
(struct value *val, struct ui_file *stream, int recurse,
|
||||
const struct value_print_options *options) const
|
||||
{
|
||||
return c_value_print_inner (val, stream, recurse, options);
|
||||
}
|
||||
|
||||
/* The default implementation of the get_symbol_name_matcher_inner method
|
||||
from the language_defn class. Matches with strncmp_iw. */
|
||||
|
||||
|
@ -739,15 +749,6 @@ unk_lang_printstr (struct ui_file *stream, struct type *type,
|
|||
"function unk_lang_printstr called."));
|
||||
}
|
||||
|
||||
static void
|
||||
unk_lang_value_print_inner (struct value *val,
|
||||
struct ui_file *stream, int recurse,
|
||||
const struct value_print_options *options)
|
||||
{
|
||||
error (_("internal error - unimplemented "
|
||||
"function unk_lang_value_print_inner called."));
|
||||
}
|
||||
|
||||
static const struct op_print unk_op_print_tab[] =
|
||||
{
|
||||
{NULL, OP_NULL, PREC_NULL, 0}
|
||||
|
@ -782,7 +783,6 @@ extern const struct language_data unknown_language_data =
|
|||
unk_lang_printstr,
|
||||
unk_lang_emit_char,
|
||||
default_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
unk_lang_value_print_inner, /* la_value_print_inner */
|
||||
"this", /* name_of_this */
|
||||
true, /* store_sym_names_in_linkage_form_p */
|
||||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
|
@ -834,6 +834,15 @@ public:
|
|||
{
|
||||
error (_("unimplemented unknown_language::value_print called"));
|
||||
}
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
void value_print_inner
|
||||
(struct value *val, struct ui_file *stream, int recurse,
|
||||
const struct value_print_options *options) const override
|
||||
{
|
||||
error (_("unimplemented unknown_language::value_print_inner called"));
|
||||
}
|
||||
};
|
||||
|
||||
/* Single instance of the unknown language class. */
|
||||
|
@ -859,7 +868,6 @@ extern const struct language_data auto_language_data =
|
|||
unk_lang_printstr,
|
||||
unk_lang_emit_char,
|
||||
default_print_typedef, /* Print a typedef using appropriate syntax */
|
||||
unk_lang_value_print_inner, /* la_value_print_inner */
|
||||
"this", /* name_of_this */
|
||||
false, /* store_sym_names_in_linkage_form_p */
|
||||
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
|
||||
|
@ -911,6 +919,15 @@ public:
|
|||
{
|
||||
error (_("unimplemented auto_language::value_print called"));
|
||||
}
|
||||
|
||||
/* See language.h. */
|
||||
|
||||
void value_print_inner
|
||||
(struct value *val, struct ui_file *stream, int recurse,
|
||||
const struct value_print_options *options) const override
|
||||
{
|
||||
error (_("unimplemented auto_language::value_print_inner called"));
|
||||
}
|
||||
};
|
||||
|
||||
/* Single instance of the fake "auto" language. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue