From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29796 invoked by alias); 12 Oct 2014 21:37:04 -0000 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 Received: (qmail 29787 invoked by uid 89); 12 Oct 2014 21:37:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: layla.krisman.be Received: from layla.krisman.be (HELO layla.krisman.be) (176.31.208.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 12 Oct 2014 21:37:02 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (envelope-from ) id 1XdQkT-0001JM-TA; Sun, 12 Oct 2014 23:32:18 +0200 From: Gabriel Krisman Bertazi To: Sergio Durigan Junior Cc: Doug Evans , gdb-patches Subject: Re: [RFC PATCH 2/3] Add support to catch groups of syscalls. References: <1412736678-2760-1-git-send-email-gabriel@krisman.be> <1412736678-2760-3-git-send-email-gabriel@krisman.be> <87h9zebcsb.fsf@redhat.com> <87siiy9vis.fsf@redhat.com> Date: Sun, 12 Oct 2014 21:37:00 -0000 Message-ID: <87k34555se.fsf@anubis.Home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00303.txt.bz2 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Content-length: 2525 Sergio Durigan Junior writes: > On Wednesday, October 08 2014, Doug Evans wrote: > >> Regarding: >>> # catch syscalls write, read, chdir, and groups network and signal >>> (gdb) catch syscall write read chdir -g network,signal >>> # or maybe without comma-separated values for groups, to keep consisten= cy >>> (gdb) catch syscall write read chdir -g network signal >> >> I dislike "network,signal" if we don't also accept "read,write". I >> gather the comma is there to remove ambiguity as to what "-g network >> signal" means. > > Yeah. > >> I also kinda dislike interpreting "-g" to mean all remaining arguments >> (for a few reasons). > > Since there are very few groups (compared to syscalls names), I also > thought that "-g" could be used multiple times, like: > > (gdb) catch syscall -g network -g signal > > But... Doug and Sergio, Thank you for your review and valuable suggestions. The suggestion I feel more comfortable with is using -g for each syscall group. I agree that syscall groups should be treated on a different namespace than syscall names, which are the expected argument for a command called "catch syscall". >> How about appending "-group" or some such to group names? > > Hm, it seems OK, but I am thinking about one specific syscall that might > make things confusing here: exit_group(2). Consider: > > (gdb) catch syscall signal-group exit_group > > This can be very confusing for the user. > >> [I don't want to have too long a discussion or be too picky. >> OTOH I also don't want to just pick something and then regret it.] > > Yeah, I understand your reasons. > > Along the lines of your proposal above, I guess we can add a "g:" prefix > to group names: > > (gdb) catch syscall read chdir g:network g:signal signal > > WDYT? I dislike the proposal of adding prefixes/suffixes to the group names because I feel it might be harder to type, and also because it feels a little unusual, if we consider the common way of providing arguments to commands. Using -g to specify syscall groups, as Sergio said, has also the advantage of providing us with an intuitive command to list available syscall groups, by saying "catch syscall -g" with no arguments. So, my vote goes to using '-g' for each syscall group we want to catch. Is that ok for you, guys? I will still wait a few days to see if anyone has more suggestions before sending the updated patch that fixes the syntax and the other things you guys pointed out. Thanks! --=20 Gabriel Krisman Bertazi --=-=-= Content-Type: application/pgp-signature Content-length: 818 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUOvRxAAoJEO9pqxSS5VgP+agP+wcMWlt3fUPyinucWJkWk2vH kk3FzDAjRh9gx3cLvFoyWU3wZ3yCN1gNJ5dINxdQe9ahVlP5gBSqXuz0j/D3PQu8 WwIhXwI43Tg0ZtTlzBrdeiWDuJ/Y5db/M93Ou+xkLXn8LxvCf2m59PC1+UMHviod rzla9zwuBKzKPt12AeORn9EMYA2fR7p4m3u1LVvmxNHXKTSsGd/GGO2XMqn9j4Km fYINjjOxT+C8cM/RL0Z0AlJ3gHqNUyQMCHOlCbE3H3IsDD1aLGnbiF6XeHk9xgp0 5NCABJBO3SVhljVVLrZxCHcP/bqQDOmitM7QAi+kxozFzwOddx+vCaNNbUC6GZXu tXdBUoibA2YrvhL/6fc1Lwr56fYP2hLS0kWSRUrppmgaohWXZFAGqS/pQgIw+oOW Dxa2BCY50HCVNqH3Ssgb8+j/whhA6uXuxijI3k6SLHTUIz6y8vyxurqbPaZIdQgW ie1L8OoKvto4BOKJuvErqrXiuNjXjech3unTauwjwPOjl5M6MEGsE4oDg2zSzqQl Tvh7qR0sVY4GDXWW+qKRPy3B5dW+HvE+i9B3vJ26kBmBM4yQtgpcWvgO2J5s7KTJ enq/ZbJDj+Lj0OqNSD3Q7TbvdufxbHTBBnmfno1R3gDHXghqQSSTMEwLVHIJSzqE onjgEaUeLIh+ISJtjN3R =7K6M -----END PGP SIGNATURE----- --=-=-=--