From 5e84b7eefba5b4299b0ca80aecc5d4e99c195c1e Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Thu, 27 May 2021 13:59:01 -0400 Subject: 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 --- gdb/arch-utils.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'gdb/arch-utils.c') diff --git a/gdb/arch-utils.c b/gdb/arch-utils.c index 5bb9c75..c75a797 100644 --- a/gdb/arch-utils.c +++ b/gdb/arch-utils.c @@ -757,13 +757,15 @@ initialize_current_architecture (void) arches = XRESIZEVEC (const char *, arches, nr + 2); arches[nr + 0] = "auto"; arches[nr + 1] = NULL; - add_setshow_enum_cmd ("architecture", class_support, - arches, &set_architecture_string, - _("Set architecture of target."), - _("Show architecture of target."), NULL, - set_architecture, show_architecture, - &setlist, &showlist); - add_alias_cmd ("processor", "architecture", class_support, 1, &setlist); + set_show_commands architecture_cmds + = add_setshow_enum_cmd ("architecture", class_support, + arches, &set_architecture_string, + _("Set architecture of target."), + _("Show architecture of target."), NULL, + set_architecture, show_architecture, + &setlist, &showlist); + add_alias_cmd ("processor", architecture_cmds.set, class_support, 1, + &setlist); } } -- cgit v1.1