binutils-gdb/gdb/compile
Simon Marchi 3947f654ea gdb: make add_com_alias accept target as a cmd_list_element
The alias creation functions currently accept a name to specify the
target command.  They pass this to add_alias_cmd, which needs to lookup
the target command by name.

Given that:

 - We don't support creating an alias for a command before that command
   exists.
 - We always use add_info_alias just after creating that target command,
   and therefore have access to the target command's cmd_list_element.

... change add_com_alias to accept the target command as a
cmd_list_element (other functions are done in subsequent patches).  This
ensures we don't create the alias before the target command, because you
need to get the cmd_list_element from somewhere when you call the alias
creation function.  And it avoids an unecessary command lookup.  So it
seems better to me in every aspect.

gdb/ChangeLog:

	* command.h (add_com_alias): Accept target as
	cmd_list_element.  Update callers.

Change-Id: I24bed7da57221cc77606034de3023fedac015150
2021-05-27 14:00:07 -04:00
..
compile-c-support.c Return unique_ptr from language_defn::get_compile_context 2021-02-05 07:17:12 -07:00
compile-c-symbols.c Use std::vector for "registers_used" in compile feature 2021-01-23 20:33:25 -07:00
compile-c-types.c gdb: rename type::{arch,objfile} -> type::{arch_owner,objfile_owner} 2021-01-28 10:09:02 -05:00
compile-c.h Use std::vector for "registers_used" in compile feature 2021-01-23 20:33:25 -07:00
compile-cplus-symbols.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-cplus-types.c gdb: remove TYPE_DECLARED_CLASS 2021-04-01 21:10:09 -04:00
compile-cplus.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-internal.h Remove call to reset from compile_to_object 2021-01-23 17:48:48 -07:00
compile-loc2c.c Avoid crash when "compile" expression uses cooked register 2021-01-23 20:33:25 -07:00
compile-object-load.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-object-load.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-object-run.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile-object-run.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
compile.c gdb: make add_com_alias accept target as a cmd_list_element 2021-05-27 14:00:07 -04:00
compile.h Use std::vector for "registers_used" in compile feature 2021-01-23 20:33:25 -07:00
gcc-c-plugin.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gcc-cp-plugin.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00