diff options
author | Jim Ingham <jingham@apple.com> | 2011-02-19 02:53:09 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-02-19 02:53:09 +0000 |
commit | 85e8b8149243052c721c97ad97ebda82867071a4 (patch) | |
tree | 25a82ef1308098b9affee9a484358d849764580f /lldb/source/Interpreter/CommandInterpreter.cpp | |
parent | 21f347e7296e9aeda3a6880fb576cf01f85d8de7 (diff) | |
download | bcm5719-llvm-85e8b8149243052c721c97ad97ebda82867071a4.tar.gz bcm5719-llvm-85e8b8149243052c721c97ad97ebda82867071a4.zip |
- Changed all the places where CommandObjectReturn was exporting a StreamString to just exporting
a Stream, and then added GetOutputData & GetErrorData to get the accumulated data.
- Added a StreamTee that will tee output to two provided lldb::StreamSP's.
- Made the CommandObjectReturn use this so you can Tee the results immediately to
the debuggers output file, as well as saving up the results to return when the command
is done executing.
- HandleCommands now uses this so that if you have a set of commands that continue the target
you will see the commands come out as they are processed.
- The Driver now uses this to output the command results as you go, which makes the interface
more reactive seeming.
llvm-svn: 126015
Diffstat (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp')
-rw-r--r-- | lldb/source/Interpreter/CommandInterpreter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index b6cd3c73818..a6906709340 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -1518,6 +1518,8 @@ CommandInterpreter::HandleCommands (StringList &commands, { size_t num_lines = commands.GetSize(); CommandReturnObject tmp_result; + tmp_result.SetImmediateOutputStream (result.GetImmediateOutputStream ()); + tmp_result.SetImmediateErrorStream (result.GetImmediateErrorStream ()); // If we are going to continue past a "continue" then we need to run the commands synchronously. // Make sure you reset this value anywhere you return from the function. @@ -1554,7 +1556,7 @@ CommandInterpreter::HandleCommands (StringList &commands, if (print_results) { if (tmp_result.Succeeded()) - result.AppendMessageWithFormat("%s", tmp_result.GetOutputStream().GetData()); + result.AppendMessageWithFormat("%s", tmp_result.GetOutputData()); } if (!success || !tmp_result.Succeeded()) @@ -1572,7 +1574,7 @@ CommandInterpreter::HandleCommands (StringList &commands, result.AppendMessageWithFormat ("Command #%d '%s' failed with error: %s.\n", idx + 1, cmd, - tmp_result.GetErrorStream().GetData()); + tmp_result.GetErrorData()); } } |