Debugging init process.
Daniel O'Connor
doconnor at gsoft.com.au
Tue Mar 10 18:40:03 PDT 2009
On Wednesday 11 March 2009 06:43:50 pluknet wrote:
> 2009/3/10 vasanth raonaik <vasanth.raonaik at gmail.com>:
> > Hello Team,
> >
> > I need to debug init process. I am not able to attach init to gdb and it
> > throws
>
> That is because init is a system process, which you cannot trace by design
> (see ptrace(2)).
Interesting, but it doesn't really help him debug it ;)
Unless there is some other way around it you can stop the kernel making it a
system process by editing /usr/src/sys/kern/init_main.c around line 730 (in
create_init).
Although some signal code seems to specialcase PID 1 so maybe that won't work
either..
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090311/01ca3c39/attachment.pgp
More information about the freebsd-hackers
mailing list