This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/3] Give user guidance on debugging with yama
- From: Doug Evans <dje at google dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 28 Sep 2015 19:22:02 +0000
- Subject: [PATCH 0/3] Give user guidance on debugging with yama
- Authentication-results: sourceware.org; auth=none
Hi.
With the introduction of yama, users are now faced with failure modes
that they're not familiar with. Fixing the issue requires time,
and it would be helpful if gdb could point the user in the right direction.
E.g.,
(gdb) attach 15644
Attaching to program: /home/dje/forever.x64, process 15644
Cannot attach to process 15644: Operation not permitted (1)
becomes
(gdb) attach 15644
Attaching to program: /home/dje/forever.x64, process 15644
Cannot attach to process 15644: Operation not permitted (1)
It looks like yama ptrace_scope is enabled.
See /proc/sys/kernel/yama/ptrace_scope.
You can lift the restriction with:
sudo sysctl -w kernel.yama.ptrace_scope=0
[after first checking that ptrace_scope is likely the cause]