This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use vector for varobj_list_children interface.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 29 Jan 2008 16:52:40 -0500
- Subject: Re: [RFA] Use vector for varobj_list_children interface.
- References: <200801171755.47572.vladimir@codesourcery.com>
On Thu, Jan 17, 2008 at 05:55:47PM +0300, Vladimir Prus wrote:
> + for (ix = 0; VEC_iterate (varobj_p, children, ix, child); ++ix)
> {
> struct cleanup *cleanup_child;
> cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child");
> - print_varobj (*cc, print_values, 1 /* print expression */);
> - cc++;
> + print_varobj (child, print_values, 1 /* print expression */);
> do_cleanups (cleanup_child);
> }
> do_cleanups (cleanup_children);
> - xfree (childlist);
> return MI_CMD_DONE;
> }
Not freeing children here is on purpose, right? It's now the copy
from inside the varobj.
> -int
> -varobj_list_children (struct varobj *var, struct varobj ***childlist)
> +VEC(varobj_p)*
Space there :-)
> +varobj_list_children (struct varobj *var)
> -extern int varobj_list_children (struct varobj *var,
> - struct varobj ***childlist);
> +extern VEC(varobj_p)* varobj_list_children (struct varobj *var);
Space there too.
Otherwise OK, thanks.
--
Daniel Jacobowitz
CodeSourcery