summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectExpression.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2011-06-16 16:27:19 +0000
committerCaroline Tice <ctice@apple.com>2011-06-16 16:27:19 +0000
commitd61c10bc79322b5c51a6facf0de490b1dcf6a809 (patch)
tree73a8aea61d3de2ce8e74caa23e216bc18ce67fa4 /lldb/source/Commands/CommandObjectExpression.cpp
parentb5703510595ebf8af37e6e7a479534a01e69fccd (diff)
downloadbcm5719-llvm-d61c10bc79322b5c51a6facf0de490b1dcf6a809.tar.gz
bcm5719-llvm-d61c10bc79322b5c51a6facf0de490b1dcf6a809.zip
Add 'batch_mode' to CommandInterpreter. Modify InputReaders to
not write output (prompts, instructions,etc.) if the CommandInterpreter is in batch_mode. Also, finish updating InputReaders to write to the asynchronous stream, rather than using the Debugger's output file directly. llvm-svn: 133162
Diffstat (limited to 'lldb/source/Commands/CommandObjectExpression.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index 9f2e79e1a67..7d1af333d84 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -191,10 +191,12 @@ CommandObjectExpression::MultiLineExpressionCallback
)
{
CommandObjectExpression *cmd_object_expr = (CommandObjectExpression *) baton;
-
+ bool batch_mode = reader.GetDebugger().GetCommandInterpreter().GetBatchCommandMode();
+
switch (notification)
{
case eInputReaderActivate:
+ if (!batch_mode)
{
StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
out_stream->Printf("%s\n", "Enter expressions, then terminate with an empty line to evaluate:");
@@ -224,6 +226,7 @@ CommandObjectExpression::MultiLineExpressionCallback
case eInputReaderInterrupt:
cmd_object_expr->m_expr_lines.clear();
reader.SetIsDone (true);
+ if (!batch_mode)
{
StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
out_stream->Printf("%s\n", "Expression evaluation cancelled.");
OpenPOWER on IntegriCloud