This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/commit/Ada] Replace home-made string_vector struct with VEC
On Tue, Feb 05, 2008 at 05:57:03PM -0800, Joel Brobecker wrote:
> 1. Would it make sense to have standard VECs predefined somewhere?
> For instance, I wonder how often a VEC of strings will be useful
> in GDB...
Sounds reasonable to me.
> 2. Would it make sense to expand the VEC API to have a method
> that will return a copy of the underlying array? After some
> thoughts, and a look at the current usage, it seemed to me
> that it didn't make much sense. I didn't see any other places
> where we need to make that copy, and making that copy is
> pretty simple.
I agree. The memory allocation doesn't work out to make this
advantageous.
If we want to save the copy, allowing some other way to register a
destructor for the array might do more good.
Thanks!
--
Daniel Jacobowitz
CodeSourcery