gdb attach (pid)没有权限

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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章