Support for truncate/append on log files
authorPavel Labath <labath@google.com>
Fri, 20 Mar 2015 09:43:20 +0000 (09:43 +0000)
committerPavel Labath <labath@google.com>
Fri, 20 Mar 2015 09:43:20 +0000 (09:43 +0000)
commit8ac06996bf6e602888692df1836eeec02966db16
tree82d7c0738411b864f679e09f333b382741b9094f
parent0068cb2499653e8874c2a24d3efbb0b1c0871a91
Support for truncate/append on log files

Summary:
Presently, if a log file already exists, lldb simply starts overwriting bits of it, without
truncating or anything. This patch makes it use eFileOptionFileTruncate by default. It also adds
an --append option, which will append to the file without truncating. A test is included.

Reviewers: clayborg

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D8450

llvm-svn: 232801
lldb/include/lldb/Core/Log.h
lldb/include/lldb/Core/StreamFile.h
lldb/source/Commands/CommandObjectLog.cpp
lldb/source/Core/Debugger.cpp
lldb/source/Core/StreamFile.cpp
lldb/test/logging/TestLogging.py