When using gdb to attach to the process. It shows
Could not attach to process. If your uid matches the uid of the target process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
As root I use
echo 0 >/proc/sys/kernel/yama/ptrace_scope;
then it shows:
bash: /proc/sys/kernel/yama/ptrace_scope: Read-only file system
How can I fix this problem?
The content of
kernel.yama.ptrace_scope = 0