From: Doug Evans <dje@google.com>
To: "Scott J. Goldman" <scottjg@vmware.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add support for `user-defined` python commands
Date: Thu, 19 May 2011 01:59:00 -0000 [thread overview]
Message-ID: <BANLkTikvpDA1wX9KLDFi6CdqSZ26tNqzvQ@mail.gmail.com> (raw)
In-Reply-To: <1305761175-10188-1-git-send-email-scottjg@vmware.com>
On Wed, May 18, 2011 at 4:26 PM, Scott J. Goldman <scottjg@vmware.com> wrote:
> For codebases with a large pre-existing set of legacy gdb macros, it's
> nice to be able to use `help user-defined`, to refresh your memory wrt
> to existing macros. Currently, python gdb commands can't put themselves
> under the `user-defined` category. This patch aims to rectify that.
I think there's a problem to solve here (finding one's way in the
myriad of available commands), but I'm not sure this is the way to go.
[Maybe it is though.]
What does "help user-defined" buy?
It *does* buy a way to see a list of a particular set of available
commands, but the list isn't categorized along functional lines (like
managing breakpoints or examining data). What the user will get is a
list of a random set of commands.
For completeness sake, prefix commands provide another way of
categorizing commands - one *could* put a set of new commands in a
prefix command, and then "help <prefix>" would list all of the
commands. But it doesn't always fit what one wants to do. E.g. it
wouldn't list anything added as a set/show or info command (python
commands mightn't be able to be implemented as set/show/info today, I
forget, but it seems like a useful thing to at least not preclude).
Question: What if we had the ability to add new command classes?
And what if "help <foo>" could print all the commands in that command class?
Then one could add a whole suite of python commands to deal with foo
(which needn't necessarily match any existing command class), and
"help foo" would list them all.
Just a thought.
next prev parent reply other threads:[~2011-05-19 1:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-18 23:28 Scott J. Goldman
2011-05-19 1:59 ` Doug Evans [this message]
2011-05-19 2:54 ` Scott Goldman
2011-05-19 3:08 ` Doug Evans
2011-05-19 16:44 ` Tom Tromey
2011-05-19 19:27 ` Scott Goldman
2011-05-19 20:23 ` Tom Tromey
2011-05-19 23:16 ` Doug Evans
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=BANLkTikvpDA1wX9KLDFi6CdqSZ26tNqzvQ@mail.gmail.com \
--to=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=scottjg@vmware.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