diff options
author | Andrew Cagney <cagney@redhat.com> | 2004-07-28 19:42:01 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2004-07-28 19:42:01 +0000 |
commit | 21c206de3c74f451b3b76a865f6ae8215886aecf (patch) | |
tree | c2923a543ae773d96ac8043fc051099d30f7a69f /gdb/cli | |
parent | bbd943b1d5f59b80a874de2c818c7660d6782fe6 (diff) | |
download | gdb-21c206de3c74f451b3b76a865f6ae8215886aecf.tar.gz |
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.
Diffstat (limited to 'gdb/cli')
-rw-r--r-- | gdb/cli/cli-decode.c | 62 | ||||
-rw-r--r-- | gdb/cli/cli-logging.c | 5 |
2 files changed, 42 insertions, 25 deletions
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index d6f54a65966..d908cf5c50c 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 ec362e3dac7..6b32b330ba6 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, |