regular user can't debug program

today, I.just compile a hello world program, and use lldb or gdb ,I can't. debug it ,.it said process launch failed. child trace failed, then I use root trying to debug it,it could debug with root user. what's wrong
 
The similar thread solved by sysctl security.bsd.unprivileged_proc_debug=1
Code:
sysctl -d security.bsd.unprivileged_proc_debug
security.bsd.unprivileged_proc_debug: Unprivileged processes may use process debugging facilities
 
Back
Top