forked from OSchip/llvm-project
![]() Linux systems can be configured (and most of them are configured that way) to disable attaching to unrelated processes, /unless/ those processes explicitly allow that. Our test inferiors do that by explicitly calling prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) (a.k.a., lldb_enable_attach). This requires additional synchronization to ensure that the test does not attempt attach before that statement is executed. This is working fine (albeit cumbersome) for most tests but TestGdbRemoteAttachWait is special in that it wants to start the inferior _after_ issuing the attach request. This means that the usual synchronization method does not work. This patch introduces a different solution -- enable attaching in the test harness, before the process is launched. Besides fixing this problem, this is also better because it avoids the need to add special code to each attach test (which is a common error). One gotcha here is that it won't work for remote test suites, as we don't control launching there. However, we could add a similar option to lldb-platform, or require that lldb-platform itself is started with attaching enabled. At that point we could delete all lldb_enable_attach logic. |
||
---|---|---|
.. | ||
bindings | ||
cmake | ||
docs | ||
examples | ||
include/lldb | ||
packages/Python | ||
resources | ||
scripts | ||
source | ||
test | ||
third_party/Python/module | ||
tools | ||
unittests | ||
utils | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
CMakeLists.txt | ||
CODE_OWNERS.txt | ||
LICENSE.TXT | ||
use_lldb_suite_root.py |