can single step as root but debugger halts if not root

CodeLite installation/troubleshooting forum
tootall79@gmail.com
CodeLite Curious
Posts: 8
Joined: Tue Dec 02, 2014 12:48 pm
Genuine User: Yes
IDE Question: c++
Contact:

can single step as root but debugger halts if not root

Post by tootall79@gmail.com »

codelite 10 on freebsd 11 all working great if logged in as root. cannot start LLDB thread when logged in as tim. When logged in as tim
codelite works FINE in all other ways except single step debug. Projects compiles and run both release and debug and perform as designed.

Here is debug log for WORKING, followed by NOT WORKING
WORKING
here I am logged in as root
[18:25:04:344 DBG] codelite-lldb: running debugger. tty=/tmp/pts6
[18:25:04:344 DBG] codelite-lldb: target working directory is set to: /media/FATSD29/Houston/wkspc/free/dev/clangCon/Debug
[18:25:04:344 DBG] codelite-lldb: Arguments are set to:
[18:25:04:344 DBG] codelite-lldb: LLDBHandlerThread: eStateLaunching
[18:25:04:344 DBG] codelite-lldb: LLDBHandlerThread: eStateLaunching
[18:25:04:345 DBG] codelite-lldb: LLDBHandlerThread: eStateStopped - first time
[18:25:04:345 DBG] codelite-lldb: NotifyRunning. Target Process ID 5397
[18:25:04:345 DBG] codelite-lldb: NotifyStoppedOnFirstEntry()
[18:25:04:345 DBG] CODELITE>> Applying breakpoints...
[18:25:04:345 DBG] CODELITE>> continue...
from here single stepping works as expected.

NOT WORKING
here I am logged in as tim
[18:36:28:321 DBG] codelite-lldb: running debugger. tty=/tmp/pts4
[18:36:28:321 DBG] codelite-lldb: target working directory is set to: /media/FATSD29/Houston/wkspc/fbsd/SingleStepFix/clangConsole/Debug
[18:36:28:321 DBG] codelite-lldb: Arguments are set to:
[18:36:28:321 DBG] codelite-lldb: error while launching process. process launch failed: Child ptrace failed.
[18:36:28:321 DBG] codelite-lldb: NotifyExited called
[18:36:29:118 DBG] codelite: ClearBreakpointDeletionQueue called
[18:36:29:118 DBG] codelite: InvalidateBreakpoints called
[18:36:29:170 DBG] ZombieReaperPOSIX: process 5509 exited with status code 9

thanks for any suggestions!
tim
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: can single step as root but debugger halts if not root

Post by eranif »

It looks like that the normal user has no permissions to ptrace the debugee process.
See similar questions asked on Stack Overflow: https://stackoverflow.com/questions/206 ... -to-attach
Make sure you have read the HOW TO POST thread
tootall79@gmail.com
CodeLite Curious
Posts: 8
Joined: Tue Dec 02, 2014 12:48 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: can single step as root but debugger halts if not root

Post by tootall79@gmail.com »

Hi Eran, thanks! I had system hardening turned on, and it can be reversed easily enough

https://forums.freebsd.org/threads/59604/

codelite is GREAT! :D https://forums.freebsd.org/threads/59604/

SOLVED but I don't see how to officially mark it.
Post Reply