diff options
author | Leonard Mosescu <mosescu@google.com> | 2017-10-05 23:41:28 +0000 |
---|---|---|
committer | Leonard Mosescu <mosescu@google.com> | 2017-10-05 23:41:28 +0000 |
commit | 17ffd39ed8b5e224684bb77fd913fb1f1b5d77a0 (patch) | |
tree | 1e34b7782cd0f415ae5a2bbd51783e1e61a47455 /lldb/source/API/SBCommandInterpreter.cpp | |
parent | b9aa9a55006add424a18dd19a518064994a4eed4 (diff) | |
download | bcm5719-llvm-17ffd39ed8b5e224684bb77fd913fb1f1b5d77a0.tar.gz bcm5719-llvm-17ffd39ed8b5e224684bb77fd913fb1f1b5d77a0.zip |
Implement interactive command interruption
The core of this change is the new CommandInterpreter::m_command_state,
which models the state transitions for interactive commands, including
an "interrupted" state transition.
In general, command interruption requires cooperation from the code
executing the command, which needs to poll for interruption requests
through CommandInterpreter::WasInterrupted().
CommandInterpreter::PrintCommandOutput() implements an optionally
interruptible printing of the command output, which for large outputs
was likely the longest blocking part.
(ex. target modules dump symtab on a complex binary could take 10+ minutes)
Differential Revision: https://reviews.llvm.org/D37923
llvm-svn: 315037
Diffstat (limited to 'lldb/source/API/SBCommandInterpreter.cpp')
-rw-r--r-- | lldb/source/API/SBCommandInterpreter.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/source/API/SBCommandInterpreter.cpp b/lldb/source/API/SBCommandInterpreter.cpp index aa4953999b8..c9bb8f65fa2 100644 --- a/lldb/source/API/SBCommandInterpreter.cpp +++ b/lldb/source/API/SBCommandInterpreter.cpp @@ -161,6 +161,10 @@ bool SBCommandInterpreter::IsActive() { return (IsValid() ? m_opaque_ptr->IsActive() : false); } +bool SBCommandInterpreter::WasInterrupted() const { + return (IsValid() ? m_opaque_ptr->WasInterrupted() : false); +} + const char *SBCommandInterpreter::GetIOHandlerControlSequence(char ch) { return (IsValid() ? m_opaque_ptr->GetDebugger() |