From 17ffd39ed8b5e224684bb77fd913fb1f1b5d77a0 Mon Sep 17 00:00:00 2001 From: Leonard Mosescu Date: Thu, 5 Oct 2017 23:41:28 +0000 Subject: 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 --- .../Python/lldbsuite/test/functionalities/command_source/.lldb | 3 ++- .../Python/lldbsuite/test/functionalities/command_source/commands.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt (limited to 'lldb/packages/Python/lldbsuite/test') diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb b/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb index c544523832e..ecbdcff4462 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb +++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_source/.lldb @@ -1 +1,2 @@ -script import my +# one more level of indirection to stress the command interpreter reentrancy +command source commands.txt diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt b/lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt new file mode 100644 index 00000000000..8e4de66d469 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/command_source/commands.txt @@ -0,0 +1,2 @@ +script import my +p 1 + 1 -- cgit v1.2.3