From d56d46f5c7560a45f3a1c6101893ca84969c98a9 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Wed, 30 Jan 2008 07:17:31 +0000 Subject: Use vector for varobj_list_children interface. * gdb/varobj.c (varobj_list_children): Return vector of varobjs. * gdb/varobj.h (varobj_list_children): Adjust prototype. (varobj_p): Declare. Declare vector thereof. * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust for varobj_list_children change. * Makefile.in (varobj_h): Update dependencies. --- gdb/varobj.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gdb/varobj.h') diff --git a/gdb/varobj.h b/gdb/varobj.h index 588eebe1..e0a5c17 100644 --- a/gdb/varobj.h +++ b/gdb/varobj.h @@ -20,6 +20,7 @@ #include "symtab.h" #include "gdbtypes.h" +#include "vec.h" /* Enumeration for the format types */ enum varobj_display_formats @@ -61,6 +62,9 @@ extern char *varobj_language_string[]; /* Struct thar describes a variable object instance */ struct varobj; +typedef struct varobj *varobj_p; +DEF_VEC_P (varobj_p); + /* API functions */ extern struct varobj *varobj_create (char *objname, @@ -91,8 +95,9 @@ extern int varobj_get_frozen (struct varobj *var); extern int varobj_get_num_children (struct varobj *var); -extern int varobj_list_children (struct varobj *var, - struct varobj ***childlist); +/* Return the list of children of VAR. The returned vector + should not be modified in any way. */ +extern VEC (varobj_p)* varobj_list_children (struct varobj *var); extern char *varobj_get_type (struct varobj *var); -- cgit v1.1