This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] A new command 'grep'
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Siva Chandra <sivachandra at google dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 02 Jan 2012 03:54:31 -0500
- Subject: Re: [RFC] A new command 'grep'
- References: <CAGyQ6gwb0X8KTN8bzWKxzhCyTwN=zhjB=tuz1BNW-TX_KN-TyA@mail.gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Mon, 2 Jan 2012 10:30:55 +0530
> From: Siva Chandra <sivachandra@google.com>
>
> 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?