summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2010-09-21 23:25:40 +0000
committerCaroline Tice <ctice@apple.com>2010-09-21 23:25:40 +0000
commit867b185d8d4c31a2ae01bebec7c4d4cd54ff4241 (patch)
treeaeb039997b334c32b1331a61c5ca88280c3df168 /lldb/source/Commands/CommandObjectCommands.cpp
parent7cf46bfda055c1d5961e01c085fd13a76bc9614f (diff)
downloadbcm5719-llvm-867b185d8d4c31a2ae01bebec7c4d4cd54ff4241.tar.gz
bcm5719-llvm-867b185d8d4c31a2ae01bebec7c4d4cd54ff4241.zip
Update help text for breakpoint command one-liners.
Fix minor bug in 'commands alias'; alias commands can now handle command options and arguments in the same alias. Also fixes problem that disallowed "process launch --" as an alias. Fix typo in comment in Python script interpreter. llvm-svn: 114499
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index fc761587c82..913577b087b 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -207,7 +207,7 @@ public:
CommandReturnObject &result
)
{
- const size_t argc = args.GetArgumentCount();
+ size_t argc = args.GetArgumentCount();
if (argc < 2)
{
@@ -296,15 +296,18 @@ public:
args.Shift ();
if (result.Succeeded())
options->VerifyPartialOptions (result);
- if (!result.Succeeded())
- return false;
- }
- else
- {
- for (size_t i = 0; i < argc; ++i)
- option_arg_vector->push_back (OptionArgPair ("<argument>",
- std::string (args.GetArgumentAtIndex (i))));
+ if (!result.Succeeded() && result.GetStatus() != lldb::eReturnStatusStarted)
+ {
+ result.AppendError ("Unable to create requested command alias.\n");
+ }
}
+
+ // Anything remaining in args must be a plain argument.
+
+ argc = args.GetArgumentCount();
+ for (size_t i = 0; i < argc; ++i)
+ option_arg_vector->push_back (OptionArgPair ("<argument>",
+ std::string (args.GetArgumentAtIndex (i))));
}
// Create the alias.
OpenPOWER on IntegriCloud