Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Marco Barisione <mbarisione@undo.io>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add a way to preserve overridden GDB commands for later invocation
Date: Mon, 28 Oct 2019 17:36:00 -0000	[thread overview]
Message-ID: <83wocorcva.fsf@gnu.org> (raw)
In-Reply-To: <20191028133234.319-1-mbarisione@undo.io> (message from Marco	Barisione on Mon, 28 Oct 2019 13:32:34 +0000)

> From: Marco Barisione <mbarisione@undo.io>
> Date: Mon, 28 Oct 2019 13:32:34 +0000
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index 25e67e43c8..e0f1f0a9c1 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -71,6 +71,14 @@
>    ** gdb.Block now supports the dictionary syntax for accessing symbols in
>       this block (e.g. block['local_variable']).
>  
> +  ** gdb.Command has a new method 'invoke_overridden' to invoke the
> +     command with the same name, if any, which was overridden by the new
> +     command.  gdb.Command.__init__ has a new 'preserve_when_overridden'
> +     argument which, if true (the default is false), means that the
> +     command, once overridden by another command of the same name, can
> +     still be invoked through the new command's 'invoke_overridden'
> +     method.

This part is OK.

> +@var{preserve_when_overridden} is an optional argument.  If @code{True},
> +then the new command is not deleted when it's overridden by another
> +command with the same name, otherwise it's deleted.  When a command is
> +preserved, the overriding command can still invoke it through its
> +@code{invoke_overridden} method.

When you describe a complex new notion, it is important to use the
same words consistently when referring to the same things.  In this
case, you first used "not deleted", and later referred to the same
thing as "preserved".  Not every reader will correctly conclude that
these two mean the same.  So, to avoid confusion, use just one of the
two in both instances, okay?

> +@defun Command.invoke_overridden (argument, from_tty)
> +If the command overrode another command of the same name,
                  ^^^^^^^^
"overrides" is better, I think.

> +                                                          this can be
> +invoked through this method as long as the overridden command supports this
> +feature.

What did you mean by "this" here?  It's unclear.

> +@item
> +All commands defined by @value{GDBN} itself support being invoked when
   ^^^^^^^^^^^^
"All the commands"

Thanks.


  reply	other threads:[~2019-10-28 17:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 13:33 Marco Barisione
2019-10-28 17:36 ` Eli Zaretskii [this message]
2019-10-28 18:12   ` Marco Barisione
2019-11-01  8:55 ` [PATCH v2] " Marco Barisione
2019-11-01  9:14   ` Eli Zaretskii
2019-11-01 19:18   ` Tom Tromey
2019-11-01 21:01     ` Marco Barisione
2019-11-05 10:17       ` Andrew Burgess
2019-11-06  8:42         ` Marco Barisione
2019-11-07 10:22           ` Marco Barisione
2019-11-06 16:00         ` Pedro Alves

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=83wocorcva.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mbarisione@undo.io \
    /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