llvm/lldb
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
..
bindings Add LoadTraceFromFile to SBDebugger and SBTrace 2022-06-20 11:54:47 -07:00
cmake [lldb] Disable modules in Apple-lldb-base 2022-05-24 17:17:14 -07:00
docs [lldb] Cleanup Python API reference files after building the docs 2022-06-16 16:30:49 -07:00
examples [lldb/crashlog] Show help when the command is called without any argument 2022-06-10 13:44:43 -07:00
include/lldb [PATCH] [lldb-server] Skip shared regions for memory allocation 2022-07-01 13:45:42 +08:00
packages/Python/lldbsuite [lldb/test] Don't use preexec_fn for launching inferiors 2022-07-01 14:36:01 +02:00
resources
scripts
source [lldb/dyld-posix] Avoid reading the module list in inconsistent states 2022-07-01 08:08:22 +02:00
test [lldb/test] Don't use preexec_fn for launching inferiors 2022-07-01 14:36:01 +02:00
third_party/Python/module
tools [lldb] Add support for specifying a log handler 2022-06-24 18:24:00 -07:00
unittests [PATCH] [lldb-server] Skip shared regions for memory allocation 2022-07-01 13:45:42 +08:00
utils
.clang-format
.clang-tidy [LLDB] Applying clang-tidy modernize-use-override over LLDB 2022-04-22 13:29:47 -07:00
.gitignore
CMakeLists.txt
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py