binutils-gdb/gdb/python
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
..
lib/gdb gdb: re-format Python files using black 21.4b0 2021-05-07 10:56:20 -04:00
py-all-events.def Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-arch.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-auto-load.c gdb: remove unnecessary lookup_cmd when deprecating commands 2021-05-27 14:00:07 -04:00
py-block.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-bpevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-breakpoint.c gdb/py: add some debugging to py-breakpoint.c 2021-05-09 16:50:16 +01:00
py-cmd.c gdb: add cmd_list_element::is_prefix 2021-05-17 14:01:26 -04:00
py-continueevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-event-types.def Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-event.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-event.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-events.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-evtregistry.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-evts.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-exitedevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-finishbreakpoint.c gdbsupport, gdb: give names to observers 2021-04-24 19:26:41 -04:00
py-frame.c gdb: replace fprint_frame_id 2021-05-09 16:50:15 +01:00
py-framefilter.c gdb/python: fix FrameDecorator regression on Python 2 2021-03-16 09:31:56 +00:00
py-function.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-gdb-readline.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-inferior.c gdb/python: add a 'connection_num' attribute to Inferior objects 2021-05-14 15:33:23 +02:00
py-infevents.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-infthread.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-instruction.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-instruction.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-lazy-string.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-linetable.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-newobjfileevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-objfile.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-param.c gdb/python: use return values of add_setshow functions in add_setshow_generic 2021-05-27 14:00:07 -04:00
py-prettyprint.c gdb: fix pretty printing max depth behaviour 2021-05-14 06:51:21 +01:00
py-progspace.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-record-btrace.c gdb: make some variables static 2021-01-20 20:55:05 -05:00
py-record-btrace.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-record-full.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-record-full.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-record.c gdb: make some variables static 2021-01-20 20:55:05 -05:00
py-record.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-ref.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-registers.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-signalevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-stopevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-stopevent.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-symbol.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-symtab.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-threadevent.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-tui.c Prevent flickering when redrawing the TUI python window 2021-05-24 17:16:44 +02:00
py-type.c gdb: delay python initialisation until gdbpy_finish_initialization 2021-04-28 09:56:20 +01:00
py-unwind.c gdb/py: convert debug logging in py-unwind to use new scheme 2021-05-09 16:50:15 +01:00
py-utils.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-value.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-varobj.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
py-xmethods.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
python-config.py gdb: re-format Python files using black 21.4b0 2021-05-07 10:56:20 -04:00
python-internal.h gdb: make gdbpy_parse_command_name return a unique_xmalloc_ptr 2021-05-12 13:50:09 -04:00
python.c gdb: make add_com_alias accept target as a cmd_list_element 2021-05-27 14:00:07 -04:00
python.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00