diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-06-15 22:05:33 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-06-15 22:05:33 +0000 |
commit | e9e68a56bc8f22dd3234810e0b39edfeb81f81f4 (patch) | |
tree | f42d3755b66b4b4650a169d4101e15e83acf06fa /gdb/remote.c | |
parent | fc08ec527f12d35a154836f653e9ad2c0e3f988d (diff) | |
download | gdb-e9e68a56bc8f22dd3234810e0b39edfeb81f81f4.zip gdb-e9e68a56bc8f22dd3234810e0b39edfeb81f81f4.tar.gz gdb-e9e68a56bc8f22dd3234810e0b39edfeb81f81f4.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 81 |
1 files changed, 43 insertions, 38 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index c6bfc66..8231a57 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -648,11 +648,8 @@ static void add_packet_config_cmd (struct packet_config *config, char *name, char *title, - void (*set_func) (char *args, int from_tty, - struct cmd_list_element * - c), - void (*show_func) (char *name, - int from_tty), + cmd_sfunc_ftype *set_func, + cmd_sfunc_ftype *show_func, struct cmd_list_element **set_remote_list, struct cmd_list_element **show_remote_list, int legacy) @@ -672,12 +669,10 @@ add_packet_config_cmd (struct packet_config *config, name, title); /* set/show TITLE-packet {auto,on,off} */ xasprintf (&cmd_name, "%s-packet", title); - set_cmd = add_set_auto_boolean_cmd (cmd_name, class_obscure, - &config->detect, set_doc, - set_remote_list); - set_cmd_sfunc (set_cmd, set_func); - show_cmd = add_cmd (cmd_name, class_obscure, show_func, show_doc, - show_remote_list); + add_setshow_auto_boolean_cmd (cmd_name, class_obscure, + &config->detect, set_doc, show_doc, + set_func, show_func, + set_remote_list, show_remote_list); /* set/show remote NAME-packet {auto,on,off} -- legacy */ if (legacy) { @@ -765,7 +760,8 @@ set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty) +show_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_qSymbol); } @@ -781,7 +777,8 @@ set_remote_protocol_e_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_e_packet_cmd (char *args, int from_tty) +show_remote_protocol_e_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_e); } @@ -798,7 +795,8 @@ set_remote_protocol_E_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_E_packet_cmd (char *args, int from_tty) +show_remote_protocol_E_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_E); } @@ -816,7 +814,8 @@ set_remote_protocol_P_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_P_packet_cmd (char *args, int from_tty) +show_remote_protocol_P_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_P); } @@ -846,7 +845,8 @@ set_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_software_bp_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_SOFTWARE_BP]); } @@ -859,7 +859,8 @@ set_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_hardware_bp_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_HARDWARE_BP]); } @@ -872,7 +873,8 @@ set_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_write_wp_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_WRITE_WP]); } @@ -885,7 +887,8 @@ set_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_read_wp_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_READ_WP]); } @@ -898,7 +901,8 @@ set_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_access_wp_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_Z[Z_PACKET_ACCESS_WP]); } @@ -921,7 +925,8 @@ set_remote_protocol_Z_packet_cmd (char *args, int from_tty, } static void -show_remote_protocol_Z_packet_cmd (char *args, int from_tty) +show_remote_protocol_Z_packet_cmd (char *args, int from_tty, + struct cmd_list_element *c) { int i; for (i = 0; i < NR_Z_PACKET_TYPES; i++) @@ -962,8 +967,8 @@ set_remote_protocol_binary_download_cmd (char *args, } static void -show_remote_protocol_binary_download_cmd (char *args, - int from_tty) +show_remote_protocol_binary_download_cmd (char *args, int from_tty, + struct cmd_list_element *c) { show_packet_config_cmd (&remote_protocol_binary_download); } @@ -5968,13 +5973,14 @@ set_remote_cmd (char *args, int from_tty) static void show_remote_cmd (char *args, int from_tty) { - - show_remote_protocol_Z_packet_cmd (args, from_tty); - show_remote_protocol_e_packet_cmd (args, from_tty); - show_remote_protocol_E_packet_cmd (args, from_tty); - show_remote_protocol_P_packet_cmd (args, from_tty); - show_remote_protocol_qSymbol_packet_cmd (args, from_tty); - show_remote_protocol_binary_download_cmd (args, from_tty); + /* FIXME: cagney/2002-06-15: This function should iterate over + remote_show_cmdlist for a list of sub commands to show. */ + show_remote_protocol_Z_packet_cmd (args, from_tty, NULL); + show_remote_protocol_e_packet_cmd (args, from_tty, NULL); + show_remote_protocol_E_packet_cmd (args, from_tty, NULL); + show_remote_protocol_P_packet_cmd (args, from_tty, NULL); + show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL); + show_remote_protocol_binary_download_cmd (args, from_tty, NULL); } static void @@ -6207,12 +6213,11 @@ in a memory packet.\n", 0); /* Keep the old ``set remote Z-packet ...'' working. */ - tmpcmd = add_set_auto_boolean_cmd ("Z-packet", class_obscure, - &remote_Z_packet_detect, - "\ -Set use of remote protocol `Z' packets", &remote_set_cmdlist); - set_cmd_sfunc (tmpcmd, set_remote_protocol_Z_packet_cmd); - add_cmd ("Z-packet", class_obscure, show_remote_protocol_Z_packet_cmd, - "Show use of remote protocol `Z' packets ", - &remote_show_cmdlist); + add_setshow_auto_boolean_cmd ("Z-packet", class_obscure, + &remote_Z_packet_detect, "\ +Set use of remote protocol `Z' packets", + "Show use of remote protocol `Z' packets ", + set_remote_protocol_Z_packet_cmd, + show_remote_protocol_Z_packet_cmd, + &remote_set_cmdlist, &remote_show_cmdlist); } |