aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2020-06-01 15:21:33 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2020-06-17 09:25:11 +0100
commita1d1fa3e417b4bd8e79e2a731f9c6089e2d5f747 (patch)
tree4b2e204726b469774d366ec68145edba4c485d91 /gdb/language.h
parentf16a9f57b50af64ccb9652d20cc934fc5e80cd20 (diff)
downloadgdb-a1d1fa3e417b4bd8e79e2a731f9c6089e2d5f747.zip
gdb-a1d1fa3e417b4bd8e79e2a731f9c6089e2d5f747.tar.gz
gdb-a1d1fa3e417b4bd8e79e2a731f9c6089e2d5f747.tar.bz2
gdb: Convert language la_value_print field to a method
This commit changes the language_data::la_value_print 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 initializer. (ada_language::value_print): New member function. * c-lang.c (c_language_data): Delete la_value_print initializer. (cplus_language_data): Likewise. (asm_language_data): Likewise. (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_value_print): Delete. (language_defn::value_print): Define new member function. (unknown_language_data): Delete la_value_print initializer. (unknown_language::value_print): New member function. (auto_language_data): Delete la_value_print initializer. (auto_language::value_print): New member function. * language.h (language_data): Delete la_value_print field. (language_defn::value_print): Declare new member function. (LA_VALUE_PRINT): Update call to value_print. * m2-lang.c (m2_language_data): Delete la_value_print initializer. * objc-lang.c (objc_language_data): Likewise. * opencl-lang.c (opencl_language_data): Likewise. * p-lang.c (pascal_language_data): Likewise. (pascal_language::value_print): New member function. * rust-lang.c (rust_language_data): Delete la_value_print initializer.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 1cd3785..4b27c01 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -265,11 +265,6 @@ struct language_data
int recurse,
const struct value_print_options *);
- /* Print a top-level value using syntax appropriate for this language. */
-
- void (*la_value_print) (struct value *, struct ui_file *,
- const struct value_print_options *);
-
/* Now come some hooks for lookup_symbol. */
/* If this is non-NULL, specifies the name that of the implicit
@@ -543,6 +538,10 @@ struct language_defn : language_data
/* List of all known languages. */
static const struct language_defn *languages[nr_languages];
+ /* Print a top-level value using syntax appropriate for this language. */
+ virtual void value_print (struct value *val, struct ui_file *stream,
+ const struct value_print_options *options) const;
+
protected:
/* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
@@ -642,7 +641,7 @@ extern enum language set_language (enum language);
(current_language->la_print_typedef(type,new_symbol,stream))
#define LA_VALUE_PRINT(val,stream,options) \
- (current_language->la_value_print(val,stream,options))
+ (current_language->value_print (val,stream,options))
#define LA_PRINT_CHAR(ch, type, stream) \
(current_language->la_printchar(ch, type, stream))