I'm having trouble running a remote gdb becuase the attached process is already being traced.
I run:
gdbserver localhost:12345 --attach 142
But I'm told process 142 is already traced by process 127 (pid 127 belongs to bash, where I run).
The solutions online advised doing the following:
- echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
- edit /etc/sysctl.d/10-ptrace.conf and set kernel.yama.ptrace_scope = 0
I've run both successfully, but I still get the error message of process is already traced by another process.
Anything?