From: Tom Tromey <tromey@redhat.com>
To: "Metzger\, Markus T" <markus.t.metzger@intel.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/8] add target method delegation
Date: Tue, 30 Jul 2013 14:47:00 -0000 [thread overview]
Message-ID: <8761vsm7ex.fsf@fleche.redhat.com> (raw)
In-Reply-To: <A78C989F6D9628469189715575E55B230A98E0FE@IRSMSX104.ger.corp.intel.com> (Markus T. Metzger's message of "Tue, 30 Jul 2013 14:06:31 +0000")
>>>>> "Markus" == Metzger, Markus T <markus.t.metzger@intel.com> writes:
Markus> Once we have all the delegates in place, shouldn't we rewrite
Markus> the original target_~ functions to call the respective
Markus> target_delegate_~ with ¤t_target as first argument?
Yeah, that would be good.
Tom> To fix the second problem, this patch adds find_target_at to determine
Tom> whether a target appears at a given stratum. This may seem like
Tom> overkill somehow, but I have a subsequent patch series (see archer.git
Tom> tromey/multi-target) that uses it more heavily.
Markus> I'd rather consistently add struct target_opc *self as first
Markus> parameter to all target functions.
I considered this, but the difficulty is that I can't test, or even
compile, a reasonable subset of the changes.
If that doesn't bother people then I'm happy to change things that way.
I do think it would be cleaner.
Markus> Otherwise, we rely on the fact that the target doing the
Markus> delegation is at the top of its stratum. This holds for record
Markus> targets and I may be ignorant enough to not realize that this
Markus> holds in general. If we could have another target on top of us
Markus> in the same stratum, though, we would delegate to ourselves.
Only a single target can appear at a given stratum. This is enforced by
push_target. This is pretty obscure due to how the code is written; but
with my other target stack series this becomes more obvious.
So I don't think there is an issue here. However, I do agree that it is
a violation of the abstraction.
Tom
next prev parent reply other threads:[~2013-07-30 14:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 16:45 [PATCH 0/8] enable target-async by default Tom Tromey
2013-07-29 16:45 ` [PATCH 5/8] PR gdb/13860: don't lose '-interpreter-exec console EXECUTION_COMMAND''s output in async mode Tom Tromey
2013-07-29 16:45 ` [PATCH 6/8] make dprintf.exp pass in always-async mode Tom Tromey
2013-07-29 16:45 ` [PATCH 2/8] add target method delegation Tom Tromey
2013-07-30 14:07 ` Metzger, Markus T
2013-07-30 14:47 ` Tom Tromey [this message]
2013-07-30 15:08 ` Metzger, Markus T
2013-07-30 15:13 ` Tom Tromey
2013-07-31 12:16 ` Agovic, Sanimir
2013-07-31 17:50 ` Tom Tromey
2013-07-29 16:45 ` [PATCH 3/8] PR gdb/13860: make -interpreter-exec console "list" behave more like "list" Tom Tromey
2013-07-29 16:45 ` [PATCH 7/8] fix py-finish-breakpoint.exp with always-async Tom Tromey
2013-07-29 23:33 ` Doug Evans
2013-07-30 18:10 ` Tom Tromey
2013-07-30 20:56 ` Tom Tromey
2013-07-30 0:36 ` Yao Qi
2013-07-30 19:00 ` Tom Tromey
2013-07-29 16:45 ` [PATCH 8/8] enable target-async Tom Tromey
2013-07-29 18:30 ` Eli Zaretskii
2013-07-29 18:42 ` Tom Tromey
2013-07-29 16:45 ` [PATCH 4/8] PR gdb/13860: make "-exec-foo"'s MI output equal to "foo"'s MI output Tom Tromey
2013-07-29 16:45 ` [PATCH 1/8] fix latent bugs in ui-out.c Tom Tromey
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=8761vsm7ex.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.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