+
+/* A couple typedefs to make writing the options a bit more
+ convenient. */
+using boolean_option_def
+ = gdb::option::boolean_option_def<value_print_options>;
+using uinteger_option_def
+ = gdb::option::uinteger_option_def<value_print_options>;
+using zuinteger_unlimited_option_def
+ = gdb::option::zuinteger_unlimited_option_def<value_print_options>;
+
+/* Definitions of options for the "print" and "compile print"
+ commands. */
+static const gdb::option::option_def value_print_option_defs[] = {
+
+ boolean_option_def {
+ "address",
+ [] (value_print_options *opt) { return &opt->addressprint; },
+ show_addressprint, /* show_cmd_cb */
+ N_("Set printing of addresses."),
+ N_("Show printing of addresses."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "array",
+ [] (value_print_options *opt) { return &opt->prettyformat_arrays; },
+ show_prettyformat_arrays, /* show_cmd_cb */
+ N_("Set pretty formatting of arrays."),
+ N_("Show pretty formatting of arrays."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "array-indexes",
+ [] (value_print_options *opt) { return &opt->print_array_indexes; },
+ show_print_array_indexes, /* show_cmd_cb */
+ N_("Set printing of array indexes."),
+ N_("Show printing of array indexes."),
+ NULL, /* help_doc */
+ },
+
+ uinteger_option_def {
+ "elements",
+ [] (value_print_options *opt) { return &opt->print_max; },
+ show_print_max, /* show_cmd_cb */
+ N_("Set limit on string chars or array elements to print."),
+ N_("Show limit on string chars or array elements to print."),
+ N_("\"unlimited\" causes there to be no limit."),
+ },
+
+ zuinteger_unlimited_option_def {
+ "max-depth",
+ [] (value_print_options *opt) { return &opt->max_depth; },
+ show_print_max_depth, /* show_cmd_cb */
+ N_("Set maximum print depth for nested structures, unions and arrays."),
+ N_("Show maximum print depth for nested structures, unions, and arrays."),
+ N_("When structures, unions, or arrays are nested beyond this depth then they\n\
+will be replaced with either '{...}' or '(...)' depending on the language.\n\
+Use \"unlimited\" to print the complete structure.")
+ },
+
+ boolean_option_def {
+ "null-stop",
+ [] (value_print_options *opt) { return &opt->stop_print_at_null; },
+ show_stop_print_at_null, /* show_cmd_cb */
+ N_("Set printing of char arrays to stop at first null char."),
+ N_("Show printing of char arrays to stop at first null char."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "object",
+ [] (value_print_options *opt) { return &opt->objectprint; },
+ show_objectprint, /* show_cmd_cb */
+ _("Set printing of C++ virtual function tables."),
+ _("Show printing of C++ virtual function tables."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "pretty",
+ [] (value_print_options *opt) { return &opt->prettyformat_structs; },
+ show_prettyformat_structs, /* show_cmd_cb */
+ N_("Set pretty formatting of structures."),
+ N_("Show pretty formatting of structures."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "raw-values",
+ [] (value_print_options *opt) { return &opt->raw; },
+ NULL, /* show_cmd_cb */
+ N_("Set whether to print values in raw form."),
+ N_("Show whether to print values in raw form."),
+ N_("If set, values are printed in raw form, bypassing any\n\
+pretty-printers for that value.")
+ },
+
+ uinteger_option_def {
+ "repeats",
+ [] (value_print_options *opt) { return &opt->repeat_count_threshold; },
+ show_repeat_count_threshold, /* show_cmd_cb */
+ N_("Set threshold for repeated print elements."),
+ N_("Show threshold for repeated print elements."),
+ N_("\"unlimited\" causes all elements to be individually printed."),
+ },
+
+ boolean_option_def {
+ "static-members",
+ [] (value_print_options *opt) { return &opt->static_field_print; },
+ show_static_field_print, /* show_cmd_cb */
+ N_("Set printing of C++ static members."),
+ N_("Show printing of C++ static members."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "symbol",
+ [] (value_print_options *opt) { return &opt->symbol_print; },
+ show_symbol_print, /* show_cmd_cb */
+ N_("Set printing of symbol names when printing pointers."),
+ N_("Show printing of symbol names when printing pointers."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "union",
+ [] (value_print_options *opt) { return &opt->unionprint; },
+ show_unionprint, /* show_cmd_cb */
+ N_("Set printing of unions interior to structures."),
+ N_("Show printing of unions interior to structures."),
+ NULL, /* help_doc */
+ },
+
+ boolean_option_def {
+ "vtbl",
+ [] (value_print_options *opt) { return &opt->vtblprint; },
+ show_vtblprint, /* show_cmd_cb */
+ N_("Set printing of C++ virtual function tables."),
+ N_("Show printing of C++ virtual function tables."),
+ NULL, /* help_doc */
+ },
+};
+
+/* See valprint.h. */
+
+gdb::option::option_def_group
+make_value_print_options_def_group (value_print_options *opts)
+{
+ return {{value_print_option_defs}, opts};
+}
+