This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 09/10] Make tdesc_type::u::u::fields an std::vector
- From: Yao Qi <qiyaoltc at gmail dot com>
- To: Simon Marchi <simon dot marchi at ericsson dot com>
- Cc: <gdb-patches at sourceware dot org>, Simon Marchi <simon dot marchi at polymtl dot ca>
- Date: Thu, 02 Nov 2017 10:02:04 +0000
- Subject: Re: [PATCH 09/10] Make tdesc_type::u::u::fields an std::vector
- Authentication-results: sourceware.org; auth=none
- References: <1509414120-14659-1-git-send-email-simon.marchi@ericsson.com> <1509414120-14659-10-git-send-email-simon.marchi@ericsson.com>
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?
--
Yao (齐尧)