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 09/10] Make tdesc_type::u::u::fields an std::vector


On 2017-11-02 06:02 AM, Yao Qi wrote:
> Simon Marchi <simon.marchi@ericsson.com> writes:
> 
>> This patch makes the tdesc_type::u::u::fields an std::vector of
>> tdesc_type_field.   The difficulty here is that the vector is part of a
>> union.  Because of this, I made fields a pointer to a vector, and
>> instantiate/destroy the vector if the type is one that uses this member
>> of the union
> 
> Hi Simon,
> Did you consider remove that union by sub-class tdesc_type.  We can add
> to new sub-classes, tdesc_type_with_fields and tdesc_type_vector, for
> example?

I tried, but didn't get to something I thought was nice.  It should be the right
way to do it with sub-classes though, I'll try a bit harder :)

Simon


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