From 15356e7f4f8eb43cb290d0d8cb78bb5d08688310 Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Wed, 15 Jun 2011 19:35:17 +0000 Subject: Replace direct uses of the Debugger's output stream with uses of the asynchronous stream. llvm-svn: 133076 --- lldb/source/Commands/CommandObjectExpression.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'lldb/source/Commands/CommandObjectExpression.cpp') 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: -- cgit v1.2.3