* 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.
This commit is contained in:
parent
fc08ec527f
commit
e9e68a56bc
6 changed files with 101 additions and 70 deletions
|
@ -1,3 +1,29 @@
|
||||||
|
2002-06-15 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2002-06-15 Mark Kettenis <kettenis@gnu.org>
|
2002-06-15 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
|
* config/i386/tm-i386.h (PUSH_ARGUMENTS, STORE_STRUCT_RETURN,
|
||||||
|
|
|
@ -389,23 +389,26 @@ add_set_enum_cmd (char *name,
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add element named NAME to command list LIST (the list for set
|
/* Add an auto-boolean command named NAME to both the set and show
|
||||||
or some sublist thereof).
|
command list lists. CLASS is as in add_cmd. VAR is address of the
|
||||||
CLASS is as in add_cmd.
|
variable which will contain the value. DOC is the documentation
|
||||||
VAR is address of the variable which will contain the value.
|
string. FUNC is the corresponding callback. */
|
||||||
DOC is the documentation string. */
|
void
|
||||||
struct cmd_list_element *
|
add_setshow_auto_boolean_cmd (char *name,
|
||||||
add_set_auto_boolean_cmd (char *name,
|
|
||||||
enum command_class class,
|
enum command_class class,
|
||||||
enum auto_boolean *var,
|
enum auto_boolean *var,
|
||||||
char *doc,
|
char *set_doc, char *show_doc,
|
||||||
struct cmd_list_element **list)
|
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 };
|
static const char *auto_boolean_enums[] = { "on", "off", "auto", NULL };
|
||||||
struct cmd_list_element *c;
|
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;
|
c->enums = auto_boolean_enums;
|
||||||
return c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add element named NAME to both the set and show command LISTs (the
|
/* Add element named NAME to both the set and show command LISTs (the
|
||||||
|
|
|
@ -293,12 +293,6 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
|
||||||
char *doc,
|
char *doc,
|
||||||
struct cmd_list_element **list);
|
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 *,
|
extern struct cmd_list_element *add_show_from_set (struct cmd_list_element *,
|
||||||
struct cmd_list_element
|
struct cmd_list_element
|
||||||
**);
|
**);
|
||||||
|
|
|
@ -223,11 +223,14 @@ extern struct cmd_list_element *add_set_enum_cmd (char *name,
|
||||||
char *doc,
|
char *doc,
|
||||||
struct cmd_list_element **list);
|
struct cmd_list_element **list);
|
||||||
|
|
||||||
extern struct cmd_list_element *add_set_auto_boolean_cmd (char *name,
|
extern void add_setshow_auto_boolean_cmd (char *name,
|
||||||
enum command_class class,
|
enum command_class class,
|
||||||
enum auto_boolean *var,
|
enum auto_boolean *var,
|
||||||
char *doc,
|
char *set_doc, char *show_doc,
|
||||||
struct cmd_list_element **list);
|
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_boolean_cmd (char *name,
|
extern void add_setshow_boolean_cmd (char *name,
|
||||||
enum command_class class,
|
enum command_class class,
|
||||||
|
|
|
@ -491,7 +491,7 @@ mips_mask_address_p (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_mask_address (char *cmd, int from_tty)
|
show_mask_address (char *cmd, int from_tty, struct cmd_list_element *c)
|
||||||
{
|
{
|
||||||
switch (mask_address_var)
|
switch (mask_address_var)
|
||||||
{
|
{
|
||||||
|
@ -5083,13 +5083,13 @@ search. The only need to set it is when debugging a stripped executable.",
|
||||||
|
|
||||||
/* Allow the user to control whether the upper bits of 64-bit
|
/* Allow the user to control whether the upper bits of 64-bit
|
||||||
addresses should be zeroed. */
|
addresses should be zeroed. */
|
||||||
c = add_set_auto_boolean_cmd ("mask-address", no_class, &mask_address_var,
|
add_setshow_auto_boolean_cmd ("mask-address", no_class, &mask_address_var, "\
|
||||||
"Set zeroing of upper 32 bits of 64-bit addresses.\n\
|
Set zeroing of upper 32 bits of 64-bit addresses.\n\
|
||||||
Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to allow GDB to determine\n\
|
Use \"on\" to enable the masking, \"off\" to disable it and \"auto\" to \n\
|
||||||
the correct value.\n",
|
allow GDB to determine the correct value.\n", "\
|
||||||
&setmipscmdlist);
|
Show zeroing of upper 32 bits of 64-bit addresses.",
|
||||||
add_cmd ("mask-address", no_class, show_mask_address,
|
NULL, show_mask_address,
|
||||||
"Show current mask-address value", &showmipscmdlist);
|
&setmipscmdlist, &showmipscmdlist);
|
||||||
|
|
||||||
/* Allow the user to control the size of 32 bit registers within the
|
/* Allow the user to control the size of 32 bit registers within the
|
||||||
raw remote packet. */
|
raw remote packet. */
|
||||||
|
|
79
gdb/remote.c
79
gdb/remote.c
|
@ -648,11 +648,8 @@ static void
|
||||||
add_packet_config_cmd (struct packet_config *config,
|
add_packet_config_cmd (struct packet_config *config,
|
||||||
char *name,
|
char *name,
|
||||||
char *title,
|
char *title,
|
||||||
void (*set_func) (char *args, int from_tty,
|
cmd_sfunc_ftype *set_func,
|
||||||
struct cmd_list_element *
|
cmd_sfunc_ftype *show_func,
|
||||||
c),
|
|
||||||
void (*show_func) (char *name,
|
|
||||||
int from_tty),
|
|
||||||
struct cmd_list_element **set_remote_list,
|
struct cmd_list_element **set_remote_list,
|
||||||
struct cmd_list_element **show_remote_list,
|
struct cmd_list_element **show_remote_list,
|
||||||
int legacy)
|
int legacy)
|
||||||
|
@ -672,12 +669,10 @@ add_packet_config_cmd (struct packet_config *config,
|
||||||
name, title);
|
name, title);
|
||||||
/* set/show TITLE-packet {auto,on,off} */
|
/* set/show TITLE-packet {auto,on,off} */
|
||||||
xasprintf (&cmd_name, "%s-packet", title);
|
xasprintf (&cmd_name, "%s-packet", title);
|
||||||
set_cmd = add_set_auto_boolean_cmd (cmd_name, class_obscure,
|
add_setshow_auto_boolean_cmd (cmd_name, class_obscure,
|
||||||
&config->detect, set_doc,
|
&config->detect, set_doc, show_doc,
|
||||||
set_remote_list);
|
set_func, show_func,
|
||||||
set_cmd_sfunc (set_cmd, set_func);
|
set_remote_list, show_remote_list);
|
||||||
show_cmd = add_cmd (cmd_name, class_obscure, show_func, show_doc,
|
|
||||||
show_remote_list);
|
|
||||||
/* set/show remote NAME-packet {auto,on,off} -- legacy */
|
/* set/show remote NAME-packet {auto,on,off} -- legacy */
|
||||||
if (legacy)
|
if (legacy)
|
||||||
{
|
{
|
||||||
|
@ -765,7 +760,8 @@ set_remote_protocol_qSymbol_packet_cmd (char *args, int from_tty,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
show_packet_config_cmd (&remote_protocol_qSymbol);
|
||||||
}
|
}
|
||||||
|
@ -781,7 +777,8 @@ set_remote_protocol_e_packet_cmd (char *args, int from_tty,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
show_packet_config_cmd (&remote_protocol_e);
|
||||||
}
|
}
|
||||||
|
@ -798,7 +795,8 @@ set_remote_protocol_E_packet_cmd (char *args, int from_tty,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
show_packet_config_cmd (&remote_protocol_E);
|
||||||
}
|
}
|
||||||
|
@ -816,7 +814,8 @@ set_remote_protocol_P_packet_cmd (char *args, int from_tty,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
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
|
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]);
|
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
|
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]);
|
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
|
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]);
|
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
|
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]);
|
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
|
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]);
|
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
|
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;
|
int i;
|
||||||
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
|
for (i = 0; i < NR_Z_PACKET_TYPES; i++)
|
||||||
|
@ -962,8 +967,8 @@ set_remote_protocol_binary_download_cmd (char *args,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
show_remote_protocol_binary_download_cmd (char *args,
|
show_remote_protocol_binary_download_cmd (char *args, int from_tty,
|
||||||
int from_tty)
|
struct cmd_list_element *c)
|
||||||
{
|
{
|
||||||
show_packet_config_cmd (&remote_protocol_binary_download);
|
show_packet_config_cmd (&remote_protocol_binary_download);
|
||||||
}
|
}
|
||||||
|
@ -5968,13 +5973,14 @@ set_remote_cmd (char *args, int from_tty)
|
||||||
static void
|
static void
|
||||||
show_remote_cmd (char *args, int from_tty)
|
show_remote_cmd (char *args, int from_tty)
|
||||||
{
|
{
|
||||||
|
/* FIXME: cagney/2002-06-15: This function should iterate over
|
||||||
show_remote_protocol_Z_packet_cmd (args, from_tty);
|
remote_show_cmdlist for a list of sub commands to show. */
|
||||||
show_remote_protocol_e_packet_cmd (args, from_tty);
|
show_remote_protocol_Z_packet_cmd (args, from_tty, NULL);
|
||||||
show_remote_protocol_E_packet_cmd (args, from_tty);
|
show_remote_protocol_e_packet_cmd (args, from_tty, NULL);
|
||||||
show_remote_protocol_P_packet_cmd (args, from_tty);
|
show_remote_protocol_E_packet_cmd (args, from_tty, NULL);
|
||||||
show_remote_protocol_qSymbol_packet_cmd (args, from_tty);
|
show_remote_protocol_P_packet_cmd (args, from_tty, NULL);
|
||||||
show_remote_protocol_binary_download_cmd (args, from_tty);
|
show_remote_protocol_qSymbol_packet_cmd (args, from_tty, NULL);
|
||||||
|
show_remote_protocol_binary_download_cmd (args, from_tty, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6207,12 +6213,11 @@ in a memory packet.\n",
|
||||||
0);
|
0);
|
||||||
|
|
||||||
/* Keep the old ``set remote Z-packet ...'' working. */
|
/* Keep the old ``set remote Z-packet ...'' working. */
|
||||||
tmpcmd = add_set_auto_boolean_cmd ("Z-packet", class_obscure,
|
add_setshow_auto_boolean_cmd ("Z-packet", class_obscure,
|
||||||
&remote_Z_packet_detect,
|
&remote_Z_packet_detect, "\
|
||||||
"\
|
Set use of remote protocol `Z' packets",
|
||||||
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 ",
|
"Show use of remote protocol `Z' packets ",
|
||||||
&remote_show_cmdlist);
|
set_remote_protocol_Z_packet_cmd,
|
||||||
|
show_remote_protocol_Z_packet_cmd,
|
||||||
|
&remote_set_cmdlist, &remote_show_cmdlist);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue