I try to develop my own debugger. I used in child space the code:
//child process asks the OS kernel to let its parent trace it
if (ptrace(PTRACE_TRACEME, 0, NULL, NULL) == -1) {
perror("ptrace_traceme");
exit(EXIT_FAILURE);
}
but I got the error:
ptrace_traceme: Operation not permitted
using Ubuntu 22.04.
I tried two ways:
/proc/sys/kernel/yama/ptrace_scope change to 1
and:
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
they didn't work, do you have another way or are you faced with that issue? Thanks for your helps!