无法在ubuntu中使用gdb进行调试

时间:2014-03-30 19:54:14

标签: c++ qt debugging gdb qt-creator

每次我想开始调试时,Qt创建者都会抛出一个错误。这是错误:

ptrace: Operation not permitted.

Could not attach to the process. Make sure no other debugger traces this process.
Check the settings of
/proc/sys/kernel/yama/ptrace_scope
For more details, see /etc/sysctl.d/10-ptrace.conf

我已经搜索了错误消息并得到了一些关于内核中的错误的结果但是我能够在命令行中运行gdb,所以我认为它与kernel / gdb无关。

导致此错误的原因是什么?

1 个答案:

答案 0 :(得分:0)

我刚做了一些研究,并在某个地方找到了解决方案。事实证明/proc/sys/kernel/yama/ptrace_scope设置为1.我将其更改为0后,问题就消失了。

可以找到ptrace的解释herehere,正如Merlin069所说。

相关问题