llvm/lldb/test
Pavel Labath b15b1421bc [lldb/test] Don't use preexec_fn for launching inferiors
As the documentation states, using this is not safe in multithreaded
programs, and I have traced it to a rare deadlock in some of the tests.

The reason this was introduced was to be able to attach to a program
from the very first instruction, where our usual mechanism of
synchronization -- waiting for a file to appear -- does not work.

However, this is only needed for a single test
(TestGdbRemoteAttachWait) so instead of doing this everywhere, I create
a bespoke solution for that single test. The solution basically
consists of outsourcing the preexec_fn code to a separate (and
single-threaded) shim process, which enables attaching and then executes
the real program.

This pattern could be generalized in case we needed to use it for other
tests, but I suspect that we will not be having many tests like this.

This effectively reverts commit
a997a1d7fb.
2022-07-01 14:36:01 +02:00
..
API [lldb/test] Don't use preexec_fn for launching inferiors 2022-07-01 14:36:01 +02:00
Shell Fix PDB/func-symbols.test for Arm/Windows 2022-06-30 17:58:19 +04:00
Unit
CMakeLists.txt [lldb] Fix cross compiling on macOS 2022-05-28 00:53:25 +03:00
lit.cfg.py
lit.site.cfg.py.in