From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10105 invoked by alias); 7 Nov 2008 13:30:33 -0000 Received: (qmail 10092 invoked by uid 22791); 7 Nov 2008 13:30:33 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Nov 2008 13:29:51 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0C2D010D2A; Fri, 7 Nov 2008 13:29:49 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 382F310A09; Fri, 7 Nov 2008 13:29:48 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KyRPH-0001cM-5p; Fri, 07 Nov 2008 08:29:47 -0500 Date: Fri, 07 Nov 2008 13:30:00 -0000 From: Daniel Jacobowitz To: Pedro Alves Cc: =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= , gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part Message-ID: <20081107132947.GA5913@caradoc.them.org> Mail-Followup-To: Pedro Alves , =?iso-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= , gdb-patches@sourceware.org References: <1225773079.24532.52.camel@miki> <200811041617.10621.pedro@codesourcery.com> <1226028565.32321.86.camel@miki> <200811071206.31472.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200811071206.31472.pedro@codesourcery.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00123.txt.bz2 On Fri, Nov 07, 2008 at 12:06:31PM +0000, Pedro Alves wrote: > If there any other way to distinguish entry/exit other than a toggle? > Toggles are prone to be fallible. E.g., if you *attach* to a program that > is doing a long syscall, and then start tracing that syscall, > is it possible that you hit the syscall exit first, so your toggle will > be inverted? That is, you'll report a syscall entry, when in fact, it > was a syscall exit, and so on for the following syscalls of the same lwp. There's code in strace to sort this out, though I do not remember precisely how it works. Yes, in current kernels we are limited to a toggle. There's PTRACE_O_TRACESYSGOOD (which I presume the patch uses); that marks syscall traps specially, but does not differentiate entry and exit. -- Daniel Jacobowitz CodeSourcery