From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31049 invoked by alias); 2 Jan 2012 08:54:48 -0000 Received: (qmail 31039 invoked by uid 22791); 2 Jan 2012 08:54:47 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Jan 2012 08:54:32 +0000 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Rhdf5-0002s7-UR; Mon, 02 Jan 2012 03:54:31 -0500 Date: Mon, 02 Jan 2012 08:54:00 -0000 Message-Id: From: Eli Zaretskii To: Siva Chandra CC: gdb-patches@sourceware.org In-reply-to: (message from Siva Chandra on Mon, 2 Jan 2012 10:30:55 +0530) Subject: Re: [RFC] A new command 'grep' Reply-to: Eli Zaretskii References: 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/msg00019.txt.bz2 > Date: Mon, 2 Jan 2012 10:30:55 +0530 > From: Siva Chandra > > Attached is a patch which implements a 'grep' command using the GDB > Python API. The idea behind the 'grep' command is as follows. We often > have deep data structures and are probably interested in some one > particular field or value embedded somewhere deep in that data > structure. For such cases, instead of typing the complete expression > for the field, we can use the 'grep' command to lookup the field or > value of interest. Thanks. I think this is the first time we receive a proposal for a command implemented in Python. Perhaps there's a place to discuss whether some policy is in order in this regard. E.g., the command will be unavailable in non-Python builds, which at least needs to be documented. There may be other aspects that are worth discussing. If this is accepted, it will need user-level documentation. I cannot say I like the name "grep". Users will associate that name with the Unix command that searches through files, which is radically different from what your command does. How about "lookup-fields" instead?