Vladimir Prus wrote: > > This patch changes varobj.c to use VEC for hodling children, thereby > making three functions unnecessary. No regressions in MI tests. OK? Here's a revised patch, that additionally replaces 'vstack' code in varobj.c with VEC(). All in all, some 130 lines of code gets wiped now. OK? - Volodya gdb/ * varobj.c: Include "vec.h". (varobj_p): New typedef, declare vector of those. (struct varobj): Use vector for the 'children' member. (child_exists): Remove. (save_child_in_parent): Remove. (remove_child_from_parent): Remove. (struct varobj_child): Remove. (struct vstack): Remove. (vpush, vpop): Remove. (varobj_list_children): Adjust to work work vector. (varobj_update): Likewise. Use vectors for working stack and result. (delete_variable_1): Likewise. * Makefile.in (varobj.o): Update dependencies. testsuite/ * gdb.mi/mi-var-child.exp: Adjust to the change in order of varobjs reported by -var-update. * gdb.mi/mi2-var-child.exp: Likewise.