Could not attach to process (pid). 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
使用ddd調試時碰到如下錯誤,解決方案:
切換到root用戶
vi /etc/sysctl.d/10-ptrace.conf
將
kernel.yama.ptrace_scope = 1
修改爲
kernel.yama.ptrace_scope = 0