diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
| commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
| tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /include/lldb/Interpreter | |
| parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) | |
Notes
Diffstat (limited to 'include/lldb/Interpreter')
| -rw-r--r-- | include/lldb/Interpreter/Args.h | 1 | ||||
| -rw-r--r-- | include/lldb/Interpreter/CommandInterpreter.h | 21 | ||||
| -rw-r--r-- | include/lldb/Interpreter/OptionGroupArchitecture.h | 6 | ||||
| -rw-r--r-- | include/lldb/Interpreter/OptionValueArch.h | 6 |
4 files changed, 24 insertions, 10 deletions
diff --git a/include/lldb/Interpreter/Args.h b/include/lldb/Interpreter/Args.h index 98046cd595454..19d7ac4185665 100644 --- a/include/lldb/Interpreter/Args.h +++ b/include/lldb/Interpreter/Args.h @@ -86,6 +86,7 @@ public: Args(llvm::StringRef command = llvm::StringRef()); Args(const Args &rhs); + explicit Args(const StringList &list); Args &operator=(const Args &rhs); diff --git a/include/lldb/Interpreter/CommandInterpreter.h b/include/lldb/Interpreter/CommandInterpreter.h index 73bd7d6e6220d..5e561f47946d7 100644 --- a/include/lldb/Interpreter/CommandInterpreter.h +++ b/include/lldb/Interpreter/CommandInterpreter.h @@ -242,6 +242,8 @@ public: bool repeat_on_empty_command = true, bool no_context_switching = false); + bool WasInterrupted() const; + //------------------------------------------------------------------ /// Execute a list of commands in sequence. /// @@ -522,6 +524,25 @@ private: StringList &commands_help, CommandObject::CommandMap &command_map); + // An interruptible wrapper around the stream output + void PrintCommandOutput(Stream &stream, llvm::StringRef str); + + // A very simple state machine which models the command handling transitions + enum class CommandHandlingState { + eIdle, + eInProgress, + eInterrupted, + }; + + std::atomic<CommandHandlingState> m_command_state{ + CommandHandlingState::eIdle}; + + int m_iohandler_nesting_level = 0; + + void StartHandlingCommand(); + void FinishHandlingCommand(); + bool InterruptCommand(); + Debugger &m_debugger; // The debugger session that this interpreter is // associated with ExecutionContextRef m_exe_ctx_ref; // The current execution context to use diff --git a/include/lldb/Interpreter/OptionGroupArchitecture.h b/include/lldb/Interpreter/OptionGroupArchitecture.h index e73a53421f289..2cecaa65a0fdc 100644 --- a/include/lldb/Interpreter/OptionGroupArchitecture.h +++ b/include/lldb/Interpreter/OptionGroupArchitecture.h @@ -10,12 +10,8 @@ #ifndef liblldb_OptionGroupArchitecture_h_ #define liblldb_OptionGroupArchitecture_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/ArchSpec.h" #include "lldb/Interpreter/Options.h" +#include "lldb/Utility/ArchSpec.h" namespace lldb_private { diff --git a/include/lldb/Interpreter/OptionValueArch.h b/include/lldb/Interpreter/OptionValueArch.h index e1a354d4ae21e..d66448aa2bedf 100644 --- a/include/lldb/Interpreter/OptionValueArch.h +++ b/include/lldb/Interpreter/OptionValueArch.h @@ -10,12 +10,8 @@ #ifndef liblldb_OptionValueArch_h_ #define liblldb_OptionValueArch_h_ -// C Includes -// C++ Includes -// Other libraries and framework includes -// Project includes -#include "lldb/Core/ArchSpec.h" #include "lldb/Interpreter/OptionValue.h" +#include "lldb/Utility/ArchSpec.h" namespace lldb_private { |
