summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index aafd0f8147d..db500a7f66c 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/lldb/source/Commands/CommandObjectMultiword.cpp
@@ -49,8 +49,12 @@ CommandObjectMultiword::GetSubcommandSP (const char *sub_cmd, StringList *matche
if (!m_subcommand_dict.empty())
{
pos = m_subcommand_dict.find (sub_cmd);
- if (pos != m_subcommand_dict.end())
+ if (pos != m_subcommand_dict.end()) {
+ // An exact match; append the sub_cmd to the 'matches' string list.
+ if (matches)
+ matches->AppendString(sub_cmd);
return_cmd_sp = pos->second;
+ }
else
{
OpenPOWER on IntegriCloud