debugger icon indicating copy to clipboard operation
debugger copied to clipboard

Fix attach unit test on Linux

Open xusheng6 opened this issue 3 years ago • 0 comments

On Linux, when gdb is running as non-root, it cannot attach to other processes with a pid. It is related to /proc/sys/kernel/yama/ptrace_scope stuff.

We need to either use PTRACE_TRACEME or prctl(PR_SET_PTRACER, debugger, ...) to make the attaching succeed.

xusheng6 avatar Apr 19 '22 14:04 xusheng6