Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Scott Goldman <scottjg@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Add support for `user-defined` python commands
Date: Thu, 19 May 2011 03:08:00 -0000	[thread overview]
Message-ID: <BANLkTikEPo=0oAv9N+HJf4Y3ZB4FVqJvnQ@mail.gmail.com> (raw)
In-Reply-To: <F78BCF638F95D74A99D036114107EDB5028DE8C50B@EXCH-MBX-3.vmware.com>

On Wed, May 18, 2011 at 7:54 PM, Scott Goldman <scottjg@vmware.com> wrote:
> Hi Doug.
>
>> 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.]
>
> I think you made some interesting points. From what I make of your email, the question you've proposed is something like "should we even have user-defined category at all?". I'm sure there will be a lot of opinions on this. UI debates are tougher for me than technical ones :)
>
> I can see the discussion branching in two directions:
> 1) Yes, we should have a user-defined category, but we also want to either: subdivide the user-defined commands into prefix categories, or have additional custom categories.
>
> In this case, I think it follows that my patch should be applied pretty much as-is (pending any necessary refactoring as requested). If legacy gdb macros can enter the `user-defined` category, I don't see why new python gdb macros should be excluded. Further patches can add the support for additional custom categories, and this patch would be the first step: allowing python macros to be classified as `user-defined` at all.
>
> 2) No, we should not have a user-defined category, and it should be replaced by custom categories or prefix categories.
>
> In this case, my patch is pretty irrelevant.

I'm not sure it's either/or.
One *could* have both python "user-defined" commands and the ability
to add new command classes.
I don't think I would ever use "user-defined" except as a throwaway
for when I couldn't think of something better. :-)
But your patch could *still* be useful enough to add.

I think the absence of user-defined python commands is either an
oversight or just left out pending an actual need.
I only bring this up because after reading your patch, it made me
wonder if there isn't a more general problem here.
[At a former employer I think we did add user-specifiable command
classes - we added a lot of commands: gdb macros, lots of new
simulator commands, and commands from dlopen'd libraries.  The need
for organizing them was clear.]


  reply	other threads:[~2011-05-19  3:08 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
2011-05-19  2:54   ` Scott Goldman
2011-05-19  3:08     ` Doug Evans [this message]
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='BANLkTikEPo=0oAv9N+HJf4Y3ZB4FVqJvnQ@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