From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12969 invoked by alias); 27 Oct 2014 19:20:47 -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 12953 invoked by uid 89); 27 Oct 2014 19:20:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qc0-f173.google.com Received: from mail-qc0-f173.google.com (HELO mail-qc0-f173.google.com) (209.85.216.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Oct 2014 19:20:44 +0000 Received: by mail-qc0-f173.google.com with SMTP id x3so2047906qcv.4 for ; Mon, 27 Oct 2014 12:20:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yH0CLgQHo88l2WPFgJYVfQ2LmGpXA6nAF+C6MnK/Qro=; b=RGy6GBEfFhV/9qGfTdQJRIWasUp5LMt4Shx8vO7fEc3cYwZWA1vIYcsv7nWxXB0SQ9 72FM4GbfIvl9D3x/UztoyTtG+4YgYqIVygeE3ZKlIQsZmZstbVVtpFNAhUKXb/sgBZem 9ZgCBjiaMHlXxe37iSj/rKc7IXbIJS4cZxGb1Qtw/qGBxqwzKNHC7lXwgZfBuLMrOLO+ ijMHn1Mrx77czJX+JSrpxL4bB8sbXW4bFJ6KagY7lgl1T+14HQ6GNxONkBbq4jkzREkK rruCR0QjsPWO5/BPYm4oDrNXOv0VIFcpkBHgZda1+VYutNPDSC6KXV1an6mIl8l9eoRT wuIQ== X-Gm-Message-State: ALoCoQmuh8XvRarLnThNGY4R6s701C0LXu3sMu9g2OaHQ861GnPFEqOTo96VLY7FiQbZEXvyk+1u MIME-Version: 1.0 X-Received: by 10.224.128.131 with SMTP id k3mr35409360qas.98.1414437641536; Mon, 27 Oct 2014 12:20:41 -0700 (PDT) Received: by 10.229.250.4 with HTTP; Mon, 27 Oct 2014 12:20:41 -0700 (PDT) In-Reply-To: <87egu28r9x.fsf@redhat.com> 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> <87k34555se.fsf@anubis.Home> <87oat7736y.fsf@anubis.Home> <87egu28r9x.fsf@redhat.com> Date: Mon, 27 Oct 2014 19:20:00 -0000 Message-ID: Subject: Re: [RFC PATCH 2/3] Add support to catch groups of syscalls. From: Doug Evans To: Sergio Durigan Junior Cc: Gabriel Krisman Bertazi , gdb-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-10/txt/msg00741.txt.bz2 On Mon, Oct 20, 2014 at 12:39 PM, Sergio Durigan Junior wrote: > On Monday, October 20 2014, Gabriel Krisman Bertazi wrote: > >>> I'm not really comfortable with that (far more so than "catch syscall >>> open network-group"). >>> If you want to require -g at the front, and thus disallow catching >>> both syscalls and syscall groups in the same command then that would >>> be fine with me. >> >> I really think we shouldn't disallow catching syscalls and syscalls >> group on the same command, no matter which syntax we pick. GDB wiki >> says that GDB should be more permissive about command's syntax, in a >> sense that user shouldn't spend more time than needed to find out how a >> command works. I think disallowing catching syscalls and groups on the >> same command would reduce expressiveness in this case. > > I agree. > >>> Still need a solution for listing them. Arguably since we don't >>> provide a way to list syscalls (sigh, modulo the hack I showed, which >>> should be fixed so that it no longer works anyways :-)), providing a >>> way to list syscall groups is for a separate patch. Kudos if you >>> still want to provide a way to list syscalls and groups though. >> >> So, definitively allowing "catch syscall -g" to list syscalls is not a >> good idea. Sergio suggested off-list to use another option, maybe -lg >> to list syscall groups. Then, a future patch could also extend catch >> syscall to list all syscalls using a -l option or something like that. >> Sergio, sorry if I got your suggestion wrong. > > It is alright, I completely forgot I made that suggestion! Thanks for > bringing it to the table. > > Anyway, yeah, I guess '-lg' (or -list-groups) should be OK. > >> OTOH, I might be over-thinking this simple stuff :). I'm ok with the >> namespace (suffix) syntax, but I think we should go with "g:" (or even >> "group:network", if it's not too verbose) instead of "-group", to avoid >> the issue pointed out by Sergio with the exit_group syscall. > > Yeah, maybe this is a bit over-thinking, but OTOH we are talking about > user interface, which cannot be changed easily after we make a release. > > BTW, I like the idea of using the "g:" prefix, so I say "go for it" if > you think it is OK. > > Sorry for not being able to comment more on the thread now, I am busy > with other things. However, I think you covered all the issues with > your message, so you should be good to go as long as Doug has no other > comments. I can live with "g:foo g:bar" more than "-g foo [-g?] bar", though I'm willing to defer to a majority if it arises (depending on what the majority decides on :-)). I can also live with "catch syscall -l/-lg" though there are other things where we want to provide the ability to list things (e.g., catch signal) and I would want consistency throughout. Another thought is "catch list foo". "g:" is pretty non-descript. "group:" is clearer. OTOH, we do try to minimize typing where we can. I'm hesitant to get too elaborate here and suggest supporting both. OTOH, we can start with "g:" and add a "group:" alias later. Anyone else have a preference?