aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-28 19:42:01 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-28 19:42:01 +0000
commitb3f4233622f79fed7c4b9087734d97903770e9c9 (patch)
tree0a52830653b1b22b6a388ad58c9217eacbda4d89
parent3b64bf9877bc5cfacd10117a1a0656c464545995 (diff)
downloadgdb-b3f4233622f79fed7c4b9087734d97903770e9c9.zip
gdb-b3f4233622f79fed7c4b9087734d97903770e9c9.tar.gz
gdb-b3f4233622f79fed7c4b9087734d97903770e9c9.tar.bz2
2004-07-28 Andrew Cagney <cagney@gnu.org>
* cli/cli-decode.c (add_setshow_cmd): Delete function. (add_setshow_cmd_full): Make static. * command.h (add_setshow_cmd, add_setshow_cmd_full): Delete. (add_setshow_filename_cmd, add_setshow_string_cmd): Declare. * cli/cli-decode.c (add_setshow_filename_cmd) (add_setshow_string_cmd): New functions. * nto-tdep.c (_initialize_nto_tdep): Update. Fix parameters. * mips-tdep.c (_initialize_mips_tdep): Update. * m32r-rom.c (_initialize_m32r_rom): Update. Update copyright. * cli/cli-logging.c (_initialize_cli_logging): Update. * complaints.c (_initialize_complaints): Update. * remote.c (_initialize_remote): Update.
-rw-r--r--gdb/ChangeLog15
-rw-r--r--gdb/cli/cli-decode.c62
-rw-r--r--gdb/cli/cli-logging.c5
-rw-r--r--gdb/command.h46
-rw-r--r--gdb/complaints.c7
-rw-r--r--gdb/m32r-rom.c9
-rw-r--r--gdb/mips-tdep.c4
-rw-r--r--gdb/nto-tdep.c13
-rw-r--r--gdb/remote.c14
9 files changed, 105 insertions, 70 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 96865459..7e80f63 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,20 @@
2004-07-28 Andrew Cagney <cagney@gnu.org>
+ * cli/cli-decode.c (add_setshow_cmd): Delete function.
+ (add_setshow_cmd_full): Make static.
+ * command.h (add_setshow_cmd, add_setshow_cmd_full): Delete.
+ (add_setshow_filename_cmd, add_setshow_string_cmd): Declare.
+ * cli/cli-decode.c (add_setshow_filename_cmd)
+ (add_setshow_string_cmd): New functions.
+ * nto-tdep.c (_initialize_nto_tdep): Update. Fix parameters.
+ * mips-tdep.c (_initialize_mips_tdep): Update.
+ * m32r-rom.c (_initialize_m32r_rom): Update. Update copyright.
+ * cli/cli-logging.c (_initialize_cli_logging): Update.
+ * complaints.c (_initialize_complaints): Update.
+ * remote.c (_initialize_remote): Update.
+
+2004-07-28 Andrew Cagney <cagney@gnu.org>
+
* cli/cli-decode.c (add_setshow_zinteger_cmd)
(add_setshow_cmd, add_setshow_auto_boolean_cmd)
(add_setshow_boolean_cmd, add_setshow_cmd_full): Add help_doc and
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index d6f54a6..d908cf5 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -325,7 +325,7 @@ add_set_or_show_cmd (char *name,
and SHOW_RESULT, if not NULL, are set to the resulting command
structures. */
-void
+static void
add_setshow_cmd_full (char *name,
enum command_class class,
var_types var_type, void *var,
@@ -357,28 +357,6 @@ add_setshow_cmd_full (char *name,
*show_result = show;
}
-/* Add element named NAME to both the command SET_LIST and SHOW_LIST.
- CLASS is as in add_cmd. VAR_TYPE is the kind of thing we are
- setting. VAR is address of the variable being controlled by this
- command. SET_FUNC and SHOW_FUNC are the callback functions (if
- non-NULL). SET_DOC and SHOW_DOC are the documentation strings. */
-
-void
-add_setshow_cmd (char *name,
- enum command_class class,
- var_types var_type, void *var,
- const char *set_doc, const char *show_doc,
- const char *help_doc, const char *print,
- 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_type, var,
- set_doc, show_doc, help_doc, print,
- set_func, show_func, set_list, show_list,
- NULL, NULL);
-}
-
struct cmd_list_element *
add_set_cmd (char *name,
enum command_class class,
@@ -462,6 +440,44 @@ add_setshow_boolean_cmd (char *name, enum command_class class, int *var,
}
/* Add element named NAME to both the set and show command LISTs (the
+ list for set/show or some sublist thereof). */
+void
+add_setshow_filename_cmd (char *name, enum command_class class,
+ char **var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ 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_filename, var,
+ set_doc, show_doc, help_doc, print,
+ 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). */
+void
+add_setshow_string_cmd (char *name, enum command_class class,
+ char **var,
+ const char *set_doc, const char *show_doc,
+ const char *help_doc, const char *print,
+ 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_string, var,
+ set_doc, show_doc, help_doc, print,
+ 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. */
diff --git a/gdb/cli/cli-logging.c b/gdb/cli/cli-logging.c
index ec362e3..6b32b33 100644
--- a/gdb/cli/cli-logging.c
+++ b/gdb/cli/cli-logging.c
@@ -187,12 +187,13 @@ If redirect is off, output will go to both the screen and the log file.\n\
If redirect is on, output will go only to the log file.", "\
The logging output mode is %s.",
NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist);
- add_setshow_cmd ("file", class_support, var_filename, &logging_filename, "\
+ add_setshow_filename_cmd ("file", class_support, &logging_filename, "\
Set the current logfile.", "\
Show the current logfile.", "\
The logfile is used when directing GDB's output.", "\
The current logfile is %s.",
- NULL, NULL, &set_logging_cmdlist, &show_logging_cmdlist);
+ NULL, NULL,
+ &set_logging_cmdlist, &show_logging_cmdlist);
add_cmd ("on", class_support, set_logging_on,
"Enable logging.", &set_logging_cmdlist);
add_cmd ("off", class_support, set_logging_off,
diff --git a/gdb/command.h b/gdb/command.h
index 348adab..8c04613 100644
--- a/gdb/command.h
+++ b/gdb/command.h
@@ -211,28 +211,6 @@ extern void help_list (struct cmd_list_element *, char *,
extern void help_cmd_list (struct cmd_list_element *, enum command_class,
char *, int, struct ui_file *);
-extern void add_setshow_cmd (char *name,
- enum command_class class,
- var_types var_type, void *var,
- const char *set_doc, const char *show_doc,
- const char *help_doc, const char *print,
- cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
- struct cmd_list_element **set_list,
- struct cmd_list_element **show_list);
-
-extern void add_setshow_cmd_full (char *name,
- enum command_class class,
- var_types var_type, void *var,
- const char *set_doc, const char *show_doc,
- const char *help_doc, const char *print,
- cmd_sfunc_ftype *set_func,
- cmd_sfunc_ftype *show_func,
- struct cmd_list_element **set_list,
- struct cmd_list_element **show_list,
- struct cmd_list_element **set_result,
- struct cmd_list_element **show_result);
-
extern struct cmd_list_element *add_set_cmd (char *name, enum
command_class class,
var_types var_type, void *var,
@@ -268,6 +246,30 @@ extern void add_setshow_boolean_cmd (char *name,
struct cmd_list_element **set_list,
struct cmd_list_element **show_list);
+extern void add_setshow_filename_cmd (char *name,
+ enum command_class class,
+ char **var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
+extern void add_setshow_string_cmd (char *name,
+ enum command_class class,
+ char **var,
+ const char *set_doc,
+ const char *show_doc,
+ const char *help_doc,
+ const char *print,
+ cmd_sfunc_ftype *set_func,
+ cmd_sfunc_ftype *show_func,
+ struct cmd_list_element **set_list,
+ struct cmd_list_element **show_list);
+
extern void add_setshow_uinteger_cmd (char *name,
enum command_class class,
unsigned int *var,
diff --git a/gdb/complaints.c b/gdb/complaints.c
index 4c9ea14..378ad70 100644
--- a/gdb/complaints.c
+++ b/gdb/complaints.c
@@ -311,13 +311,12 @@ clear_complaints (struct complaints **c, int less_verbose, int noisy)
void
_initialize_complaints (void)
{
- add_setshow_cmd ("complaints", class_support, var_zinteger,
- &stop_whining, "\
+ add_setshow_zinteger_cmd ("complaints", class_support, &stop_whining, "\
Set max number of complaints about incorrect symbols.", "\
Show max number of complaints about incorrect symbols.", "\
Set to zero to disable incorrect symbol complaints.", "\
Max number of complaints about incorrect symbols is %s.",
- NULL, NULL,
- &setlist, &showlist);
+ NULL, NULL,
+ &setlist, &showlist);
}
diff --git a/gdb/m32r-rom.c b/gdb/m32r-rom.c
index c60f021..403d753 100644
--- a/gdb/m32r-rom.c
+++ b/gdb/m32r-rom.c
@@ -558,24 +558,21 @@ Specify the serial device it is connected to (e.g. /dev/ttya).";
mon2000_ops.to_open = mon2000_open;
add_target (&mon2000_ops);
- add_setshow_cmd ("download-path", class_obscure,
- var_string, &download_path, "\
+ add_setshow_string_cmd ("download-path", class_obscure, &download_path, "\
Set the default path for downloadable SREC files.", "\
Show the default path for downloadable SREC files.", "\
Determines the default path for downloadable SREC files.", "\
The default path for downloadable SREC files is %s.",
NULL, NULL, &setlist, &showlist);
- add_setshow_cmd ("board-address", class_obscure,
- var_string, &board_addr, "\
+ add_setshow_string_cmd ("board-address", class_obscure, &board_addr, "\
Set IP address for M32R-EVA target board.", "\
Show IP address for M32R-EVA target board.", "\
Determine the IP address for M32R-EVA target board.", "\
IP address for M32R-EVA target board is %s",
NULL, NULL, &setlist, &showlist);
- add_setshow_cmd ("server-address", class_obscure,
- var_string, &server_addr, "\
+ add_setshow_string_cmd ("server-address", class_obscure, &server_addr, "\
Set IP address for download server (GDB's host computer).", "\
Show IP address for download server (GDB's host computer).", "\
Determine the IP address for download server (GDB's host computer).", "\
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 14697d4..964edd0 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -6195,8 +6195,8 @@ Zerroing of upper 32 bits of 64-bit address is %s.",
/* Allow the user to control the size of 32 bit registers within the
raw remote packet. */
- add_setshow_cmd ("remote-mips64-transfers-32bit-regs", class_obscure,
- var_boolean, &mips64_transfers_32bit_regs_p, "\
+ add_setshow_boolean_cmd ("remote-mips64-transfers-32bit-regs", class_obscure,
+ &mips64_transfers_32bit_regs_p, "\
Set compatibility with 64-bit MIPS target that transfers 32-bit quantities.", "\
Show compatibility with 64-bit MIPS target that transfers 32-bit quantities.", "\
Use \"on\" to enable backward compatibility with older MIPS 64 GDB+target\n\
diff --git a/gdb/nto-tdep.c b/gdb/nto-tdep.c
index ed32a5c..f562ebd 100644
--- a/gdb/nto-tdep.c
+++ b/gdb/nto-tdep.c
@@ -1,6 +1,6 @@
/* nto-tdep.c - general QNX Neutrino target functionality.
- Copyright 2003 Free Software Foundation, Inc.
+ Copyright 2003, 2004 Free Software Foundation, Inc.
Contributed by QNX Software Systems Ltd.
@@ -306,12 +306,15 @@ static struct core_fns regset_core_fns = {
void
_initialize_nto_tdep (void)
{
- add_setshow_cmd ("nto-debug", class_maintenance, var_zinteger,
- &nto_internal_debugging, "Set QNX NTO internal debugging.\n\
+ add_setshow_zinteger_cmd ("nto-debug", class_maintenance,
+ &nto_internal_debugging, "\
+Set QNX NTO internal debugging.", "\
+Show QNX NTO internal debugging.", "\
When non-zero, nto specific debug info is\n\
displayed. Different information is displayed\n\
-for different positive values.", "Show QNX NTO internal debugging.\n",
- NULL, NULL, &setdebuglist, &showdebuglist);
+for different positive values.", "\
+QNX NTO internal debugging is %s.",
+ NULL, NULL, &setdebuglist, &showdebuglist);
/* We use SIG45 for pulses, or something, so nostop, noprint
and pass them. */
diff --git a/gdb/remote.c b/gdb/remote.c
index cee4cc3..7dedc8d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -5469,20 +5469,22 @@ Whether to send break if interrupted is %s.",
"Show the maximum number of bytes per memory-read packet.\n",
&remote_show_cmdlist);
- add_setshow_cmd ("hardware-watchpoint-limit", no_class,
- var_zinteger, &remote_hw_watchpoint_limit, "\
+ add_setshow_zinteger_cmd ("hardware-watchpoint-limit", no_class,
+ &remote_hw_watchpoint_limit, "\
Set the maximum number of target hardware watchpoints.", "\
Show the maximum number of target hardware watchpoints.", "\
Specify a negative limit for unlimited.", "\
The maximum number of target hardware watchpoints is %s.",
- NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
- add_setshow_cmd ("hardware-breakpoint-limit", no_class,
- var_zinteger, &remote_hw_breakpoint_limit, "\
+ NULL, NULL,
+ &remote_set_cmdlist, &remote_show_cmdlist);
+ add_setshow_zinteger_cmd ("hardware-breakpoint-limit", no_class,
+ &remote_hw_breakpoint_limit, "\
Set the maximum number of target hardware breakpoints.", "\
Show the maximum number of target hardware breakpoints.", "\
Specify a negative limit for unlimited.", "\
The maximum number of target hardware breakpoints is %s.",
- NULL, NULL, &remote_set_cmdlist, &remote_show_cmdlist);
+ NULL, NULL,
+ &remote_set_cmdlist, &remote_show_cmdlist);
deprecated_add_show_from_set
(add_set_cmd ("remoteaddresssize", class_obscure,