From: Samuel Bronson <naesten@gmail.com>
To: gdb-patches@sourceware.org
Cc: Samuel Bronson <naesten@gmail.com>
Subject: [PATCH 2/2] * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output.
Date: Wed, 17 Jun 2009 03:31:00 -0000 [thread overview]
Message-ID: <1245209405-9539-2-git-send-email-naesten@gmail.com> (raw)
In-Reply-To: <1245209405-9539-1-git-send-email-naesten@gmail.com>
Signed-off-by: Samuel Bronson <naesten@gmail.com>
---
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 e2647fc..73c06bc 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -789,8 +789,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
next prev parent reply other threads:[~2009-06-17 3:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 3:31 [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing Samuel Bronson
2009-06-17 3:31 ` Samuel Bronson [this message]
2009-06-17 17:27 ` [PATCH 2/2] * cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations for prefix commands to avoid duplicates in the output Tom Tromey
2009-06-17 17:26 ` [PATCH 1/2] * cli/cli-decode.c (apropos_cmd): Fix avoidance of double printing Tom Tromey
2009-06-17 20:15 ` Samuel Bronson
2009-06-17 22:22 ` [PATCH 1/2] Fix for PR gdb/9903 (part 1) Samuel Bronson
2009-06-17 22:23 ` [PATCH 2/2] Fix for PR gdb/9903 (part 2) Samuel Bronson
2009-06-18 17:59 ` [PATCH 1/2] Fix for PR gdb/9903 (part 1) Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245209405-9539-2-git-send-email-naesten@gmail.com \
--to=naesten@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox