This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB C plugin system, and STL container viewer as an example


Vincent Benony wrote:

>> I don't see how you report that fact that the number of children of a
>> varobj has changed. Without that, I'm not sure how useful MI display
>> of vectors is. Am I missing something?
>> 
>> - Volodya
> 
> this is done by lines 1157 to 1166 of varobj.c
> 
> 
>       if (plugins_type_handled(varobj_get_gdb_type(*varp)))
>       {
>           int new_childs = plugins_get_num_children(*varp);
>           if (new_childs != (*varp)->num_children)
>           {
>               (*varp)->num_children = new_childs;
>               (*varp)->children = varobj_list_children (*varp);
>               VEC_safe_push (varobj_p, result, *varp);
>           }
>       }
> 
> 
> I evaluate the number of children at each update, and I compare with the
> current number of childs stored in the varobj structure, if different,
> object is added to update list.

What happens for vector< vector<int> >? It does not seem like you handle the
inner items.

> 
> It seems to work well into KDevelop 

Strange, I don't know any codepath in KDevelop 3.5 that could possible handle this.
Which version did you try with?

- Volodya



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]