summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-02-19 02:53:09 +0000
committerJim Ingham <jingham@apple.com>2011-02-19 02:53:09 +0000
commit85e8b8149243052c721c97ad97ebda82867071a4 (patch)
tree25a82ef1308098b9affee9a484358d849764580f /lldb/source/Commands/CommandObjectBreakpointCommand.cpp
parent21f347e7296e9aeda3a6880fb576cf01f85d8de7 (diff)
downloadbcm5719-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/Commands/CommandObjectBreakpointCommand.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectBreakpointCommand.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
index edca869e48a..f88264b6c1b 100644
--- a/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
+++ b/lldb/source/Commands/CommandObjectBreakpointCommand.cpp
@@ -790,15 +790,19 @@ CommandObjectBreakpointCommand::BreakpointOptionsCallbackFunction
BreakpointOptions::CommandData *data = (BreakpointOptions::CommandData *) baton;
StringList &commands = data->user_source;
-
+
if (commands.GetSize() > 0)
{
- CommandReturnObject result;
if (context->exe_ctx.target)
{
-
+ CommandReturnObject result;
Debugger &debugger = context->exe_ctx.target->GetDebugger();
-
+ // Rig up the results secondary output stream to the debugger's, so the output will come out synchronously
+ // if the debugger is set up that way.
+
+ result.SetImmediateOutputFile (debugger.GetOutputFile().GetStream());
+ result.SetImmediateErrorFile (debugger.GetErrorFile().GetStream());
+
bool stop_on_continue = true;
bool echo_commands = false;
bool print_results = true;
@@ -810,14 +814,6 @@ CommandObjectBreakpointCommand::BreakpointOptionsCallbackFunction
echo_commands,
print_results,
result);
- // Now dump the commands to the debugger's output:
- if (!result.Succeeded())
- {
- debugger.GetErrorFile().Printf ("%s", result.GetErrorStream().GetData());
- }
-
- debugger.GetOutputFile().Printf ("%s", result.GetOutputStream().GetData());
-
}
}
return ret_value;
OpenPOWER on IntegriCloud