Fix signature of add_set_enum_cmd. Change VAR parameter to char**.

Cleanup signature of add_set_cmd.  Change VAR parameter to void*.
This commit is contained in:
Andrew Cagney 2000-05-16 03:03:13 +00:00
parent dfb0df6c34
commit 1ed2a1352d
9 changed files with 47 additions and 32 deletions

View File

@ -1,3 +1,15 @@
Mon May 15 09:32:31 2000 Andrew Cagney <cagney@b1.cygnus.com>
* command.h (add_set_cmd): Change VAR parameter to void pointer.
(add_set_enum_cmd): Change VAR parameter to char pointer pointer.
(struct command): Change member VAR to void pointer.
* command.c (add_set_cmd, add_set_enum_cmd): Update.
* remote.c (add_packet_config_cmd), mips-tdep.c
(_initialize_mips_tdep), infrun.c (_initialize_infrun),
i386-tdep.c (_initialize_i386_tdep), arm-tdep.c
(_initialize_arm_tdep): Update VAR parameter to add_set_enum_cmd.
Tue May 16 12:46:04 2000 Andrew Cagney <cagney@b1.cygnus.com>
* wrapper.h (wrap_value_subscript): Delete declaration.

View File

@ -2083,7 +2083,7 @@ The valid values are:\n");
/* Add the disassembly-flavor command */
new_cmd = add_set_enum_cmd ("disassembly-flavor", no_class,
valid_flavors,
(char *) &disassembly_flavor,
&disassembly_flavor,
helptext,
&setlist);
new_cmd->function.sfunc = set_disassembly_flavor_sfunc;

View File

@ -285,13 +285,12 @@ empty_sfunc (args, from_tty, c)
DOC is the documentation string. */
struct cmd_list_element *
add_set_cmd (name, class, var_type, var, doc, list)
char *name;
enum command_class class;
var_types var_type;
char *var;
char *doc;
struct cmd_list_element **list;
add_set_cmd (char *name,
enum command_class class,
var_types var_type,
void *var,
char *doc,
struct cmd_list_element **list)
{
struct cmd_list_element *c
= add_cmd (name, class, NO_FUNCTION, doc, list);
@ -314,13 +313,12 @@ add_set_cmd (name, class, var_type, var, doc, list)
DOC is the documentation string. */
struct cmd_list_element *
add_set_enum_cmd (name, class, enumlist, var, doc, list)
char *name;
enum command_class class;
char *enumlist[];
char *var;
char *doc;
struct cmd_list_element **list;
add_set_enum_cmd (char *name,
enum command_class class,
char *enumlist[],
char **var,
char *doc,
struct cmd_list_element **list)
{
struct cmd_list_element *c
= add_set_cmd (name, class, var_enum, var, doc, list);

View File

@ -194,7 +194,7 @@ struct cmd_list_element
/* Pointer to variable affected by "set" and "show". Doesn't matter
if type is not_set. */
char *var;
void *var;
/* What kind of variable is *VAR? */
var_types var_type;
@ -284,13 +284,18 @@ 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 struct cmd_list_element *
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
struct cmd_list_element **));
extern struct cmd_list_element *add_set_cmd (char *name, enum
command_class class,
var_types var_type, void *var,
char *doc,
struct cmd_list_element **list);
extern struct cmd_list_element *
add_set_enum_cmd PARAMS ((char *name, enum command_class, char *list[],
char *var, char *doc, struct cmd_list_element ** c));
extern struct cmd_list_element *add_set_enum_cmd (char *name,
enum command_class class,
char *enumlist[],
char **var,
char *doc,
struct cmd_list_element **list);
extern struct cmd_list_element *
add_show_from_set PARAMS ((struct cmd_list_element *,

View File

@ -938,7 +938,7 @@ _initialize_i386_tdep ()
new_cmd = add_set_enum_cmd ("disassembly-flavor", no_class,
valid_flavors,
(char *) &disassembly_flavor,
&disassembly_flavor,
"Set the disassembly flavor, the valid values are \"att\" and \"intel\", \
and the default value is \"att\".",
&setlist);

View File

@ -4267,7 +4267,7 @@ to the user would be loading/unloading of a new library.\n",
c = add_set_enum_cmd ("follow-fork-mode",
class_run,
follow_fork_mode_kind_names,
(char *) &follow_fork_mode_string,
&follow_fork_mode_string,
/* ??rehrauer: The "both" option is broken, by what may be a 10.20
kernel problem. It's also not terribly useful without a GUI to
help the user drive two debuggers. So for now, I'm disabling
@ -4302,7 +4302,7 @@ By default, the debugger will follow the parent process.",
c = add_set_enum_cmd ("scheduler-locking", class_run,
scheduler_enums, /* array of string names */
(char *) &scheduler_mode, /* current mode */
&scheduler_mode, /* current mode */
"Set mode for locking scheduler during execution.\n\
off == no locking (threads may preempt at any time)\n\
on == full locking (no thread except the current thread may run)\n\

View File

@ -4153,9 +4153,9 @@ _initialize_mips_tdep ()
/* Allow the user to override the saved register size. */
add_show_from_set (add_set_enum_cmd ("saved-gpreg-size",
class_obscure,
size_enums,
(char *) &mips_saved_regsize_string, "\
class_obscure,
size_enums,
&mips_saved_regsize_string, "\
Set size of general purpose registers saved on the stack.\n\
This option can be set to one of:\n\
32 - Force GDB to treat saved GP registers as 32-bit\n\
@ -4163,14 +4163,14 @@ This option can be set to one of:\n\
auto - Allow GDB to use the target's default setting or autodetect the\n\
saved GP register size from information contained in the executable.\n\
(default: auto)",
&setmipscmdlist),
&setmipscmdlist),
&showmipscmdlist);
/* Allow the user to override the argument stack size. */
add_show_from_set (add_set_enum_cmd ("stack-arg-size",
class_obscure,
size_enums,
(char *) &mips_stack_argsize_string, "\
&mips_stack_argsize_string, "\
Set the amount of stack space reserved for each argument.\n\
This option can be set to one of:\n\
32 - Force GDB to allocate 32-bit chunks per argument\n\

View File

@ -624,7 +624,7 @@ add_packet_config_cmd (config, name, title, set_func, show_func,
asprintf (&full_name, "%s-packet", name);
c = add_set_enum_cmd (full_name,
class_obscure, packet_support_enums,
(char *) &config->state,
&config->state,
set_doc, setlist);
c->function.sfunc = set_func;
add_cmd (full_name, class_obscure, show_func, show_doc, showlist);

View File

@ -667,7 +667,7 @@ by gdbserver.",
add_show_from_set
(add_set_enum_cmd ("remotelogbase", no_class,
logbase_enums, (char *) &serial_logbase,
logbase_enums, &serial_logbase,
"Set numerical base for remote session logging",
&setlist),
&showlist);