summaryrefslogtreecommitdiff
path: root/gdb/language.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 13:59:01 -0400
committerSimon Marchi <simon.marchi@polymtl.ca>2021-05-27 14:00:08 -0400
commit5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e (patch)
tree65d675353e6cb9f90711947244a8f78d156f7021 /gdb/language.c
parente0f25bd9717c7973197095523db7c1cdc956cea2 (diff)
downloadbinutils-gdb-5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e.tar.gz
gdb: remove add_alias_cmd overload that accepts a string
Same idea as previous patch, but for add_alias_cmd. Remove the overload that accepts the target command as a string (the target command name), leaving only the one that takes the cmd_list_element. gdb/ChangeLog: * command.h (add_alias_cmd): Accept target as cmd_list_element. Update callers. Change-Id: I546311f411e9e7da9302322d6ffad4e6c56df266
Diffstat (limited to 'gdb/language.c')
-rw-r--r--gdb/language.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/gdb/language.c b/gdb/language.c
index a3f96ecd6ff..0d1e3848de8 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -1164,17 +1164,19 @@ _initialize_language ()
/* GDB commands for language specific stuff. */
- add_basic_prefix_cmd ("check", no_class,
- _("Set the status of the type/range checker."),
- &setchecklist, 0, &setlist);
- add_alias_cmd ("c", "check", no_class, 1, &setlist);
- add_alias_cmd ("ch", "check", no_class, 1, &setlist);
-
- add_show_prefix_cmd ("check", no_class,
- _("Show the status of the type/range checker."),
- &showchecklist, 0, &showlist);
- add_alias_cmd ("c", "check", no_class, 1, &showlist);
- add_alias_cmd ("ch", "check", no_class, 1, &showlist);
+ cmd_list_element *set_check_cmd
+ = add_basic_prefix_cmd ("check", no_class,
+ _("Set the status of the type/range checker."),
+ &setchecklist, 0, &setlist);
+ add_alias_cmd ("c", set_check_cmd, no_class, 1, &setlist);
+ add_alias_cmd ("ch", set_check_cmd, no_class, 1, &setlist);
+
+ cmd_list_element *show_check_cmd
+ = add_show_prefix_cmd ("check", no_class,
+ _("Show the status of the type/range checker."),
+ &showchecklist, 0, &showlist);
+ add_alias_cmd ("c", show_check_cmd, no_class, 1, &showlist);
+ add_alias_cmd ("ch", show_check_cmd, no_class, 1, &showlist);
add_setshow_enum_cmd ("range", class_support, type_or_range_names,
&range,