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] Allow user-defined as a category for python gdb macros (resend)
Date: Tue, 14 Feb 2012 03:12:00 -0000	[thread overview]
Message-ID: <CADPb22T4O6mJAXxE-XBS83F4KwbgSRPpED_zMykdj_5UX_5-9g@mail.gmail.com> (raw)
In-Reply-To: <03E840D17E263A48A5766AD576E0423A03D72B653F@exch-mbx-111.vmware.com>

On Mon, Feb 13, 2012 at 4:48 PM, Scott Goldman <scottjg@vmware.com> wrote:
> --- a/gdb/top.c
> +++ b/gdb/top.c
> @@ -470,7 +470,7 @@ execute_command (char *p, int from_tty)
>       if (c->flags & DEPRECATED_WARN_USER)
>        deprecated_cmd_warning (&line);
>
> -      if (c->class == class_user)
> +      if (c->class == class_user && c->user_commands)
>        execute_user_command (c, arg);
>       else if (c->type == set_cmd || c->type == show_cmd)
>        do_setshow_command (arg, from_tty, c);

This change is a bit obscure.
At the very least, I think this requires a proper comment explaining
why one needs to test c->user_commands.

Also, this patch feels like it's incomplete.
If I can see "user" python "macros" [sic] then happens if I do "show
user foo"? (a user may reasonably ask)
And given that that won't work, we'll have to explain(document) why.
Plus one now needs to explain that "document" and
"max-user-call-depth" don't apply to these commands (it may seem
obvious, but they show up in "apropos user-defined", and thus to not
document these things means the patch is incomplete).

I wonder if any more unforeseen changes will be needed.


  reply	other threads:[~2012-02-14  3:12 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-14  0:49 Scott Goldman
2012-02-14  3:12 ` Doug Evans [this message]
2012-02-14  7:57   ` Scott Goldman
2012-02-14 18:09     ` Eli Zaretskii
2012-02-14 20:19     ` Doug Evans
2012-02-14 12:48 ` Phil Muldoon
2012-02-15  9:27   ` Scott Goldman
2012-02-16 14:23     ` Phil Muldoon
2012-02-16 17:16       ` Eli Zaretskii
2012-02-23  3:03     ` Doug Evans
2012-02-23  3:32       ` Scott Goldman
2012-02-23  4:24         ` Eli Zaretskii
2012-02-23  5:13           ` Scott Goldman
2012-02-23  6:03         ` Doug Evans
2012-02-23  6:56           ` Scott Goldman
2012-02-23  8:21             ` Scott Goldman
2012-02-24 23:49               ` Scott Goldman
2012-02-28  1:36                 ` Doug Evans
2012-02-28  4:18                   ` Scott Goldman
2012-02-28  7:51                     ` Doug Evans
2012-02-29  0:45                 ` [doc RFA] " Doug Evans
2012-02-29  4:17                   ` Eli Zaretskii
2012-03-01 19:31                 ` Doug Evans
2012-03-01 20:26                   ` Keith Seitz

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=CADPb22T4O6mJAXxE-XBS83F4KwbgSRPpED_zMykdj_5UX_5-9g@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