aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-05-07 13:35:52 +0000
committerAndrew Cagney <cagney@redhat.com>2004-05-07 13:35:52 +0000
commit1517056850dfb18e2b5d8301b93a3d5e5ef3a42a (patch)
tree33f5893e8813088a80f298de5fa26b95ce4e3049 /gdb/cli
parentf2785d123f76572a84b35c047bace669ebe14495 (diff)
downloadbinutils-1517056850dfb18e2b5d8301b93a3d5e5ef3a42a.zip
binutils-1517056850dfb18e2b5d8301b93a3d5e5ef3a42a.tar.gz
binutils-1517056850dfb18e2b5d8301b93a3d5e5ef3a42a.tar.bz2
2004-05-07 Andrew Cagney <cagney@redhat.com>
* cli/cli-decode.c (add_setshow_zinteger_cmd): New function. * command.h (add_setshow_zinteger_cmd): Declare.
Diffstat (limited to 'gdb/cli')
-rw-r--r--gdb/cli/cli-decode.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 43f2f25..879d7b4 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -472,6 +472,26 @@ add_setshow_uinteger_cmd (char *name,
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_DOR are the documentation strings. */
+void
+add_setshow_zinteger_cmd (char *name,
+ enum command_class class,
+ int *var, char *set_doc, char *show_doc,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list)
+{
+ add_setshow_cmd_full (name, class, var_zinteger, var,
+ set_doc, show_doc,
+ set_func, show_func,
+ set_list, show_list,
+ NULL, NULL);
+}
+
/* Where SETCMD has already been added, add the corresponding show
command to LIST and return a pointer to the added command (not
necessarily the head of LIST). */