Kostik Belousov yazmış:
> On Sat, May 08, 2010 at 02:15:09PM +0300, Ali Polatel wrote:
> > Does FreeBSD's ptrace have a way to tell the difference between normal
> > traps and those caused by a system call?
> > 
> > On Linux? this is possible by passing PTRACE_O_TRACESYSGOOD option to the
> > ptrace request PTRACE_SETOPTIONS which makes the kernel set bit 7 in the
> > syscall number when delivering system call traps,
> > (i.e., deliver (SIGTRAP | 0x80)).
> > 
> > I'm not sure if this is possible on FreeBSD. PT_LWPINFO request looks
> > related but can't be sure.
> > 
> > ?: http://linux.die.net/man/2/ptrace
> 
> There is already procfs(5)-based interface to get a reason for stop.
> Look at the ioctl PIOCSTATUS. Yes, you have to mount procfs.
> 
> The interface can be lifted to ptrace(2), but I think using the capacity
> of procfs is not wrong there.

Thanks, although not optimal, this solution works for me :-)

-- 
Regards,
Ali Polatel

Attachment: pgpBbbTrPPIN3.pgp
Description: PGP signature

Reply via email to