diff options
author | Sean Callanan <scallanan@apple.com> | 2010-06-23 21:28:25 +0000 |
---|---|---|
committer | Sean Callanan <scallanan@apple.com> | 2010-06-23 21:28:25 +0000 |
commit | 4be3990f3be887fbe5f4291c0447d39c8a64200a (patch) | |
tree | d61daffd88c1956944c0217cbc07c282e6cff42a /lldb/source/Commands/CommandObjectLog.cpp | |
parent | 3183dd569290c89aed4558ef921e33a1833ec6ef (diff) | |
download | bcm5719-llvm-4be3990f3be887fbe5f4291c0447d39c8a64200a.tar.gz bcm5719-llvm-4be3990f3be887fbe5f4291c0447d39c8a64200a.zip |
Fixed the log streams for logs that output to
standard output, resolving a crasher.
llvm-svn: 106682
Diffstat (limited to 'lldb/source/Commands/CommandObjectLog.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectLog.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
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("<lldb.debugger>"); - 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 { |