[all-commits] [llvm/llvm-project] efc6d3: [lldb] Fix write only file action to truncate the ...
Wanyi via All-commits
all-commits at lists.llvm.org
Tue Oct 29 11:23:13 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: efc6d33be9f4b4d0f0e8d3d5f198f2616b75792b
https://github.com/llvm/llvm-project/commit/efc6d33be9f4b4d0f0e8d3d5f198f2616b75792b
Author: Wanyi <kusmour at gmail.com>
Date: 2024-10-29 (Tue, 29 Oct 2024)
Changed paths:
M lldb/source/Host/common/FileAction.cpp
M lldb/test/API/commands/settings/TestSettings.py
M lldb/test/API/python_api/process/io/TestProcessIO.py
M lldb/unittests/Host/FileActionTest.cpp
M llvm/docs/ReleaseNotes.md
Log Message:
-----------
[lldb] Fix write only file action to truncate the file (#112657)
When `FileAction` opens file with write access, it doesn't clear the
file nor append to the end of the file if it already exists. Instead, it
writes from cursor index 0.
For example, by using the settings `target.output-path` and
`target.error-path`, lldb will redirect process stdout/stderr to files.
It then calls this function to write to the files which the above
symptoms appear.
## Test
- Added unit test checking the file flags
- Added 2 api tests checking
- File content overwritten if the file path already exists
- Stdout and stderr redirection to the same file doesn't change its
behavior
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list