GDB no workie? Permission problem?
Ronald F. Guilmette
rfg at tristatelogic.com
Mon Aug 10 17:01:12 UTC 2020
Just ran gdb, which I haven't done for awhile, to find a small
bug in one of my own C programs.
Set two breakpoints successfully and then tried to r(un) the
program to be debugged. (This was all being done under my
own personal non-priviliged account.)
Immediately got something very unexpected:
warning: Could not trace the inferior process.
warning: ptrace: Operation not permitted
During startup program exited with code 127.
I su'd to root and tried again, and of course now it works.
So, um, what the hay? What goes on here?
I seem to vaguely recall some "security" options being presented
at system install time, and I do believe one of these had to do
with ptrace. So I guess that I must have made the Wrong Choice
with respect to that one. OK. Fine. Now how do I fix that misake
on my part, short of re-installing the whole bloody system?
(I'm looking at the man page for ptrace(2) and it is not helpful
on this question.)
More information about the freebsd-questions