diff options
author | Tom Tromey <tromey@redhat.com> | 2009-06-19 15:49:35 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-06-19 15:49:35 +0000 |
commit | 5d2c29b8d19dc84f75bfa2ce0e2f334f17b5b2e7 (patch) | |
tree | 3f62659d57e0eaf32275419bd909e332ee0034a8 /gdb/cli/cli-decode.c | |
parent | 4a98be19cdaffe296173f61b7b1f59f89bf4a382 (diff) | |
download | gdb-5d2c29b8d19dc84f75bfa2ce0e2f334f17b5b2e7.zip gdb-5d2c29b8d19dc84f75bfa2ce0e2f334f17b5b2e7.tar.gz gdb-5d2c29b8d19dc84f75bfa2ce0e2f334f17b5b2e7.tar.bz2 |
2009-06-19 Samuel Bronson <naesten@gmail.com>
PR cli/9930:
* cli/cli-decode.c (apropos_cmd): Skip traversing abbreviations
for prefix commands to avoid duplicates in the output.
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r-- | 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 f8f6f28..3e4f6f5 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -779,8 +779,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. |