From 4be3990f3be887fbe5f4291c0447d39c8a64200a Mon Sep 17 00:00:00 2001 From: Sean Callanan Date: Wed, 23 Jun 2010 21:28:25 +0000 Subject: Fixed the log streams for logs that output to standard output, resolving a crasher. llvm-svn: 106682 --- lldb/source/Commands/CommandObjectLog.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'lldb/source/Commands/CommandObjectLog.cpp') diff --git a/lldb/source/Commands/CommandObjectLog.cpp b/lldb/source/Commands/CommandObjectLog.cpp index 5616fb1a064..a63e2ed7890 100644 --- a/lldb/source/Commands/CommandObjectLog.cpp +++ b/lldb/source/Commands/CommandObjectLog.cpp @@ -27,6 +27,7 @@ #include "lldb/Core/Timer.h" #include "lldb/Core/Debugger.h" +#include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Symbol/LineTable.h" @@ -94,16 +95,7 @@ public: if (m_options.log_file.empty()) { - std::string log_file(""); - LogStreamMap::iterator pos = m_log_streams.find(log_file); - if (pos == m_log_streams.end()) - { - log_stream_sp = Log::GetStreamForSTDOUT (); - if (log_stream_sp) - m_log_streams[log_file] = log_stream_sp; - } - else - log_stream_sp = pos->second; + log_stream_sp.reset(new StreamFile(interpreter.GetDebugger().GetOutputFileHandle())); } else { -- cgit v1.2.3