From: Tom Tromey <tom@tromey.com>
To: Marco Barisione <mbarisione@undo.io>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add a way to preserve overridden GDB commands for later invocation
Date: Fri, 01 Nov 2019 19:18:00 -0000 [thread overview]
Message-ID: <87wocj1k3y.fsf@tromey.com> (raw)
In-Reply-To: <20191101085449.28493-1-mbarisione@undo.io> (Marco Barisione's message of "Fri, 1 Nov 2019 08:54:49 +0000")
>>>>> "Marco" == Marco Barisione <mbarisione@undo.io> writes:
Thanks for the patch. I think it's a good idea -- in fact, I've wanted
it myself before :-)
Do you have a copyright assignment on file?
Marco> To avoid unexpected behavioural changes, new commands implemented in
Marco> Python are, by default, freed when overridden. A command which wants
Marco> the new behaviour can pass the new preserve_when_overridden argument to
Marco> gdb.Command.__init__ ().
Could you say what unexpected behavioural changes you would anticipate?
I tend to think it would be clearer if all commands were treated
identically.
Is there some implementation difficulty doing it? Or was it just that
you didn't think it was useful?
In this model, if a Python command overrides a built-in command, and
then is itself overridden, can the new command still access the
underlying built-in command?
What happens in the weird case that you have a command alias X, then
override X, and then override the thing that the original X was aliased
to? Will calling the overridden X do the right thing? Really I'm
wondering if that crashes -- maybe a counter-argument to my wish for
generality is that aliases should not be overridden.
I skimmed the patch and it seemed ok but I figured we'd want to address
these things first.
thanks,
Tom
next prev parent reply other threads:[~2019-11-01 19:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-28 13:33 [PATCH] " Marco Barisione
2019-10-28 17:36 ` Eli Zaretskii
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 [this message]
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=87wocj1k3y.fsf@tromey.com \
--to=tom@tromey.com \
--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