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

C++ 无法在ubuntu中使用gdb进行调试,c++,qt,debugging,gdb,qt-creator,C++,Qt,Debugging,Gdb,Qt Creator,每次我想开始调试时,Qt creator都会抛出一个错误。以下是错误: 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-pt

每次我想开始调试时,Qt creator都会抛出一个错误。以下是错误:

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
我在谷歌上搜索了错误消息,得到了一些关于内核bug的结果,但我能够在命令行中运行
gdb
,所以我认为它与内核/gdb无关


这个错误的原因是什么?

我只是做了一些研究,在某个地方找到了解决方案。结果是
/proc/sys/kernel/yama/ptrace_scope
被设置为1。我将其更改为0后,问题消失了


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

这是什么平台?@Merlin069好吧,它是ubuntu 12.04和qt creator 3.0.1版。内核版本是3.11ptrace_,这里解释范围:这里:没问题。如果你满意的话,我建议你将这个问题标记为已回答;O)