Cleanup signature of add_set_cmd. Change VAR parameter to void*.
+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.
/* 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;
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);
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);
/* 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;
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_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_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 (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 *,
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);
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
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\
/* 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\
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\
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);
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);