NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Attaching gdb session to a service launched from rc.d


I am having trouble debugging with gdb a service that I am launching with rc.d:

When going `attach <pid>' in gdb (running as the same user as the user under which the service is running.)

I get :

(gdb) attach 26536
Attaching to program: /home/german/work/supportTools/Emailizer/Emailizer, process 26536
ptrace: Device busy.

Is it because I incorrectly start my service? (I do a fork.)

What's crazy is:

if I launch my service manually: (going `/etc/rc.d/mail start'.)
then I can attach and inspect, but I can't change threads.

If I restart my station (and the service autostart)
then I can't even attach.

Ok maybe it's not craazy, especially for the one who would know the internal reasons why this is.

Anyways, all help is welcome.
I read avidly the Chapter 7 of NetBSD Guide and skimmed the PDF referenced in it for all occurrences of the word `user' but did not find an answer to my question :|.

Thank you!



Home | Main Index | Thread Index | Old Index