[Lldb-commits] [lldb] [lldb][Windows] Enforce exec permission using Platform::Install() from Windows host (PR #91887)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Mon May 13 05:40:59 PDT 2024


slydiman wrote:

Target::Install() and Platform::Install() are used indirectly in many cases. For example look at the test `lldb/test/API/python_api/hello_world/TestHelloWorld.py`. target.LaunchSimple() uses Target::Install() and there is no problem with the exec permission. spawnSubprocess() uses the class _RemoteProcess and finally Platform::Install(). spawnSubprocess() is used in 27 test files and they are failed is case of Windows host and Linux target.
> Target::Install does (i.e., set the execute flag unconditionally)
Target::Install() checks is_main_executable enumerating all modules.
But Target::Install()'s logic is not applicable in most cases where Platform::Install() is used.
I think `Target::Install` is not a workaround and we cannot remove this code.
I'd say this patch is a workaround for the case host=Windows and target!=Windows. We can even add a comment FIXME:... if someone will have an idea how to fix it better way.

https://github.com/llvm/llvm-project/pull/91887


More information about the lldb-commits mailing list