diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 12 | ||||
-rw-r--r-- | gdb/arm-tdep.c | 2 | ||||
-rw-r--r-- | gdb/command.c | 26 | ||||
-rw-r--r-- | gdb/command.h | 21 | ||||
-rw-r--r-- | gdb/i386-tdep.c | 2 | ||||
-rw-r--r-- | gdb/infrun.c | 4 | ||||
-rw-r--r-- | gdb/mips-tdep.c | 10 | ||||
-rw-r--r-- | gdb/remote.c | 2 | ||||
-rw-r--r-- | gdb/serial.c | 2 |
9 files changed, 48 insertions, 33 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5b191e3..2903feb 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -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. diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 7112c4c..84a350a 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -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; diff --git a/gdb/command.c b/gdb/command.c index d753d77..8c35ed4 100644 --- a/gdb/command.c +++ b/gdb/command.c @@ -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); diff --git a/gdb/command.h b/gdb/command.h index 20e4fd5..4cff582 100644 --- a/gdb/command.h +++ b/gdb/command.h @@ -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_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 *, diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 39990db..03c4cf3 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -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); diff --git a/gdb/infrun.c b/gdb/infrun.c index 75cdf73..0e84a6d 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -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\ diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c index cb790b2..964b366 100644 --- a/gdb/mips-tdep.c +++ b/gdb/mips-tdep.c @@ -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\ diff --git a/gdb/remote.c b/gdb/remote.c index 1087d9f..ea3c24f 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -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); diff --git a/gdb/serial.c b/gdb/serial.c index e843e0e..0914e39 100644 --- a/gdb/serial.c +++ b/gdb/serial.c @@ -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); |