From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5015 invoked by alias); 17 Jun 2009 22:23:12 -0000 Received: (qmail 5007 invoked by uid 22791); 17 Jun 2009 22:23:11 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,SPF_NEUTRAL X-Spam-Check-By: sourceware.org Received: from smtp02.lnh.mail.rcn.net (HELO smtp02.lnh.mail.rcn.net) (207.172.157.102) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Jun 2009 22:23:04 +0000 Received: from mr08.lnh.mail.rcn.net ([207.172.157.28]) by smtp02.lnh.mail.rcn.net with ESMTP; 17 Jun 2009 18:23:02 -0400 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr08.lnh.mail.rcn.net (MOS 3.10.5-GA) with ESMTP id KYC05936; Wed, 17 Jun 2009 18:22:35 -0400 (EDT) Received: from 207-172-203-39.c3-0.upd-ubr7.trpr-upd.pa.cable.rcn.com (HELO hydrogen) ([207.172.203.39]) by smtp01.lnh.mail.rcn.net with ESMTP; 17 Jun 2009 18:22:35 -0400 Received: from naesten by hydrogen with local (Exim 4.69) (envelope-from ) id 1MH3Wc-0003Kh-Ts; Wed, 17 Jun 2009 18:22:34 -0400 From: Samuel Bronson To: gdb-patches@sourceware.org Cc: Samuel Bronson Subject: [PATCH 2/2] Fix for PR gdb/9903 (part 2) Date: Wed, 17 Jun 2009 22:23:00 -0000 Message-Id: <1245277318-12742-2-git-send-email-naesten@gmail.com> In-Reply-To: <1245277318-12742-1-git-send-email-naesten@gmail.com> References: <1245277318-12742-1-git-send-email-naesten@gmail.com> X-Junkmail-Whitelist: YES (by domain whitelist at mr08.lnh.mail.rcn.net) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00456.txt.bz2 * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output. Signed-off-by: Samuel Bronson --- gdb/cli/cli-decode.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index cd4c984..c842889 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -790,8 +790,11 @@ apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist, 0 /* don't recurse */, stream); } } - /* Check if this command has subcommands */ - if (c->prefixlist != NULL) + /* Check if this command has subcommands and is not an abbreviation. + We skip listing subcommands of abbreviations in order to avoid + duplicates in the output. + */ + if (c->prefixlist != NULL && !c->abbrev_flag) { /* Recursively call ourselves on the subcommand list, passing the right prefix in. -- 1.6.3.1