forked from OSchip/llvm-project
Fixed the command line LLDB so that "CTRL+C" will interrupt a running process again.
llvm-svn: 202086
This commit is contained in:
parent
301bafed78
commit
e68f5d6b69
|
@ -63,6 +63,16 @@ namespace lldb_private {
|
|||
virtual void
|
||||
Refresh () = 0;
|
||||
|
||||
// Called when an input reader should relinquish its control so another
|
||||
// can be pushed onto the IO handler stack, or so the current IO
|
||||
// handler can pop itself off the stack
|
||||
|
||||
virtual void
|
||||
Cancel () = 0;
|
||||
|
||||
// Called when CTRL+C is pressed which usually causes
|
||||
// Debugger::DispatchInputInterrupt to be called.
|
||||
|
||||
virtual void
|
||||
Interrupt () = 0;
|
||||
|
||||
|
@ -394,6 +404,9 @@ namespace lldb_private {
|
|||
virtual void
|
||||
Refresh ();
|
||||
|
||||
virtual void
|
||||
Cancel ();
|
||||
|
||||
virtual void
|
||||
Interrupt ();
|
||||
|
||||
|
@ -500,7 +513,10 @@ namespace lldb_private {
|
|||
|
||||
virtual void
|
||||
Refresh ();
|
||||
|
||||
|
||||
virtual void
|
||||
Cancel ();
|
||||
|
||||
virtual void
|
||||
Interrupt ();
|
||||
|
||||
|
|
|
@ -846,7 +846,7 @@ Debugger::ClearIOHandlers ()
|
|||
{
|
||||
m_input_reader_stack.Pop();
|
||||
reader_sp->SetIsDone(true);
|
||||
reader_sp->Interrupt();
|
||||
reader_sp->Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -587,6 +587,13 @@ IOHandlerEditline::Refresh ()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
IOHandlerEditline::Cancel ()
|
||||
{
|
||||
if (m_editline_ap)
|
||||
m_editline_ap->Interrupt ();
|
||||
}
|
||||
|
||||
void
|
||||
IOHandlerEditline::Interrupt ()
|
||||
{
|
||||
|
@ -5279,6 +5286,10 @@ IOHandlerCursesGUI::Refresh ()
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
IOHandlerCursesGUI::Cancel ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
IOHandlerCursesGUI::Interrupt ()
|
||||
|
|
|
@ -781,7 +781,13 @@ public:
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
virtual void
|
||||
Cancel ()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void
|
||||
Interrupt ()
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue