From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5667 invoked by alias); 8 Oct 2014 19:46:23 -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 5655 invoked by uid 89); 8 Oct 2014 19:46:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-vc0-f179.google.com Received: from mail-vc0-f179.google.com (HELO mail-vc0-f179.google.com) (209.85.220.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 08 Oct 2014 19:46:21 +0000 Received: by mail-vc0-f179.google.com with SMTP id im17so7525335vcb.10 for ; Wed, 08 Oct 2014 12:46:19 -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=LKw5WUIvvq9+/t6br3y3RQPeB+udSg75TPt9hrH0JQs=; b=PKf4NQuIhUbT+SY19g/36LoX1mzmcNyPN6XHPeYa8WZ5qXuGUxdPQ8V7HTlvtXoqlu MfbNdaitmPJTxlY2onxHWtN1Y9iheutehxZz6TjIFekCrHVjOaZQQ+SJttrwmjy06hl6 u6U1r+T4q07Spzj85GO9yowHOUEcQ7c9qGxj0Q2DLixa0kKLNVe3WkDzqLMA1GtSPyls KEaSvB7hicCCge+Su6FHfiiFiz3Wf0lh45nT61qbAm0DF8uhBvRzWNO1Iz9hZOVOMc5q UByYlu+YVyh3rOkEM2AZrSz0o9JaR/pWYbe9k0jrXCiWG0XPH8ZNYRRuvrFaxDe12g20 PSeA== X-Gm-Message-State: ALoCoQlJWMdD6edANp9UPsmTHF5xXktj8vEb/CEHUWrgu0BDFDKTgfq3FSC3pFvQ3XlJxv0Wg+4p MIME-Version: 1.0 X-Received: by 10.52.101.227 with SMTP id fj3mr11134904vdb.67.1412797578928; Wed, 08 Oct 2014 12:46:18 -0700 (PDT) Received: by 10.52.181.65 with HTTP; Wed, 8 Oct 2014 12:46:18 -0700 (PDT) In-Reply-To: <87h9zebcsb.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> Date: Wed, 08 Oct 2014 19:46: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/msg00174.txt.bz2 On Wed, Oct 8, 2014 at 12:07 PM, Sergio Durigan Junior wrote: > As I mentioned, you're doing this here because you have no way to know > whether the user is asking to catch a syscall name or a group of > syscalls. This would be solved with my early proposal, of implementing > the "-g" modifier on the catch syscall command. It would also make the > code simpler to follow here. Yeah, let's agree on a syntax before we get through too many patch iterations. 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 consistency > (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. I also kinda dislike interpreting "-g" to mean all remaining arguments (for a few reasons). "catch syscall write -g network" feels clumsy if I can't also do something like "catch syscall -g network -s write" or some such). One could just say that syscall names and syscall group names share the same namespace, but I can imagine a system that happens to have a syscall that is the name of a group on another system. E.g., maybe there's a system where "signal" is a syscall. It's a logical name for the group. Then if one happened to be unfortunate enough to work with two systems where "signal" is a syscall name on one system and a group name on another system, I can imagine tripping over the use of the same name to mean different things and getting frustrated. How about appending "-group" or some such to group names? [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.]