This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [V4 01/18] vla: introduce allocated/associated flags
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Doug Evans <dje at google dot com>
- Cc: Keven Boell <keven dot boell at intel dot com>, gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 11 Feb 2015 12:43:54 +0400
- Subject: Re: [V4 01/18] vla: introduce allocated/associated flags
- Authentication-results: sourceware.org; auth=none
- References: <1421243390-24015-1-git-send-email-keven dot boell at intel dot com> <1421243390-24015-2-git-send-email-keven dot boell at intel dot com> <20150209065213 dot GA15579 at adacore dot com> <CADPb22TFD7QOcK169oDngxieQJSZO5MdYKmQZk_Jx0916aKtNw at mail dot gmail dot com>
> I can even imagine removing data_location from the main_type "base class"
> [see below]. But I'm not advocating that that needs to be done
> now or even soon.
I thought of that, also, and in the end, decided not to suggest it
because it is slightly more complex to implement. In particular,
you'd need to know whether you'll neex some extra room at the end
before you allocate the type (or else, you'll have to realloc it
later on, and this might not be easy to do when it is allocated on
an obstack). There were also minor difficulties associated to
debugging and pretty-printing, but nothing necessarily unsurmountable.
Probably, as you suggest also, sub-classing would help more.
--
Joel