+2020-03-13 Tom Tromey <tom@tromey.com>
+
+ * valprint.c (do_val_print): Call la_value_print_inner, if
+ available.
+ * rust-lang.c (rust_language_defn): Update.
+ * p-lang.c (pascal_language_defn): Update.
+ * opencl-lang.c (opencl_language_defn): Update.
+ * objc-lang.c (objc_language_defn): Update.
+ * m2-lang.c (m2_language_defn): Update.
+ * language.h (struct language_defn) <la_value_print_inner>: New
+ member.
+ * language.c (unknown_language_defn, auto_language_defn): Update.
+ * go-lang.c (go_language_defn): Update.
+ * f-lang.c (f_language_defn): Update.
+ * d-lang.c (d_language_defn): Update.
+ * c-lang.c (c_language_defn, cplus_language_defn)
+ (asm_language_defn, minimal_language_defn): Update.
+ * ada-lang.c (ada_language_defn): Update.
+
2020-03-13 Tom Tromey <tom@tromey.com>
* c-valprint.c (c_value_print): Use common_val_print.
ada_print_type, /* Print a type using appropriate syntax */
ada_print_typedef, /* Print a typedef using appropriate syntax */
ada_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
ada_value_print, /* Print a top-level value */
ada_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
cplus_skip_trampoline, /* Language specific skip_trampoline */
c_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_typedef, /* Print a typedef using appropriate
syntax. */
d_val_print, /* Print a value using appropriate syntax. */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value. */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline. */
f_print_type, /* Print a type using appropriate syntax */
f_print_typedef, /* Print a typedef using appropriate syntax */
f_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* FIXME */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_typedef, /* Print a typedef using appropriate
syntax. */
go_val_print, /* Print a value using appropriate syntax. */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value. */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline. */
unk_lang_print_type, /* Print a type using appropriate syntax */
default_print_typedef, /* Print a typedef using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
unk_lang_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
unk_lang_trampoline, /* Language specific skip_trampoline */
unk_lang_print_type, /* Print a type using appropriate syntax */
default_print_typedef, /* Print a typedef using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
unk_lang_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
unk_lang_trampoline, /* Language specific skip_trampoline */
struct value *val,
const struct value_print_options *options);
+ /* 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 *);
+
/* Print a top-level value using syntax appropriate for this language. */
void (*la_value_print) (struct value *, struct ui_file *,
m2_print_type, /* Print a type using appropriate syntax */
m2_print_typedef, /* Print a typedef using appropriate syntax */
m2_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
c_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
objc_skip_trampoline, /* Language specific skip_trampoline */
opencl_print_type, /* Print a type using appropriate syntax */
c_print_typedef, /* Print a typedef using appropriate syntax */
c_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
pascal_print_type, /* Print a type using appropriate syntax */
pascal_print_typedef, /* Print a typedef using appropriate syntax */
pascal_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
pascal_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
rust_print_type, /* Print a type using appropriate syntax */
rust_print_typedef, /* Print a typedef using appropriate syntax */
rust_val_print, /* Print a value using appropriate syntax */
+ nullptr, /* la_value_print_inner */
c_value_print, /* Print a top-level value */
default_read_var_value, /* la_read_var_value */
NULL, /* Language specific skip_trampoline */
try
{
- language->la_val_print (type, embedded_offset, address,
- stream, recurse, val,
- &local_opts);
+ if (full_value != nullptr && language->la_value_print_inner != nullptr)
+ language->la_value_print_inner (full_value, stream, recurse,
+ &local_opts);
+ else
+ language->la_val_print (type, embedded_offset, address,
+ stream, recurse, val,
+ &local_opts);
}
catch (const gdb_exception_error &except)
{