This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-8.0-branch] Add alias command to cmd_list_element
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Wed, 17 May 2017 11:54:07 -0400
- Subject: [binutils-gdb/gdb-8.0-branch] Add alias command to cmd_list_element
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT efaba6bc8fa1cb074bcaa16f48766164ccaa1005 ***
Author: Yao Qi <yao.qi@linaro.org>
Branch: gdb-8.0-branch
Commit: efaba6bc8fa1cb074bcaa16f48766164ccaa1005
Add alias command to cmd_list_element
When we add alias command, we call add_alias_cmd and pass the alias name
and command name. This implicitly requires the command and its prefix
commands are already added to cmdlist. This may not be true, for example,
add_com_alias ("tty", "set inferior-tty", class_alias, 0);
"inferior-tty" command is added to setlist, but setlist may not be added
to cmdlist (It depends on the order of related _initialize_XXX functions
called) so that we can't find "set inferior-tty" from cmdlist.
This patch fixes this problem by passing cmd_list_element of "inferior-tty"
to add_alias_cmd, so that cmd_list_element of "inferior-tty" doesn't have
to be reachable from cmdlist at that moment.
gdb:
2017-05-17 Yao Qi <yao.qi@linaro.org>
* cli/cli-decode.c (add_alias_cmd): New function.
* command.h (add_alias_cmd): Declare.
* infcmd.c (_initialize_infcmd): Don't call add_com_alias,
instead call add_alias_cmd.
gdb/testsuite:
2017-05-17 Simon Marchi <simon.marchi@ericsson.com>
* gdb.base/set-inferior-tty.exp (test_set_inferior_tty): Add
argument command.
(top-level): Invoke test_set_inferior_tty.
- Follow-Ups:
- Failures on Ubuntu-AArch64-native-gdbserver-m64, branch gdb-8.0-branch
- Failures on Fedora-x86_64-m64, branch gdb-8.0-branch
- Failures on Fedora-x86_64-native-gdbserver-m32, branch gdb-8.0-branch
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch gdb-8.0-branch
- Failures on Ubuntu-AArch64-m64, branch gdb-8.0-branch
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch gdb-8.0-branch
- Failures on Fedora-x86_64-m32, branch gdb-8.0-branch
- Failures on Fedora-x86_64-native-gdbserver-m64, branch gdb-8.0-branch
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch gdb-8.0-branch
- Failures on Fedora-i686, branch gdb-8.0-branch
- Failures on Ubuntu-AArch32-m32, branch gdb-8.0-branch