From d0f89cd721df6943e36e4bbd9715317b08b7f578 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Mon, 11 Jan 2016 10:24:50 +0000 Subject: Centralize the handling of attach permissions on linux in tests Summary: On linux we need the process to give us special permissions before we can attach to it. Previously, the code for this was copied into every file that needed it. This moves the code to a central place to reduce code duplication. Reviewers: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D15992 llvm-svn: 257319 --- lldb/packages/Python/lldbsuite/test/README-TestSuite | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/README-TestSuite') diff --git a/lldb/packages/Python/lldbsuite/test/README-TestSuite b/lldb/packages/Python/lldbsuite/test/README-TestSuite index 6df4d7bd7be..70e4c91b889 100644 --- a/lldb/packages/Python/lldbsuite/test/README-TestSuite +++ b/lldb/packages/Python/lldbsuite/test/README-TestSuite @@ -157,3 +157,10 @@ o Writing test cases: then use SBInterpreter::HandleCommand to run the command. You get the full result text from the command in the command return object, and all the part where you are driving the debugger to the point you want to test will be more robust. + +o Attaching in test cases: + + If you need to attach to inferiors in your tests, you must make sure the inferior calls + lldb_enable_attach(), before the debugger attempts to attach. This function performs any + platform-specific processing needed to enable attaching to this process (e.g., on Linux, we + execute prctl(PR_SET_TRACER) syscall to disable protections present in some Linux systems). -- cgit v1.2.3