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
This commit is contained in:
Simon Marchi
2021-05-27 13:59:01 -04:00
parent e0f25bd971
commit 5e84b7eefb
26 changed files with 256 additions and 210 deletions

View File

@@ -1908,8 +1908,7 @@ alias_command (const char *args, int from_tty)
/* add_cmd requires *we* allocate space for name, hence the xstrdup. */
alias_cmd = add_alias_cmd (xstrdup (alias_argv[alias_argc - 1]),
command_argv[command_argc - 1],
class_alias, a_opts.abbrev_flag,
target_cmd, class_alias, a_opts.abbrev_flag,
c_command->subcommands);
}