From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18472 invoked by alias); 7 Nov 2008 18:21:18 -0000 Received: (qmail 18463 invoked by uid 22791); 7 Nov 2008 18:21:17 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 07 Nov 2008 18:20:41 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mA7IKdIX018065; Fri, 7 Nov 2008 13:20:39 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mA7IKbHn031131; Fri, 7 Nov 2008 13:20:38 -0500 Received: from opsy.redhat.com (vpn-12-123.rdu.redhat.com [10.11.12.123]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mA7IKbFC015903; Fri, 7 Nov 2008 13:20:37 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id 69EF188803F; Fri, 7 Nov 2008 11:20:36 -0700 (MST) To: =?utf-8?Q?S=C3=A9rgio?= Durigan =?utf-8?Q?J=C3=BAnior?= Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 1/4] 'catch syscall' feature -- Architecture-independent part References: <1225773079.24532.52.camel@miki> <1226029103.32321.96.camel@miki> From: Tom Tromey Reply-To: Tom Tromey X-Attribution: Tom Date: Fri, 07 Nov 2008 18:21:00 -0000 In-Reply-To: <1226029103.32321.96.camel@miki> (=?utf-8?Q?=22S=C3=A9rgio?= Durigan =?utf-8?Q?J=C3=BAnior=22's?= message of "Fri\, 07 Nov 2008 01\:38\:22 -0200") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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/msg00134.txt.bz2 >>>>> "S=C3=A9rgio" =3D=3D S=C3=A9rgio Durigan J=C3=BAnior writes: S=C3=A9rgio> + memset ((void *) cur_name, '\0', 128 * sizeof (char)); Tom> I don't think this is needed. Tom> Also, sizeof(char)=3D=3D1 by definition. S=C3=A9rgio> Yeah, I know hehe. It just happens that I like to be "explicit= ", so S=C3=A9rgio> you'll likely find "sizeof (char)" in every code I make :-)...= But S=C3=A9rgio> there's no problem for me to take it off. Just to be clear, here I meant that the whole memset appears unnecessary. Tom> I think it would be more useful to make a single catchpoint. A single Tom> catchpoint gives the user a way to set commands, conditions, etc, for Tom> a whole range of syscalls at once. It is analogous, I think, to Tom> having a breakpoint with multiple locations. S=C3=A9rgio> I have a question right here, then. Is the "breakpoint with mu= ltiple S=C3=A9rgio> locations" implemented this way? I'm sorry for my ignorance on= this :-( Yeah. That might not be the best example, since there is also "rbreak", which makes lots of separate breakpoints. S=C3=A9rgio> I was talking to Thiago about this, and I don't know if we nee= d this S=C3=A9rgio> *right now*, for this patch. I think it's good the way it is, = and as you S=C3=A9rgio> said, it won't take much to modify things in order to make it = work the S=C3=A9rgio> way you want :-). Also, currently the "catch syscall" command = doesn't S=C3=A9rgio> allow the user to set commands, conditions, etc. So for now it= 's only S=C3=A9rgio> "catch syscall [name|number]". S=C3=A9rgio> What do you think? I'd still like it, for a long term UI reason. If "catch syscall" makes separate catch points for each syscall, then when we move to froggy we won't be able to take advantage of the kernel-side filtering, because that would be a change to how the command works. We would probably have to invent a new user command. Another option would be to make "catch syscall" only take a single argument for now. Then we could extend it gracefully in the future. Also, can't you set conditions and commands on syscall catchpoints using the "condition" and "commands" commands? I would have thought that came for free -- but I didn't try it and I didn't read the code closely enough to know for sure. S=C3=A9rgio> Thanks for your comments :-). Thanks for writing this and for persevering :) Tom