+2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
+
+ * 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.
+
2020-06-17 Andrew Burgess <andrew.burgess@embecosm.com>
* ada-lang.c (ada_language_data): Delete la_value_print
ada_printstr, /* Function to print string constant */
emit_char, /* Function to print single char (not used) */
ada_print_typedef, /* Print a typedef using appropriate syntax */
- ada_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
ada_lookup_symbol_nonlocal, /* Looking up non-local symbols. */
return ada_value_print (val, stream, options);
}
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return ada_value_print_inner (val, stream, recurse, options);
+ }
+
protected:
/* See language.h. */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
"this", /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
true, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
c_emit_char, /* Print a single char. */
c_print_typedef, /* Print a typedef using appropriate
syntax. */
- d_value_print_inner, /* la_value_print_inner */
"this",
false, /* la_store_sym_names_in_linkage_form_p */
d_lookup_symbol_nonlocal,
{
c_print_type (type, varstring, stream, show, level, flags);
}
+
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return d_value_print_inner (val, stream, recurse, options);
+ }
};
/* Single instance of the D language class. */
f_printstr, /* function to print string constant */
f_emit_char, /* Function to print a single character */
f_print_typedef, /* Print a typedef using appropriate syntax */
- f_value_print_innner, /* la_value_print_inner */
NULL, /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
cp_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
code);
}
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return f_value_print_inner (val, stream, recurse, options);
+ }
+
+
protected:
/* See language.h. */
/* Implement la_value_print_inner for Fortran. */
-extern void f_value_print_innner (struct value *val, struct ui_file *stream,
+extern void f_value_print_inner (struct value *val, struct ui_file *stream,
int recurse,
const struct value_print_options *options);
/* See f-lang.h. */
void
-f_value_print_innner (struct value *val, struct ui_file *stream, int recurse,
+f_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
const struct value_print_options *options)
{
struct type *type = check_typedef (value_type (val));
c_emit_char, /* Print a single char. */
c_print_typedef, /* Print a typedef using appropriate
syntax. */
- go_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal,
{
go_print_type (type, varstring, stream, show, level, flags);
}
+
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return go_value_print_inner (val, stream, recurse, options);
+ }
};
/* Single instance of the Go language class. */
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. */
"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}
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 */
{
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. */
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 */
{
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. */
void (*la_print_typedef) (struct type *type, struct symbol *new_symbol,
struct ui_file *stream);
- /* Print a value using syntax appropriate for this language.
- RECURSE is the recursion depth. It is zero-based. */
-
- void (*la_value_print_inner) (struct value *, struct ui_file *,
- int recurse,
- const struct value_print_options *);
-
/* Now come some hooks for lookup_symbol. */
/* If this is non-NULL, specifies the name that of the implicit
virtual void value_print (struct value *val, struct ui_file *stream,
const struct value_print_options *options) const;
+ /* Print a value using syntax appropriate for this language. RECURSE is
+ the recursion depth. It is zero-based. */
+ virtual void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const;
+
protected:
/* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method.
m2_printstr, /* function to print string constant */
m2_emit_char, /* Function to print a single character */
m2_print_typedef, /* Print a typedef using appropriate syntax */
- m2_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
{
m2_print_type (type, varstring, stream, show, level, flags);
}
+
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return m2_value_print_inner (val, stream, recurse, options);
+ }
};
/* Single instance of the M2 language. */
c_printstr, /* Function to print string constant */
c_emit_char,
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
"self", /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
c_printstr, /* Function to print string constant */
c_emit_char, /* Print a single char */
c_print_typedef, /* Print a typedef using appropriate syntax */
- c_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
pascal_printstr, /* Function to print string constant */
pascal_emit_char, /* Print a single char */
pascal_print_typedef, /* Print a typedef using appropriate syntax */
- pascal_value_print_inner, /* la_value_print_inner */
"this", /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
{
return pascal_value_print (val, stream, options);
}
+
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return pascal_value_print_inner (val, stream, recurse, options);
+ }
};
/* Single instance of the Pascal language class. */
rust_printstr, /* Function to print string constant */
rust_emitchar, /* Print a single char */
rust_print_typedef, /* Print a typedef using appropriate syntax */
- rust_value_print_inner, /* la_value_print_inner */
NULL, /* name_of_this */
false, /* la_store_sym_names_in_linkage_form_p */
rust_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */
(xstrprintf ("*(%s as *mut %s)", core_addr_to_string (addr),
name.c_str ()));
}
+
+ /* See language.h. */
+
+ void value_print_inner
+ (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options) const override
+ {
+ return rust_value_print_inner (val, stream, recurse, options);
+ }
};
/* Single instance of the Rust language class. */
try
{
- language->la_value_print_inner (value, stream, recurse, &local_opts);
+ language->value_print_inner (value, stream, recurse, &local_opts);
}
catch (const gdb_exception_error &except)
{