llvm-project/lldb/source
Fred Riss b6ae8937e0 [lldb/PlatformDarwin] Always delete destination file first in PutFile
Summary:
The default behavior of Platform::PutFile is to open the file and
truncate it if it already exists. This works fine and is a sensible
default, but it interacts badly with code-signing on iOS, as doing so
invalidates the signature of the file (even if the new content has a
valid code signature).

We have a couple tests which on purpose reload a different binary with
the same name. Those tests are currently broken because of the above
interaction.

This patch simply makes the Darwin platform unconditionally delete the
destination file before sending the new one to work around this issue.

Reviewers: jasonmolenda

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D76450
2020-03-23 14:34:17 -07:00
..
API [lldb/API] Make Launch(Simple) use args and env from target properties 2020-03-23 07:58:33 -07:00
Breakpoint [lldb][NFC] Move local variables near to their usage 2020-03-04 16:56:51 +03:00
Commands [lldb/Target] Rework the way the inferior environment is created 2020-03-23 07:58:34 -07:00
Core Internal expressions shouldn't increment the result variable numbering. 2020-03-23 13:30:37 -07:00
DataFormatters [DataFormatters] Add formatter for libc++ std::unique_ptr 2020-03-23 11:48:20 -07:00
Expression Internal expressions shouldn't increment the result variable numbering. 2020-03-23 13:30:37 -07:00
Host [Host] Remove some code that's not needed anymore. 2020-03-18 14:44:53 -07:00
Initialization [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
Interpreter [lldb] Update the current execution context at the beginning of tab completions 2020-03-06 10:44:00 -08:00
Plugins [lldb/PlatformDarwin] Always delete destination file first in PutFile 2020-03-23 14:34:17 -07:00
Symbol Add a verification mechanism to CompilerType. 2020-03-11 12:43:32 -07:00
Target Internal expressions shouldn't increment the result variable numbering. 2020-03-23 13:30:37 -07:00
Utility [lldb/Reproducers] Intercept the FindProcesses API 2020-03-13 09:31:35 -07:00
CMakeLists.txt Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well. 2020-01-16 19:04:08 -05:00
lldb.cpp [lldb] Fix version string when using LLDB_REVISION but not LLDB_REPOSITORY 2020-02-20 10:07:50 -08:00