summaryrefslogtreecommitdiffstats
path: root/lldb/scripts
diff options
context:
space:
mode:
authorAdrian McCarthy <amccarth@google.com>2017-09-21 19:36:52 +0000
committerAdrian McCarthy <amccarth@google.com>2017-09-21 19:36:52 +0000
commit977996d25b1f7ca0d4f4d2c863537a95287f096e (patch)
treec55232715bdbeb5879f4dae4f3cbbbf1babbeb1c /lldb/scripts
parentbfca5f433476e54433ec7e0b05a6310b4e0d4692 (diff)
downloadbcm5719-llvm-977996d25b1f7ca0d4f4d2c863537a95287f096e.tar.gz
bcm5719-llvm-977996d25b1f7ca0d4f4d2c863537a95287f096e.zip
[LLDB] 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) patch by lemo Differential Revision: https://reviews.llvm.org/D37923 llvm-svn: 313904
Diffstat (limited to 'lldb/scripts')
-rw-r--r--lldb/scripts/interface/SBCommandInterpreter.i14
1 files changed, 8 insertions, 6 deletions
diff --git a/lldb/scripts/interface/SBCommandInterpreter.i b/lldb/scripts/interface/SBCommandInterpreter.i
index c427d38b14d..255e8ba4496 100644
--- a/lldb/scripts/interface/SBCommandInterpreter.i
+++ b/lldb/scripts/interface/SBCommandInterpreter.i
@@ -125,18 +125,18 @@ public:
{
eBroadcastBitThreadShouldExit = (1 << 0),
eBroadcastBitResetPrompt = (1 << 1),
- eBroadcastBitQuitCommandReceived = (1 << 2), // User entered quit
+ eBroadcastBitQuitCommandReceived = (1 << 2), // User entered quit
eBroadcastBitAsynchronousOutputData = (1 << 3),
eBroadcastBitAsynchronousErrorData = (1 << 4)
};
SBCommandInterpreter (const lldb::SBCommandInterpreter &rhs);
-
+
~SBCommandInterpreter ();
- static const char *
+ static const char *
GetArgumentTypeAsCString (const lldb::CommandArgumentType arg_type);
-
+
static const char *
GetArgumentDescriptionAsCString (const lldb::CommandArgumentType arg_type);
@@ -181,7 +181,7 @@ public:
lldb::SBProcess
GetProcess ();
-
+
lldb::SBDebugger
GetDebugger ();
@@ -209,10 +209,12 @@ public:
int match_start_point,
int max_return_elements,
lldb::SBStringList &matches);
-
+
bool
IsActive ();
+ bool
+ WasInterrupted () const;
};
} // namespace lldb
OpenPOWER on IntegriCloud