This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/python:2/2] First script in GDB python library - command/pahole.py
- From: Doug Evans <dje at google dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, gdb-patches at sourceware dot org
- Date: Wed, 2 Jun 2010 23:28:09 -0700
- Subject: Re: [RFA/python:2/2] First script in GDB python library - command/pahole.py
- References: <1274918921-23200-1-git-send-email-brobecker@adacore.com> <1274918921-23200-3-git-send-email-brobecker@adacore.com> <m3aarlf5n7.fsf@fleche.redhat.com> <20100603001115.GJ3019@adacore.com>
On Wed, Jun 2, 2010 at 5:11 PM, Joel Brobecker <brobecker@adacore.com> wrote:
> (Doug asked whether we wanted the .py extension or not; either of us
> don't seem to have a strong opinion on it, although I do like it, and
> most editors will likely also appreciate having it to automatically
> activate the python edit mode).
For reference sake,
I was asking whether we needed command files for the prefixes, not
whether the files should have a .py suffix.
i.e.
instead of having .py files for each prefix and subprefix, in addition
to one for the command, as in
$dir/commands/prefix.py
$dir/commands/prefix/subprefix.py
$dir/commands/prefix/subprefix/my-command.py
just have
$dir/commands/prefix/subprefix/my-command.py
I like the consistency of the former, but I'm not sure what to do
about prefixes that already exist, e.g. enable, disable.
Or what to do if there are multiple command directories and several
have commands with the same prefix.
btw,
Prescanning the directories and creating stubs sounds reasonable.
How much of a stub though?
In addition to command completion there is help and apropos.