This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Use visitors for make_gdb_type


On 2018-01-30 10:15 AM, Alan Hayward wrote:
> 
> 
>> On 29 Jan 2018, at 16:54, Yao Qi <qiyaoltc@gmail.com> wrote:
>>
>> On Mon, Jan 29, 2018 at 4:12 PM, Simon Marchi <simon.marchi@ericsson.com> wrote:
>>>
>>> That seems like unnecessary boilerplate to me.  I really don't see why classes derived
>>> from tdesc_element_visitor have to implement methods for nodes they don't care about.
>>>
>>> I added Yao in CC so he can chime in.
>>
>> When I wrote tdesc_element_visitor, in my mind, it is an interface, so
>> I expect child
>> class implement all the methods, because at that moment, all methods are needed,
>> no empty methods.  However, the situation changed a little bit, as per
>> Alan's needs,
>> part of the methods of tdesc_element_visitor are needed, and the rest of methods
>> are empty somewhere.  I don't mind converting tdesc_element_visitor into a base
>> class which has all these methods empty as a default.  That is fine to
>> me.  By the
>> way, Alan's approach is fine to me as well :)
>>
> 
> I’ve removed the extra class and replaced with default implementations in
> tdesc_element_visitor.
> 
> All ok?
> 
> 
> Tested on a make check on x86 targets=all build with target board unix native-gdbserver.
> Built for power (because it does not use new target descriptions), but am unable to test.

Hi Alan,

This version LGTM.

Thanks,

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]