From: Tom Tromey <tom@tromey.com>
To: Pedro Alves <palves@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/3] Introduce process_stratum_target
Date: Fri, 30 Nov 2018 15:40:00 -0000 [thread overview]
Message-ID: <87sgzi1smq.fsf@tromey.com> (raw)
In-Reply-To: <69876a1c-d4fa-deeb-b124-53fce26f4cc0@redhat.com> (Pedro Alves's message of "Fri, 30 Nov 2018 14:22:12 +0000")
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> What if I added a protected constructor to target_ops that took the
>> stratum as an argument? Would there be a problem with that?
Pedro> I don't see a problem with that, but, given that a target's stratum is
Pedro> a property of the type, and not of an instance of the type, wouldn't it
Pedro> be better to get rid of to_stratum and replace it with a virtual method?
Pedro> I.e., when we have 10 target remote instances active, there's no need
Pedro> for each of the instances to have their own to_stratum copy.
Pedro> Like this, on top of the series.
Looks good to me, thanks.
Of course now perhaps the constant should just be a template argument :)
But that seemed like a pain and there's nothing wrong with this patch.
Tom
next prev parent reply other threads:[~2018-11-30 15:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-27 20:22 [PATCH 0/3] " Pedro Alves
2018-11-27 20:22 ` [PATCH 1/3] Move test_target_ops to a separate file Pedro Alves
2018-11-27 20:23 ` [PATCH 2/3] Introduce process_stratum_target Pedro Alves
2018-11-29 18:26 ` Tom Tromey
2018-11-29 23:16 ` Tom Tromey
2018-11-30 14:22 ` Pedro Alves
2018-11-30 15:40 ` Tom Tromey [this message]
2018-11-30 17:52 ` Pedro Alves
2018-11-27 20:23 ` [PATCH 3/3] Convert default_child_has_foo functions to process_stratum_target methods Pedro Alves
2018-11-29 18:31 ` Tom Tromey
2018-11-30 16:31 ` Pedro Alves
2018-11-29 18:31 ` [PATCH 0/3] Introduce process_stratum_target 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=87sgzi1smq.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.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