diff options
author | Pavel Labath <labath@google.com> | 2015-03-20 09:43:20 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2015-03-20 09:43:20 +0000 |
commit | 8ac06996bf6e602888692df1836eeec02966db16 (patch) | |
tree | 82d7c0738411b864f679e09f333b382741b9094f /lldb/source/Core/StreamFile.cpp | |
parent | 0068cb2499653e8874c2a24d3efbb0b1c0871a91 (diff) | |
download | bcm5719-llvm-8ac06996bf6e602888692df1836eeec02966db16.tar.gz bcm5719-llvm-8ac06996bf6e602888692df1836eeec02966db16.zip |
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
Diffstat (limited to 'lldb/source/Core/StreamFile.cpp')
-rw-r--r-- | lldb/source/Core/StreamFile.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Core/StreamFile.cpp b/lldb/source/Core/StreamFile.cpp index 9f8dd629e3d..8c9700c6dcb 100644 --- a/lldb/source/Core/StreamFile.cpp +++ b/lldb/source/Core/StreamFile.cpp @@ -54,6 +54,13 @@ StreamFile::StreamFile (const char *path) : { } +StreamFile::StreamFile (const char *path, + uint32_t options, + uint32_t permissions) : + Stream(), + m_file(path, options, permissions) +{ +} StreamFile::~StreamFile() { |