summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2014-05-08 16:59:00 +0000
committerGreg Clayton <gclayton@apple.com>2014-05-08 16:59:00 +0000
commitc3d874a5843810e69b9847a6a4bb49c9481c6692 (patch)
tree3d5324d2969902043bcd687787449b49f2a4cc83
parent61449c6b9a69054a93e885b4503c2f9b3a7ce426 (diff)
downloadbcm5719-llvm-c3d874a5843810e69b9847a6a4bb49c9481c6692.tar.gz
bcm5719-llvm-c3d874a5843810e69b9847a6a4bb49c9481c6692.zip
lldb TOT is dropping the last entry for multi-line IOHandlers that use the IOHandlerDelegateMultiline.
<rdar://problem/16844164> llvm-svn: 208336
-rw-r--r--lldb/include/lldb/Core/IOHandler.h7
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp2
-rw-r--r--lldb/source/Commands/CommandObjectType.cpp4
-rw-r--r--lldb/source/Commands/CommandObjectWatchpointCommand.cpp2
-rw-r--r--lldb/source/Core/IOHandler.cpp7
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index 23cae9d4e6d..13d07f90e8d 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -337,11 +337,9 @@ 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_remove_end_line (remove_end_line)
+ m_end_line((end_line && end_line[0]) ? end_line : "")
{
}
@@ -378,8 +376,6 @@ namespace lldb_private {
// getting our multiple lines.
if (lines[line_idx] == m_end_line)
{
- if (m_remove_end_line)
- lines.PopBack();
return LineStatus::Done;
}
}
@@ -387,7 +383,6 @@ namespace lldb_private {
}
protected:
const std::string m_end_line;
- const bool m_remove_end_line;
};
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index 93166943f5c..0b28cc3e2cc 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -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", true, IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
SetHelpLong (
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index fb12c9451bf..e3e113aac23 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -1567,7 +1567,7 @@ public:
"command script add",
"Add a scripted function as an LLDB command.",
NULL),
- IOHandlerDelegateMultiline ("DONE", true),
+ IOHandlerDelegateMultiline ("DONE"),
m_options (interpreter)
{
CommandArgumentEntry arg1;
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 9fdd51bf740..de4877257e0 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -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", true, IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline ("DONE", IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
}
diff --git a/lldb/source/Commands/CommandObjectType.cpp b/lldb/source/Commands/CommandObjectType.cpp
index b4c30cab13d..364d9effb61 100644
--- a/lldb/source/Commands/CommandObjectType.cpp
+++ b/lldb/source/Commands/CommandObjectType.cpp
@@ -1718,7 +1718,7 @@ CommandObjectTypeSummaryAdd::CommandObjectTypeSummaryAdd (CommandInterpreter &in
"type summary add",
"Add a new summary style for a type.",
NULL),
- IOHandlerDelegateMultiline ("DONE", true),
+ IOHandlerDelegateMultiline ("DONE"),
m_options (interpreter)
{
CommandArgumentEntry type_arg;
@@ -3882,7 +3882,7 @@ CommandObjectTypeSynthAdd::CommandObjectTypeSynthAdd (CommandInterpreter &interp
"type synthetic add",
"Add a new synthetic provider for a type.",
NULL),
- IOHandlerDelegateMultiline ("DONE", true),
+ IOHandlerDelegateMultiline ("DONE"),
m_options (interpreter)
{
CommandArgumentEntry type_arg;
diff --git a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
index 45291a54bdb..0083ff140e5 100644
--- a/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectWatchpointCommand.cpp
@@ -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", true, IOHandlerDelegate::Completion::LLDBCommand),
+ IOHandlerDelegateMultiline("DONE", IOHandlerDelegate::Completion::LLDBCommand),
m_options (interpreter)
{
SetHelpLong (
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index 88c96fbb53f..8573a1a9c5c 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -529,6 +529,7 @@ IOHandlerEditline::GetLines (StringList &lines, bool &interrupted)
else
{
LineStatus lines_status = LineStatus::Success;
+ Error error;
while (lines_status == LineStatus::Success)
{
@@ -551,7 +552,6 @@ IOHandlerEditline::GetLines (StringList &lines, bool &interrupted)
else
{
lines.AppendString(line);
- Error error;
lines_status = m_delegate.IOHandlerLinesUpdated(*this, lines, lines.GetSize() - 1, error);
}
}
@@ -560,6 +560,11 @@ IOHandlerEditline::GetLines (StringList &lines, bool &interrupted)
lines_status = LineStatus::Done;
}
}
+
+ // Call the IOHandlerLinesUpdated function with UINT32_MAX as the line
+ // number to indicate all lines are complete
+ m_delegate.IOHandlerLinesUpdated(*this, lines, UINT32_MAX, error);
+
success = lines.GetSize() > 0;
}
return success;
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 52920eddde2..da84353fed4 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -140,7 +140,7 @@ ScriptInterpreterPython::Locker::~Locker()
ScriptInterpreterPython::ScriptInterpreterPython (CommandInterpreter &interpreter) :
ScriptInterpreter (interpreter, eScriptLanguagePython),
- IOHandlerDelegateMultiline("DONE", true),
+ IOHandlerDelegateMultiline("DONE"),
m_saved_stdin (),
m_saved_stdout (),
m_saved_stderr (),
OpenPOWER on IntegriCloud