[PATCH 2/3] Introduce process_stratum_target

Tom Tromey tom@tromey.com
Fri Nov 30 15:40:00 GMT 2018


>>>>> "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



More information about the Gdb-patches mailing list