aboutsummaryrefslogtreecommitdiff
path: root/gdb/cli/cli-decode.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/cli/cli-decode.c')
-rw-r--r--gdb/cli/cli-decode.c7
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.