debugger
debugger copied to clipboard
Fix attach unit test on Linux
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.