From owner-freebsd-hackers@FreeBSD.ORG Sat May 8 11:39:58 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 160D4106566C for ; Sat, 8 May 2010 11:39:58 +0000 (UTC) (envelope-from alip@exherbo.org) Received: from bach.exherbo.org (bach.exherbo.org [78.47.197.147]) by mx1.freebsd.org (Postfix) with ESMTP id CE33C8FC1E for ; Sat, 8 May 2010 11:39:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=harikalardiyari ident=alip) by bach.exherbo.org with esmtp (Exim 4.69) (envelope-from ) id 1OAhzy-0005ts-5J for freebsd-hackers@freebsd.org; Sat, 08 May 2010 11:15:10 +0000 Date: Sat, 8 May 2010 14:15:09 +0300 From: Ali Polatel To: freebsd-hackers@freebsd.org Message-ID: <20100508111509.GB8186@harikalardiyari> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mojUlQ0s9EVzWg2t" Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Subject: Ability to tell the difference between normal and syscall traps X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 May 2010 11:39:58 -0000 --mojUlQ0s9EVzWg2t Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Does FreeBSD's ptrace have a way to tell the difference between normal traps and those caused by a system call? On Linux=B9 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. =B9: http://linux.die.net/man/2/ptrace --=20 Regards, Ali Polatel --mojUlQ0s9EVzWg2t Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEABECAAYFAkvlR70ACgkQQU4yORhF8iCx3gCgpUf/8eYvPKBnfN8onbzuhPGw 66sAoLIjdjLdq33XBiIy+9p8j/3DxOAA =yN3P -----END PGP SIGNATURE----- --mojUlQ0s9EVzWg2t--