Ability to tell the difference between normal and syscall traps

Ali Polatel alip at exherbo.org
Sat May 8 11:39:58 UTC 2010


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

-- 
Regards,
Ali Polatel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20100508/bfd5e8fe/attachment.pgp


More information about the freebsd-hackers mailing list