summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Core/Debugger.cpp2
-rw-r--r--lldb/source/Core/IOHandler.cpp11
-rw-r--r--lldb/source/Interpreter/ScriptInterpreterPython.cpp8
-rw-r--r--lldb/source/Target/Process.cpp14
4 files changed, 30 insertions, 5 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 5b346ed636d..34e0e329f09 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -846,7 +846,7 @@ Debugger::ClearIOHandlers ()
{
m_input_reader_stack.Pop();
reader_sp->SetIsDone(true);
- reader_sp->Interrupt();
+ reader_sp->Cancel();
}
}
}
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index bdec19ccb06..168a8f67a08 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -588,6 +588,13 @@ IOHandlerEditline::Refresh ()
}
void
+IOHandlerEditline::Cancel ()
+{
+ if (m_editline_ap)
+ m_editline_ap->Interrupt ();
+}
+
+void
IOHandlerEditline::Interrupt ()
{
if (m_editline_ap)
@@ -5279,6 +5286,10 @@ IOHandlerCursesGUI::Refresh ()
{
}
+void
+IOHandlerCursesGUI::Cancel ()
+{
+}
void
IOHandlerCursesGUI::Interrupt ()
diff --git a/lldb/source/Interpreter/ScriptInterpreterPython.cpp b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
index 389355d9bf9..c1d28e88afc 100644
--- a/lldb/source/Interpreter/ScriptInterpreterPython.cpp
+++ b/lldb/source/Interpreter/ScriptInterpreterPython.cpp
@@ -781,7 +781,13 @@ public:
{
}
-
+
+ virtual void
+ Cancel ()
+ {
+
+ }
+
virtual void
Interrupt ()
{
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 40d3e4950c6..931a068243c 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -4824,13 +4824,21 @@ public:
{
}
+
virtual void
- Interrupt ()
+ Cancel ()
{
size_t n = 1;
char ch = 'q';
m_pipe_write.Write (&ch, n);
}
+
+ virtual void
+ Interrupt ()
+ {
+ if (StateIsRunningState(m_process->GetState()))
+ m_process->Halt();
+ }
virtual void
GotEOF()
@@ -4859,7 +4867,7 @@ Process::CancelWatchForSTDIN (bool exited)
{
if (exited)
m_process_input_reader->SetIsDone(true);
- m_process_input_reader->Interrupt();
+ m_process_input_reader->Cancel();
}
}
@@ -4903,7 +4911,7 @@ Process::PopProcessIOHandler ()
IOHandlerSP io_handler_sp (m_process_input_reader);
if (io_handler_sp)
{
- io_handler_sp->Interrupt();
+ io_handler_sp->Cancel();
m_target.GetDebugger().PopIOHandler (io_handler_sp);
}
}
OpenPOWER on IntegriCloud