[Lldb-commits] [lldb] r207818 - "DONE" is being left in multi-line results when it shouldn't for non terminal input.
Greg Clayton
gclayton at apple.com
Thu May 1 18:03:07 PDT 2014
Author: gclayton
Date: Thu May 1 20:03:07 2014
New Revision: 207818
URL: http://llvm.org/viewvc/llvm-project?rev=207818&view=rev
Log:
"DONE" is being left in multi-line results when it shouldn't for non terminal input.
<rdar://problem/16790579>
Modified:
lldb/trunk/include/lldb/Core/IOHandler.h
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
Modified: lldb/trunk/include/lldb/Core/IOHandler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/IOHandler.h?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/IOHandler.h (original)
+++ lldb/trunk/include/lldb/Core/IOHandler.h Thu May 1 20:03:07 2014
@@ -337,9 +337,11 @@ namespace lldb_private {
{
public:
IOHandlerDelegateMultiline (const char *end_line,
+ bool remove_end_line,
Completion completion = Completion::None) :
IOHandlerDelegate (completion),
- m_end_line((end_line && end_line[0]) ? end_line : "")
+ m_end_line((end_line && end_line[0]) ? end_line : ""),
+ m_remove_end_line (remove_end_line)
{
}
@@ -375,12 +377,17 @@ namespace lldb_private {
// The last line was edited, if this line is empty, then we are done
// getting our multiple lines.
if (lines[line_idx] == m_end_line)
+ {
+ if (m_remove_end_line)
+ lines.PopBack();
return LineStatus::Done;
+ }
}
return LineStatus::Success;
}
protected:
const std::string m_end_line;
+ const bool m_remove_end_line;
};
Modified: lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp Thu May 1 20:03:07 2014
@@ -46,7 +46,7 @@ public:
"add",
"Add a set of commands to a breakpoint, to be executed whenever the breakpoint is hit.",
NULL),
- IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline ("DONE", true, IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
SetHelpLong (
Modified: lldb/trunk/source/Commands/CommandObjectCommands.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectCommands.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectCommands.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectCommands.cpp Thu May 1 20:03:07 2014
@@ -1567,7 +1567,7 @@ public:
"command script add",
"Add a scripted function as an LLDB command.",
NULL),
- IOHandlerDelegateMultiline ("DONE"),
+ IOHandlerDelegateMultiline ("DONE", true),
m_options (interpreter)
{
CommandArgumentEntry arg1;
Modified: lldb/trunk/source/Commands/CommandObjectTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.cpp Thu May 1 20:03:07 2014
@@ -4908,7 +4908,7 @@ public:
"target stop-hook add",
"Add a hook to be executed when the target stops.",
"target stop-hook add"),
- IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline ("DONE", true, IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
}
Modified: lldb/trunk/source/Commands/CommandObjectType.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectType.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectType.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectType.cpp Thu May 1 20:03:07 2014
@@ -1718,7 +1718,7 @@ CommandObjectTypeSummaryAdd::CommandObje
"type summary add",
"Add a new summary style for a type.",
NULL),
- IOHandlerDelegateMultiline ("DONE"),
+ IOHandlerDelegateMultiline ("DONE", true),
m_options (interpreter)
{
CommandArgumentEntry type_arg;
@@ -3882,7 +3882,7 @@ CommandObjectTypeSynthAdd::CommandObject
"type synthetic add",
"Add a new synthetic provider for a type.",
NULL),
- IOHandlerDelegateMultiline ("DONE"),
+ IOHandlerDelegateMultiline ("DONE", true),
m_options (interpreter)
{
CommandArgumentEntry type_arg;
Modified: lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp Thu May 1 20:03:07 2014
@@ -46,7 +46,7 @@ public:
"add",
"Add a set of commands to a watchpoint, to be executed whenever the watchpoint is hit.",
NULL),
- IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline("DONE", true, IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
SetHelpLong (
Modified: lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp?rev=207818&r1=207817&r2=207818&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp (original)
+++ lldb/trunk/source/Interpreter/ScriptInterpreterPython.cpp Thu May 1 20:03:07 2014
@@ -140,7 +140,7 @@ ScriptInterpreterPython::Locker::~Locker
ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interpreter) :
ScriptInterpreter (interpreter, eScriptLanguagePython),
- IOHandlerDelegateMultiline("DONE"),
+ IOHandlerDelegateMultiline("DONE", true),
m_saved_stdin (),
m_saved_stdout (),
m_saved_stderr (),
More information about the lldb-commits
mailing list