From: Joel Brobecker <brobecker@adacore.com>
To: Doug Evans <dje@google.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [RFA/python:2/2] First script in GDB python library - command/pahole.py
Date: Thu, 03 Jun 2010 15:35:00 -0000 [thread overview]
Message-ID: <20100603153459.GK3019@adacore.com> (raw)
In-Reply-To: <AANLkTinQuOhqR8FPN8_cRp1F5Gwa3uJeKg9OfrywOYhI@mail.gmail.com>
> $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.
Hmm, right, I hadn't thought about that. IMO, there should not be a
prefix.py or subprefix.py if that prefix/subprefix command is not
a valid command in itself, or if the command already exists.
> Or what to do if there are multiple command directories and several
> have commands with the same prefix.
I guess we'll have to think about that one too, eventually. I think
the thing to do when that can happen is to print a warning/error saying
that such and such py script could not be run because it collides with
another script that was run earlier. Or print a warning saying that
a given command from such and such script was overriden by such and
such script (we might want to give precedence to user-provided scripts
over system-provided scripts for instance).
> Prescanning the directories and creating stubs sounds reasonable.
> How much of a stub though?
> In addition to command completion there is help and apropos.
I think that if we want to have help and apropos working, we might
as well just use the simpler approach of running the command scripts
right from the start. I'd be OK with that too, and it's certainly
much simpler to work on. Otherwise, to get the help, we'd have to
either evaluate part of the script, or find a way to provide that
information without doing the evaluation. Either way, I think that
it would take us past the overkill point.
--
Joel
next prev parent reply other threads:[~2010-06-03 15:35 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-27 0:09 Add support for the GDB Python Library Joel Brobecker
2010-05-27 0:09 ` [RFA/python:2/2] First script in GDB python library - command/pahole.py Joel Brobecker
2010-05-27 20:37 ` Tom Tromey
2010-05-28 1:34 ` Joel Brobecker
2010-06-03 0:11 ` Joel Brobecker
2010-06-03 6:28 ` Doug Evans
2010-06-03 15:35 ` Joel Brobecker [this message]
2010-07-11 18:49 ` Tom Tromey
2010-05-27 0:25 ` [RFA/python:1/2] Add support for --with-pythondir Joel Brobecker
2010-05-27 6:49 ` Doug Evans
2010-05-27 20:32 ` Tom Tromey
2010-05-28 9:55 ` Doug Evans
2010-05-28 17:20 ` Joel Brobecker
2010-05-30 17:10 ` Doug Evans
2010-06-01 20:15 ` Joel Brobecker
2010-06-01 20:39 ` Doug Evans
2010-06-01 20:53 ` Joel Brobecker
2010-05-27 1:54 ` Add support for the GDB Python Library Doug Evans
2010-05-27 3:42 ` Doug Evans
2010-05-27 15:17 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100603153459.GK3019@adacore.com \
--to=brobecker@adacore.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox