From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26267 invoked by alias); 3 Jan 2012 06:02:42 -0000 Received: (qmail 26255 invoked by uid 22791); 3 Jan 2012 06:02:39 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-qy0-f169.google.com (HELO mail-qy0-f169.google.com) (209.85.216.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 03 Jan 2012 06:02:25 +0000 Received: by qcsd17 with SMTP id d17so10949087qcs.0 for ; Mon, 02 Jan 2012 22:02:24 -0800 (PST) Received: by 10.229.105.98 with SMTP id s34mr18653253qco.100.1325570543187; Mon, 02 Jan 2012 22:02:23 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.105.98 with SMTP id s34mr18653239qco.100.1325570543003; Mon, 02 Jan 2012 22:02:23 -0800 (PST) Received: by 10.224.72.210 with HTTP; Mon, 2 Jan 2012 22:02:22 -0800 (PST) In-Reply-To: References: Date: Tue, 03 Jan 2012 06:02:00 -0000 Message-ID: Subject: Re: [RFC] A new command 'grep' From: Siva Chandra To: gdb-patches@sourceware.org Cc: Kevin Pouget , Eli Zaretskii , Doug Evans X-System-Of-Record: true Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: 2012-01/txt/msg00078.txt.bz2 On Mon, Jan 2, 2012 at 11:14 PM, Doug Evans wrote: > On Mon, Jan 2, 2012 at 1:28 AM, Kevin Pouget wro= te: >> On Mon, Jan 2, 2012 at 9:54 AM, Eli Zaretskii wrote: >>> >>> I think this is the first time we receive a proposal for a command >>> implemented in Python. =A0Perhaps there's a place to discuss whether >>> some policy is in order in this regard. =A0E.g., the command will be >>> unavailable in non-Python builds, which at least needs to be >>> documented. =A0There may be other aspects that are worth discussing. >> >> I'm also curious about that, and maybe first of all, is there a Python >> specific coding convention likely to be enforced in GNU projects >> and/or GDB? > > Sorry for the repeat. > [I wasn't aware the mail program I was using would sent it as rich html, = sigh.] > > For reference sake, > there are already some gdb commands in python, > see python/lib/gdb/command. > The pretty printer support there doesn't need to worry about > non-python builds of course. > > As for coding convention, we follow pep008 with a few additions. > ref: http://sourceware.org/gdb/current/onlinedocs/gdbint/Coding-Standards= .html#Coding-Standards 1. OK. I have verified that my code sticks to PEP008 but for the order of imports. I will fix that. 2. Eli's query on the policy on general purpose commands implemented in Python is very relevant. But before that, is this new command I propose worth having? 3. If yes, then is it a good idea to have general purpose commands implemented in Python? If not, I will implement this, and the earlier 'explore' command I proposed in C. Thanks, Siva Chandra