[Lldb-commits] [lldb] r114499 - in /lldb/trunk/source: Commands/CommandObjectBreakpointCommand.cpp Commands/CommandObjectCommands.cpp Interpreter/ScriptInterpreterPython.cpp
Caroline Tice
ctice at apple.com
Tue Sep 21 16:25:40 PDT 2010
Author: ctice
Date: Tue Sep 21 18:25:40 2010
New Revision: 114499
URL: http://llvm.org/viewvc/llvm-project?rev=114499&view=rev
Log:
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.
Modified:
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=114499&r1=114498&r2=114499&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Tue Sep 21 18:25:40 2010
@@ -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."},
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=114499&r1=114498&r2=114499&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Tue Sep 21 18:25:40 2010
@@ -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;
- }
- 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.
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=114499&r1=114498&r2=114499&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Tue Sep 21 18:25:40 2010
@@ -726,7 +726,7 @@
}
// Traverse user_input exactly once. At each line, either copy line into new, auto-generated function,
- // increasing indentation by 5 spaces... ...or copy it exactly as is into the user-written
+ // increasing indentation by 5 spaces or copy it exactly as is into the user-written
// currently-to-be-pushed-to-Python function def. At the end of each Python function def, push the function
// to Python, and clear the function string, to start again. At the end of it all, if there is anything in
// the auto-generated function, push it to Python and add the function call to it to the callback data.
More information about the lldb-commits
mailing list