aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectCommands.cpp
diff options
context:
space:
mode:
authorCaroline Tice <ctice@apple.com>2011-06-15 19:35:17 +0000
committerCaroline Tice <ctice@apple.com>2011-06-15 19:35:17 +0000
commit15356e7f4f8eb43cb290d0d8cb78bb5d08688310 (patch)
treec6c851e8e6817da3016aa4d5117714c05b906d4a /lldb/source/Commands/CommandObjectCommands.cpp
parent59d8c6071926f1510a0c4dbddba6e9d9f5ef544a (diff)
downloadllvm-15356e7f4f8eb43cb290d0d8cb78bb5d08688310.zip
llvm-15356e7f4f8eb43cb290d0d8cb78bb5d08688310.tar.gz
llvm-15356e7f4f8eb43cb290d0d8cb78bb5d08688310.tar.bz2
Replace direct uses of the Debugger's output stream with
uses of the asynchronous stream. llvm-svn: 133076
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectCommands.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp
index a8c1631..e8d4377 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: