+2020-03-13 Tom Tromey <tom@tromey.com>
+
+ * valprint.h (common_val_print_checked): Declare.
+ * valprint.c (common_val_print_checked): New function.
+ * stack.c (print_frame_arg): Use common_val_print_checked.
+
2020-03-13 Tom Tromey <tom@tromey.com>
* valprint.c (do_val_print): New function, from val_print.
vp_opts.summary
= fp_opts.print_frame_arguments == print_frame_arguments_scalars;
- common_val_print (arg->val, &stb, 2, &vp_opts, language);
+ common_val_print_checked (arg->val, &stb, 2, &vp_opts, language);
}
catch (const gdb_exception_error &except)
{
val, options, language);
}
+/* See valprint.h. */
+
+void
+common_val_print_checked (struct value *val, struct ui_file *stream,
+ int recurse,
+ const struct value_print_options *options,
+ const struct language_defn *language)
+{
+ if (!value_check_printable (val, stream, options))
+ return;
+ common_val_print (val, stream, recurse, options, language);
+}
+
/* Print on stream STREAM the value VAL according to OPTIONS. The value
is printed using the current_language syntax. */
const struct value_print_options *opts,
const struct language_defn *language);
+/* Like common_val_print, but call value_check_printable first. */
+
+extern void common_val_print_checked
+ (struct value *val,
+ struct ui_file *stream, int recurse,
+ const struct value_print_options *options,
+ const struct language_defn *language);
+
#endif