+2020-03-13 Tom Tromey <tom@tromey.com>
+
+ * opencl-lang.c (opencl_language_defn): Use c_value_print_inner.
+ * objc-lang.c (objc_language_defn): Use c_value_print_inner.
+ * c-valprint.c (c_value_print_inner): New function.
+ * c-lang.h (c_value_print_inner): Declare.
+ * c-lang.c (c_language_defn, cplus_language_defn)
+ (asm_language_defn, minimal_language_defn): Use
+ c_value_print_inner.
+
2020-03-13 Tom Tromey <tom@tromey.com>
* p-valprint.c (pascal_object_print_value_fields): Now static.
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_inner, /* 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_inner, /* 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_inner, /* 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_inner, /* 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 */
struct value *,
const struct value_print_options *);
+/* Implement la_value_print_inner for the C family of languages. */
+
+extern void c_value_print_inner (struct value *, struct ui_file *, int,
+ const struct value_print_options *);
+
extern void c_value_print (struct value *, struct ui_file *,
const struct value_print_options *);
break;
}
}
+
+/* See c-lang.h. */
+
+void
+c_value_print_inner (struct value *val, struct ui_file *stream, int recurse,
+ const struct value_print_options *options)
+{
+ c_val_print (value_type (val), value_embedded_offset (val),
+ value_address (val), stream, recurse, val, options);
+}
+
\f
void
c_value_print (struct value *val, struct ui_file *stream,
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_inner, /* 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_inner, /* 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 */