From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12998 invoked by alias); 4 Nov 2008 21:55:58 -0000 Received: (qmail 12894 invoked by uid 22791); 4 Nov 2008 21:55:58 -0000 X-Spam-Check-By: sourceware.org Received: from igw1.br.ibm.com (HELO igw1.br.ibm.com) (32.104.18.24) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 04 Nov 2008 21:55:12 +0000 Received: from d24relay01.br.ibm.com (unknown [9.8.31.16]) by igw1.br.ibm.com (Postfix) with ESMTP id 6C31732C0E5 for ; Tue, 4 Nov 2008 19:53:05 -0200 (BRDT) Received: from d24av02.br.ibm.com (d24av02.br.ibm.com [9.18.232.47]) by d24relay01.br.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id mA4Lsmhe2900196 for ; Tue, 4 Nov 2008 18:54:48 -0300 Received: from d24av02.br.ibm.com (loopback [127.0.0.1]) by d24av02.br.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id mA4Lt8FY008293 for ; Tue, 4 Nov 2008 19:55:08 -0200 Received: from [9.8.11.66] ([9.8.11.66]) by d24av02.br.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id mA4Lt6x1008118; Tue, 4 Nov 2008 19:55:07 -0200 Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part From: Thiago Jung Bauermann To: tromey@redhat.com Cc: =?ISO-8859-1?Q?S=E9rgio?= Durigan =?ISO-8859-1?Q?J=FAnior?= , gdb-patches@sourceware.org In-Reply-To: References: <1225773079.24532.52.camel@miki> Content-Type: text/plain; charset=utf-8 Date: Tue, 04 Nov 2008 21:55:00 -0000 Message-Id: <1225835702.20764.15.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 8bit 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/msg00056.txt.bz2 El mar, 04-11-2008 a las 10:56 -0700, Tom Tromey escribió: > Sérgio> + for (i = 0; i < nargs; i++) > Sérgio> + create_syscall_event_catchpoint (tempflag, syscalls_numbers[i], > Sérgio> + &catch_syscall_breakpoint_ops); > > This makes a separate catchpoint for each argument to "catch syscall". > > I think it would be more useful to make a single catchpoint. A single > catchpoint gives the user a way to set commands, conditions, etc, for > a whole range of syscalls at once. It is analogous, I think, to > having a breakpoint with multiple locations. > > What do you think of that? I think a better analogy is a breakpoint with a condition. Ideally, I think you would do that by setting a catchpoint for all syscalls (which Sérgio's patch supports) and then put conditions to tell which syscalls you are interested in. At least for me, it sounds more natural. Except that there's no way to do that. :-) Perhaps we could create a convenience function which would return the syscall name? > It would mean some changes in the logic and some changes in the data > structure -- but nothing too major. Usually a catchpoint would have a > small number of syscalls, so I'd say that just using a linked list > would be fine. With my suggestion, the logic would mostly stay the same, with a small addition to evaluate an expression when the catchpoint triggers, IIUC. -- []'s Thiago Jung Bauermann IBM Linux Technology Center