diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-02-18 19:49:52 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-02-18 19:49:52 +0000 |
commit | 35096d9d67ac1c2bc69fff09e23849df4c238233 (patch) | |
tree | 7634eb7fb0cab00b5ad606844be23ba2d91150bb /gdb | |
parent | 85c078043bd43ef5cb76191a6d3e2159da0c302e (diff) | |
download | gdb-35096d9d67ac1c2bc69fff09e23849df4c238233.zip gdb-35096d9d67ac1c2bc69fff09e23849df4c238233.tar.gz gdb-35096d9d67ac1c2bc69fff09e23849df4c238233.tar.bz2 |
2005-02-18 Andrew Cagney <cagney@gnu.org>
Use add_setshow_uinteger_cmd through out.
* printcmd.c, source.c, utils.c, valprint.c: Update.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 3 | ||||
-rw-r--r-- | gdb/printcmd.c | 13 | ||||
-rw-r--r-- | gdb/source.c | 12 | ||||
-rw-r--r-- | gdb/utils.c | 23 | ||||
-rw-r--r-- | gdb/valprint.c | 54 |
5 files changed, 57 insertions, 48 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12063e8..c39be4e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 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 and gdbarch.c. * breakpoint.c, frame.c, gdb-events.sh, gdbarch.sh: Update. diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 63281ea..f490d4b 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -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.")); set_cmd_completer (c, location_completer); - deprecated_add_show_from_set - (add_set_cmd ("max-symbolic-offset", no_class, var_uinteger, - (char *) &max_symbolic_offset, - "Set the largest offset that will be printed in <symbol+1234> form.", - &setprintlist), - &showprintlist); + add_setshow_uinteger_cmd ("max-symbolic-offset", no_class, + &max_symbolic_offset, _("\ +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, + NULL, + NULL, /* FIXME: i18n: */ + &setprintlist, &showprintlist); add_setshow_boolean_cmd ("symbol-filename", no_class, &print_symbol_filename, _("\ Set printing of source filename and line number with <symbol>."), _("\ diff --git a/gdb/source.c b/gdb/source.c index 1f1a724..4bceaef 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1633,10 +1633,10 @@ The matching line number is also stored as the value of \"$_\".")); add_com_alias ("?", "reverse-search", class_files, 0); } - deprecated_add_show_from_set - (add_set_cmd ("listsize", class_support, var_uinteger, - (char *) &lines_to_list, - "Set number of source lines gdb will list by default.", - &setlist), - &showlist); + add_setshow_uinteger_cmd ("listsize", class_support, &lines_to_list, _("\ +Set number of source lines gdb will list by default."), _("\ +Show number of source lines gdb will list by default."), NULL, + NULL, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); } diff --git a/gdb/utils.c b/gdb/utils.c index 98c734b..9c27b49 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -2446,16 +2446,19 @@ initialize_utils (void) { struct cmd_list_element *c; - c = add_set_cmd ("width", class_support, var_uinteger, &chars_per_line, - "Set number of characters gdb thinks are in a line.", - &setlist); - deprecated_add_show_from_set (c, &showlist); - set_cmd_sfunc (c, set_width_command); - - c = add_set_cmd ("height", class_support, var_uinteger, &lines_per_page, - "Set number of lines gdb thinks are in a page.", &setlist); - deprecated_add_show_from_set (c, &showlist); - set_cmd_sfunc (c, set_height_command); + add_setshow_uinteger_cmd ("width", class_support, &chars_per_line, _("\ +Set number of characters gdb thinks are in a line."), _("\ +Show number of characters gdb thinks are in a line."), NULL, + set_width_command, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); + + add_setshow_uinteger_cmd ("height", class_support, &lines_per_page, _("\ +Set number of lines gdb thinks are in a page."), _("\ +Show number of lines gdb thinks are in a page."), NULL, + set_height_command, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); init_page_info (); diff --git a/gdb/valprint.c b/gdb/valprint.c index bc5d925..7c6806f 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1205,12 +1205,13 @@ _initialize_valprint (void) add_alias_cmd ("p", "print", no_class, 1, &showlist); add_alias_cmd ("pr", "print", no_class, 1, &showlist); - deprecated_add_show_from_set - (add_set_cmd ("elements", no_class, var_uinteger, (char *) &print_max, - "Set limit on string chars or array elements to print.\n\ -\"set print elements 0\" causes there to be no limit.", - &setprintlist), - &showprintlist); + add_setshow_uinteger_cmd ("elements", no_class, &print_max, _("\ +Set limit on string chars or array elements to print."), _("\ +Show limit on string chars or array elements to print."), _("\ +\"set print elements 0\" causes there to be no limit."), + NULL, + NULL, /* FIXME: i18n: */ + &setprintlist, &showprintlist); add_setshow_boolean_cmd ("null-stop", no_class, &stop_print_at_null, _("\ 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: */ &setprintlist, &showprintlist); - deprecated_add_show_from_set - (add_set_cmd ("repeats", no_class, var_uinteger, - (char *) &repeat_count_threshold, - "Set threshold for repeated print elements.\n\ -\"set print repeats 0\" causes all elements to be individually printed.", - &setprintlist), - &showprintlist); + add_setshow_uinteger_cmd ("repeats", no_class, + &repeat_count_threshold, _("\ +Set threshold for repeated print elements."), _("\ +Show threshold for repeated print elements."), _("\ +\"set print repeats 0\" causes all elements to be individually printed."), + NULL, + NULL, /* FIXME: i18n: */ + &setprintlist, &showprintlist); add_setshow_boolean_cmd ("pretty", class_support, &prettyprint_structs, _("\ Set prettyprinting of structures."), _("\ @@ -1255,19 +1257,19 @@ Show printing of addresses."), NULL, NULL, /* FIXME: i18n: */ &setprintlist, &showprintlist); - c = add_set_cmd ("input-radix", class_support, var_uinteger, - (char *) &input_radix, - "Set default input radix for entering numbers.", - &setlist); - deprecated_add_show_from_set (c, &showlist); - set_cmd_sfunc (c, set_input_radix); - - c = add_set_cmd ("output-radix", class_support, var_uinteger, - (char *) &output_radix, - "Set default output radix for printing of values.", - &setlist); - deprecated_add_show_from_set (c, &showlist); - set_cmd_sfunc (c, set_output_radix); + add_setshow_uinteger_cmd ("input-radix", class_support, &input_radix, _("\ +Set default input radix for entering numbers."), _("\ +Show default input radix for entering numbers."), NULL, + set_input_radix, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); + + add_setshow_uinteger_cmd ("output-radix", class_support, &output_radix, _("\ +Set default output radix for printing of values."), _("\ +Show default output radix for printing of values."), NULL, + set_output_radix, + NULL, /* FIXME: i18n: */ + &setlist, &showlist); /* The "set radix" and "show radix" commands are special in that they are like normal set and show commands but allow two normally |