From e9e68a56bc8f22dd3234810e0b39edfeb81f81f4 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sat, 15 Jun 2002 22:05:33 +0000 Subject: * command.h (add_setshow_auto_boolean_cmd): Replace add_set_auto_boolean_cmd. * cli/cli-decode.c (add_setshow_auto_boolean_cmd): Replace add_set_auto_boolean_cmd. * cli/cli-decode.h (add_set_auto_boolean_cmd): Delete declaration. * mips-tdep.c (_initialize_mips_tdep): Update ``set mips mask-address'' command. (show_mask_address): Add cmd parameter. * remote.c (add_packet_config_cmd): Update. Change type of set_func and show_func to cmd_sfunc_ftype. (_initialize_remote): Update `set remote Z-packet' (show_remote_protocol_qSymbol_packet_cmd): Add cmd parameter. (show_remote_protocol_e_packet_cmd): Ditto. (show_remote_protocol_E_packet_cmd): Ditto. (show_remote_protocol_P_packet_cmd): Ditto. (show_remote_protocol_Z_software_bp_packet_cmd): Ditto. (show_remote_protocol_Z_hardware_bp_packet_cmd): Ditto. (show_remote_protocol_Z_write_wp_packet_cmd): Ditto. (show_remote_protocol_Z_read_wp_packet_cmd): Ditto. (show_remote_protocol_Z_access_wp_packet_cmd): Ditto. (show_remote_protocol_Z_packet_cmd): Ditto. (show_remote_protocol_binary_download_cmd): Ditto. (show_remote_cmd): Pass NULL to all of above. --- gdb/cli/cli-decode.c | 29 ++++++++++++++++------------- gdb/cli/cli-decode.h | 6 ------ 2 files changed, 16 insertions(+), 19 deletions(-) (limited to 'gdb/cli') diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index b552c53..a6fadd9 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -389,23 +389,26 @@ add_set_enum_cmd (char *name, return c; } -/* Add element named NAME to command list LIST (the list for set - or some sublist thereof). - CLASS is as in add_cmd. - VAR is address of the variable which will contain the value. - DOC is the documentation string. */ -struct cmd_list_element * -add_set_auto_boolean_cmd (char *name, - enum command_class class, - enum auto_boolean *var, - char *doc, - struct cmd_list_element **list) +/* Add an auto-boolean command named NAME to both the set and show + command list lists. CLASS is as in add_cmd. VAR is address of the + variable which will contain the value. DOC is the documentation + string. FUNC is the corresponding callback. */ +void +add_setshow_auto_boolean_cmd (char *name, + enum command_class class, + enum auto_boolean *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) { static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL }; struct cmd_list_element *c; - c = add_set_cmd (name, class, var_auto_boolean, var, doc, list); + c = add_setshow_cmd (name, class, var_auto_boolean, var, + set_doc, show_doc, set_func, show_func, + set_list, show_list); c->enums = auto_boolean_enums; - return c; } /* Add element named NAME to both the set and show command LISTs (the diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h index c5d06d5..e8563ff 100644 --- a/gdb/cli/cli-decode.h +++ b/gdb/cli/cli-decode.h @@ -293,12 +293,6 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name, char *doc, struct cmd_list_element **list); -extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name, - enum command_class class, - enum auto_boolean *var, - char *doc, - struct cmd_list_element **list); - extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *, struct cmd_list_element **); -- cgit v1.1