[RFA] Use vector for varobj_list_children interface.
Vladimir Prus
vladimir@codesourcery.com
Wed Jan 30 07:22:00 GMT 2008
On Wednesday 30 January 2008 00:52:40 Daniel Jacobowitz wrote:
> 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.
Right. I've added a comment to varobj_list_children to make
this more clear.
>
> > -int
> > -varobj_list_children (struct varobj *var, struct varobj ***childlist)
> > +VEC(varobj_p)*
>
> Space there :-)
Strictly speaking, I think that gcc does not use space after VEC. But
I have better things to do that arguing about this ;-)
> Otherwise OK, thanks.
Thanks. I've also noticed I did not update dependencies for varobj_h,
now that it includes vec.h. I've added that, and checked in.
- Volodya
More information about the Gdb-patches
mailing list