From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2996 invoked by alias); 7 Nov 2008 12:12:19 -0000 Received: (qmail 2932 invoked by uid 22791); 7 Nov 2008 12:12:17 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Nov 2008 12:11:30 +0000 Received: (qmail 306 invoked from network); 7 Nov 2008 12:11:25 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 7 Nov 2008 12:11:25 -0000 From: Pedro Alves To: =?iso-8859-1?q?S=E9rgio_Durigan_J=FAnior?= Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part Date: Fri, 07 Nov 2008 12:12:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org References: <1225773079.24532.52.camel@miki> <200811041617.10621.pedro@codesourcery.com> <1226028565.32321.86.camel@miki> In-Reply-To: <1226028565.32321.86.camel@miki> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200811071206.31472.pedro@codesourcery.com> 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/msg00122.txt.bz2 On Friday 07 November 2008 03:29:25, S=E9rgio Durigan J=FAnior wrote: > Ok, I'll try to put the syscall_state in 'struct lwp_info'. Honestly, I > don't remember now why I've chosen to put this variable inside > thread_info, but of course you're way more capable of telling me how to > make my design be more clever (and look more like GDB) :-). Nah, you're doing yourself just fine. :-) An alternative would be to add a new TARGET_WAITKIND_SYSCALL, for targets that don't distinguish entry/exit, but this leaves me yet to wonder: 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. --=20 Pedro Alves