diff options
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index aa400aa7ce7..929fbfb29c4 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -44,6 +44,7 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/Log.h" +#include "lldb/Core/State.h" #include "lldb/Core/Stream.h" #include "lldb/Core/StreamFile.h" #include "lldb/Core/Timer.h" @@ -3051,6 +3052,24 @@ CommandInterpreter::IOHandlerInputComplete (IOHandler &io_handler, std::string & } } +bool +CommandInterpreter::IOHandlerInterrupt (IOHandler &io_handler) +{ + ExecutionContext exe_ctx (GetExecutionContext()); + Process *process = exe_ctx.GetProcessPtr(); + + if (process) + { + StateType state = process->GetState(); + if (StateIsRunningState(state)) + { + process->Halt(); + return true; // Don't do any updating when we are running + } + } + return false; +} + void CommandInterpreter::GetLLDBCommandsFromIOHandler (const char *prompt, IOHandlerDelegate &delegate, |