This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA, doc RFA] Add gdb.add_command_alias


On Tuesday 13 September 2011 18:20:16, Doug Evans wrote:
> On Fri, Sep 9, 2011 at 2:13 PM, Eli Zaretskii <eliz@gnu.org> wrote:
> >> Date: Fri,  9 Sep 2011 11:36:36 -0700 (PDT)
> >> From: dje@google.com (Doug Evans)
> >>
> >> Per discussion on IRC, here is a patch to add support for adding
> >> command aliases.
> >
> > I wish people would discuss such issues here, not on IRC.  These
> > discussions should be recorded, for one thing.
> 
> Whatever additional discussion one wants to have we can have here.
> No worries.
> 
> > Me, I don't understand the need for this feature, especially not why
> > it should be a Python-only feature.  Moreover, why do we need to have
> > this, when one can easily write a command that just calls an existing
> > one, to have the same effect.

IMO, since this is really about aliasing new CLI spellings for
existing CLI commands, it'd make sense to have a way to alias commands
in the CLI, without python.  E.g.,

(gdb) alias isl info shared library
(gdb) isl
<list shared libraries>

Python could then of course just do gdb.execute("alias ...").

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]