From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65566 invoked by alias); 17 May 2017 15:54:08 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 65527 invoked by uid 89); 17 May 2017 15:54:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 17 May 2017 15:54:06 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb/gdb-8.0-branch] Add alias command to cmd_list_element From: sergiodj+buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Wed, 17 May 2017 15:54:00 -0000 X-SW-Source: 2017-q2/txt/msg02691.txt.bz2 *** TEST RESULTS FOR COMMIT efaba6bc8fa1cb074bcaa16f48766164ccaa1005 *** Author: Yao Qi 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 * 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 * gdb.base/set-inferior-tty.exp (test_set_inferior_tty): Add argument command. (top-level): Invoke test_set_inferior_tty.