diff options
author | Greg Clayton <gclayton@apple.com> | 2012-12-15 01:19:07 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2012-12-15 01:19:07 +0000 |
commit | 3cb4c7d6a0efbcbc87e1603b3b6edcdded1e11d0 (patch) | |
tree | e21f0a315fca8c85d271d609316c377e15be5a6e /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 32e94890581c792461233cf49bff0633cb646ca2 (diff) | |
download | bcm5719-llvm-3cb4c7d6a0efbcbc87e1603b3b6edcdded1e11d0.tar.gz bcm5719-llvm-3cb4c7d6a0efbcbc87e1603b3b6edcdded1e11d0.zip |
<rdar://problem/12582041>
_regexp_attach doesn't handle the case where no arguments are provided. It now also handles the case you were you pass options.
llvm-svn: 170262
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 339a3c54a6a..9f1c6cc7f50 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -455,8 +455,10 @@ CommandInterpreter::LoadCommandDictionary () "_regexp-attach [<pid>]\n_regexp-attach [<process-name>]", 2)); if (attach_regex_cmd_ap.get()) { - if (attach_regex_cmd_ap->AddRegexCommand("^([0-9]+)$", "process attach --pid %1") && - attach_regex_cmd_ap->AddRegexCommand("^(.*[^[:space:]])[[:space:]]*$", "process attach --name '%1'")) + if (attach_regex_cmd_ap->AddRegexCommand("^([0-9]+)[[:space:]]*$", "process attach --pid %1") && + attach_regex_cmd_ap->AddRegexCommand("^(-.*|.* -.*)$", "process attach %1") && // Any options that are specified get passed to 'process attach' + attach_regex_cmd_ap->AddRegexCommand("^(.+)$", "process attach --name '%1'") && + attach_regex_cmd_ap->AddRegexCommand("^$", "process attach")) { CommandObjectSP attach_regex_cmd_sp(attach_regex_cmd_ap.release()); m_command_dict[attach_regex_cmd_sp->GetCommandName ()] = attach_regex_cmd_sp; |