summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp20
-rw-r--r--lldb/source/Commands/CommandObjectExpression.cpp16
2 files changed, 25 insertions, 11 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index a8c1631e1da..e8d43779e5f 100644
--- a/lldb/source/Commands/CommandObjectCommands.cpp
+++ b/lldb/source/Commands/CommandObjectCommands.cpp
@@ -929,7 +929,11 @@ CommandObjectCommandsAddRegex::InputReaderCallback (void *baton,
switch (notification)
{
case eInputReaderActivate:
- reader.GetDebugger().GetOutputStream().Printf("%s\n", "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:");
+ {
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream ();
+ out_stream->Printf("%s\n", "Enter regular expressions in the form 's/<regex>/<subst>/' and terminate with an empty line:");
+ out_stream->Flush();
+ }
break;
case eInputReaderReactivate:
break;
@@ -951,7 +955,9 @@ CommandObjectCommandsAddRegex::InputReaderCallback (void *baton,
Error error (add_regex_cmd->AppendRegexSubstitution (bytes_strref));
if (error.Fail())
{
- reader.GetDebugger().GetOutputStream().Printf("error: %s\n", error.AsCString());
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->Printf("error: %s\n", error.AsCString());
+ out_stream->Flush();
add_regex_cmd->InputReaderDidCancel ();
reader.SetIsDone (true);
}
@@ -959,9 +965,13 @@ CommandObjectCommandsAddRegex::InputReaderCallback (void *baton,
break;
case eInputReaderInterrupt:
- reader.SetIsDone (true);
- reader.GetDebugger().GetOutputStream().PutCString("Regular expression command creations was cancelled.\n");
- add_regex_cmd->InputReaderDidCancel ();
+ {
+ reader.SetIsDone (true);
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->PutCString("Regular expression command creations was cancelled.\n");
+ out_stream->Flush();
+ add_regex_cmd->InputReaderDidCancel ();
+ }
break;
case eInputReaderEndOfFile:
diff --git a/lldb/source/Commands/CommandObjectExpression.cpp b/lldb/source/Commands/CommandObjectExpression.cpp
index e43e9bf0eaa..9f2e79e1a67 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -195,11 +195,13 @@ CommandObjectExpression::MultiLineExpressionCallback
switch (notification)
{
case eInputReaderActivate:
- reader.GetDebugger().GetOutputStream().Printf("%s\n", "Enter expressions, then terminate with an empty line to evaluate:");
+ {
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->Printf("%s\n", "Enter expressions, then terminate with an empty line to evaluate:");
+ out_stream->Flush();
+ }
// Fall through
case eInputReaderReactivate:
- //if (out_fh)
- // reader.GetDebugger().GetOutputStream().Printf ("%3u: ", cmd_object_expr->m_expr_line_count);
break;
case eInputReaderDeactivate:
@@ -217,14 +219,16 @@ CommandObjectExpression::MultiLineExpressionCallback
if (bytes_len == 0)
reader.SetIsDone(true);
- //else if (out_fh && !reader->IsDone())
- // ::fprintf (out_fh, "%3u: ", cmd_object_expr->m_expr_line_count);
break;
case eInputReaderInterrupt:
cmd_object_expr->m_expr_lines.clear();
reader.SetIsDone (true);
- reader.GetDebugger().GetOutputStream().Printf("%s\n", "Expression evaluation cancelled.");
+ {
+ StreamSP out_stream = reader.GetDebugger().GetAsyncOutputStream();
+ out_stream->Printf("%s\n", "Expression evaluation cancelled.");
+ out_stream->Flush();
+ }
break;
case eInputReaderEndOfFile:
OpenPOWER on IntegriCloud