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.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@114499 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectBreakpointCommand.cpp b/source/Commands/CommandObjectBreakpointCommand.cpp
index 3c3a85a..85971bd 100644
--- a/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -49,7 +49,7 @@
CommandObjectBreakpointCommandAdd::CommandOptions::g_option_table[] =
{
{ LLDB_OPT_SET_ALL, false, "one-liner", 'o', required_argument, NULL, 0, "<one-liner>",
- "Specify a one-liner inline." },
+ "Specify a one-line breakpoint command inline. Be sure to surround it with quotes." },
{ LLDB_OPT_SET_1, true, "script", 's', no_argument, NULL, 0, NULL,
"Write the breakpoint command script in the default scripting language."},
diff --git a/source/Commands/CommandObjectCommands.cpp b/source/Commands/CommandObjectCommands.cpp
index fc76158..913577b 100644
--- a/source/Commands/CommandObjectCommands.cpp
+++ b/source/Commands/CommandObjectCommands.cpp
@@ -207,7 +207,7 @@
CommandReturnObject &result
)
{
- const size_t argc = args.GetArgumentCount();
+ size_t argc = args.GetArgumentCount();
if (argc < 2)
{
@@ -296,15 +296,18 @@
args.Shift ();
if (result.Succeeded())
options->VerifyPartialOptions (result);
- if (!result.Succeeded())
- return false;
+ if (!result.Succeeded() && result.GetStatus() != lldb::eReturnStatusStarted)
+ {
+ result.AppendError ("Unable to create requested command alias.\n");
+ }
}
- else
- {
- for (size_t i = 0; i < argc; ++i)
- option_arg_vector->push_back (OptionArgPair ("<argument>",
- std::string (args.GetArgumentAtIndex (i))));
- }
+
+ // 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.