aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-decode.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-02-18 20:57:16 +0000
committerAndrew Cagney <cagney@redhat.com>2005-02-18 20:57:16 +0000
commitc0d88b1be7e38d98b52218f9c673eecb5fcd5851 (patch)
treef2342442ca6de71bcd41a5e28fddfb94f4270f40 /gdb/cli/cli-decode.c
parent35096d9d67ac1c2bc69fff09e23849df4c238233 (diff)
downloadgdb-c0d88b1be7e38d98b52218f9c673eecb5fcd5851.zip
gdb-c0d88b1be7e38d98b52218f9c673eecb5fcd5851.tar.gz
gdb-c0d88b1be7e38d98b52218f9c673eecb5fcd5851.tar.bz2
2005-02-18 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_integer_cmd): New function. * command.h (add_setshow_integer_cmd): Declare. * cli/cli-cmds.c: Update.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r--gdb/cli/cli-decode.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index f9e2925..ec2f734 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -540,6 +540,27 @@ add_setshow_string_noescape_cmd (char *name, enum command_class class,
add_cmd. VAR is address of the variable which will contain the
value. SET_DOC and SHOW_DOC are the documentation strings. */
void
+add_setshow_integer_cmd (char *name, enum command_class class,
+ unsigned int *var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc,
+ cmd_sfunc_ftype *set_func,
+ show_value_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ add_setshow_cmd_full (name, class, var_integer, var,
+ set_doc, show_doc, help_doc,
+ set_func, show_func,
+ set_list, show_list,
+ NULL, NULL);
+}
+
+/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). CLASS is as in
+ add_cmd. VAR is address of the variable which will contain the
+ value. SET_DOC and SHOW_DOC are the documentation strings. */
+void
add_setshow_uinteger_cmd (char *name, enum command_class class,
unsigned int *var,
const char *set_doc, const char *show_doc,