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