2005-02-18 Andrew Cagney <cagney@gnu.org>

Use add_setshow_uinteger_cmd through out.
	* printcmd.c, source.c, utils.c, valprint.c: Update.
This commit is contained in:
Andrew Cagney 2005-02-18 19:49:52 +00:00
parent 85c078043b
commit 35096d9d67
5 changed files with 55 additions and 46 deletions

View file

@ -1,5 +1,8 @@
2005-02-18 Andrew Cagney <cagney@gnu.org> 2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_uinteger_cmd through out.
* printcmd.c, source.c, utils.c, valprint.c: Update.
Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh Use add_setshow_zinteger_cmd through out. Re-sync gdbarch.sh
and gdbarch.c. and gdbarch.c.
* breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update. * breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update.

View file

@ -2128,12 +2128,13 @@ Same as \"print\" command, except that if you are running in the epoch\n\
environment, the value is printed in its own window.")); environment, the value is printed in its own window."));
set_cmd_completer (c, location_completer); set_cmd_completer (c, location_completer);
deprecated_add_show_from_set add_setshow_uinteger_cmd ("max-symbolic-offset", no_class,
(add_set_cmd ("max-symbolic-offset", no_class, var_uinteger, &max_symbolic_offset, _("\
(char *) &max_symbolic_offset, Set the largest offset that will be printed in <symbol+1234> form."), _("\
"Set the largest offset that will be printed in <symbol+1234> form.", Show the largest offset that will be printed in <symbol+1234> form."), NULL,
&setprintlist), NULL,
&showprintlist); NULL, /* FIXME: i18n: */
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("symbol-filename", no_class, add_setshow_boolean_cmd ("symbol-filename", no_class,
&print_symbol_filename, _("\ &print_symbol_filename, _("\
Set printing of source filename and line number with <symbol>."), _("\ Set printing of source filename and line number with <symbol>."), _("\

View file

@ -1633,10 +1633,10 @@ The matching line number is also stored as the value of \"$_\"."));
add_com_alias ("?", "reverse-search", class_files, 0); add_com_alias ("?", "reverse-search", class_files, 0);
} }
deprecated_add_show_from_set add_setshow_uinteger_cmd ("listsize", class_support, &lines_to_list, _("\
(add_set_cmd ("listsize", class_support, var_uinteger, Set number of source lines gdb will list by default."), _("\
(char *) &lines_to_list, Show number of source lines gdb will list by default."), NULL,
"Set number of source lines gdb will list by default.", NULL,
&setlist), NULL, /* FIXME: i18n: */
&showlist); &setlist, &showlist);
} }

View file

@ -2446,16 +2446,19 @@ initialize_utils (void)
{ {
struct cmd_list_element *c; struct cmd_list_element *c;
c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, add_setshow_uinteger_cmd ("width", class_support, &chars_per_line, _("\
"Set number of characters gdb thinks are in a line.", Set number of characters gdb thinks are in a line."), _("\
&setlist); Show number of characters gdb thinks are in a line."), NULL,
deprecated_add_show_from_set (c, &showlist); set_width_command,
set_cmd_sfunc (c, set_width_command); NULL, /* FIXME: i18n: */
&setlist, &showlist);
c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, add_setshow_uinteger_cmd ("height", class_support, &lines_per_page, _("\
"Set number of lines gdb thinks are in a page.", &setlist); Set number of lines gdb thinks are in a page."), _("\
deprecated_add_show_from_set (c, &showlist); Show number of lines gdb thinks are in a page."), NULL,
set_cmd_sfunc (c, set_height_command); set_height_command,
NULL, /* FIXME: i18n: */
&setlist, &showlist);
init_page_info (); init_page_info ();

View file

@ -1205,12 +1205,13 @@ _initialize_valprint (void)
add_alias_cmd ("p", "print", no_class, 1, &showlist); add_alias_cmd ("p", "print", no_class, 1, &showlist);
add_alias_cmd ("pr", "print", no_class, 1, &showlist); add_alias_cmd ("pr", "print", no_class, 1, &showlist);
deprecated_add_show_from_set add_setshow_uinteger_cmd ("elements", no_class, &print_max, _("\
(add_set_cmd ("elements", no_class, var_uinteger, (char *) &print_max, Set limit on string chars or array elements to print."), _("\
"Set limit on string chars or array elements to print.\n\ Show limit on string chars or array elements to print."), _("\
\"set print elements 0\" causes there to be no limit.", \"set print elements 0\" causes there to be no limit."),
&setprintlist), NULL,
&showprintlist); NULL, /* FIXME: i18n: */
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("null-stop", no_class, &stop_print_at_null, _("\ add_setshow_boolean_cmd ("null-stop", no_class, &stop_print_at_null, _("\
Set printing of char arrays to stop at first null char."), _("\ Set printing of char arrays to stop at first null char."), _("\
@ -1219,13 +1220,14 @@ Show printing of char arrays to stop at first null char."), NULL,
NULL, /* FIXME: i18n: */ NULL, /* FIXME: i18n: */
&setprintlist, &showprintlist); &setprintlist, &showprintlist);
deprecated_add_show_from_set add_setshow_uinteger_cmd ("repeats", no_class,
(add_set_cmd ("repeats", no_class, var_uinteger, &repeat_count_threshold, _("\
(char *) &repeat_count_threshold, Set threshold for repeated print elements."), _("\
"Set threshold for repeated print elements.\n\ Show threshold for repeated print elements."), _("\
\"set print repeats 0\" causes all elements to be individually printed.", \"set print repeats 0\" causes all elements to be individually printed."),
&setprintlist), NULL,
&showprintlist); NULL, /* FIXME: i18n: */
&setprintlist, &showprintlist);
add_setshow_boolean_cmd ("pretty", class_support, &prettyprint_structs, _("\ add_setshow_boolean_cmd ("pretty", class_support, &prettyprint_structs, _("\
Set prettyprinting of structures."), _("\ Set prettyprinting of structures."), _("\
@ -1255,19 +1257,19 @@ Show printing of addresses."), NULL,
NULL, /* FIXME: i18n: */ NULL, /* FIXME: i18n: */
&setprintlist, &showprintlist); &setprintlist, &showprintlist);
c = add_set_cmd ("input-radix", class_support, var_uinteger, add_setshow_uinteger_cmd ("input-radix", class_support, &input_radix, _("\
(char *) &input_radix, Set default input radix for entering numbers."), _("\
"Set default input radix for entering numbers.", Show default input radix for entering numbers."), NULL,
&setlist); set_input_radix,
deprecated_add_show_from_set (c, &showlist); NULL, /* FIXME: i18n: */
set_cmd_sfunc (c, set_input_radix); &setlist, &showlist);
c = add_set_cmd ("output-radix", class_support, var_uinteger, add_setshow_uinteger_cmd ("output-radix", class_support, &output_radix, _("\
(char *) &output_radix, Set default output radix for printing of values."), _("\
"Set default output radix for printing of values.", Show default output radix for printing of values."), NULL,
&setlist); set_output_radix,
deprecated_add_show_from_set (c, &showlist); NULL, /* FIXME: i18n: */
set_cmd_sfunc (c, set_output_radix); &setlist, &showlist);
/* The "set radix" and "show radix" commands are special in that /* The "set radix" and "show radix" commands are special in that
they are like normal set and show commands but allow two normally they are like normal set and show commands but allow two normally