This patch merges the code for getting name, value and type of varobj children for C++ into one function, just like the previously posted patch for C. This was manually tested from KDevelop. We really need tests for MI C++ functionality, and I plan to write them, but only after my patch that makes it possible to write MI tests using just C files is approved. Is this patch OK provided that tests will be writted before committing? - Volodya Refactor getting children name, value and type access for varobjs in C++. * value.c (value_as_address): Use coerce_array_proper instead of coerce_array so that not fail for references. (coerce_array_proper): New function. (coerce_array): Use the above. * value.h (coerce_array_proper): Declare. * valops.c (value_ind): Handle references. * varobj.c (adjust_value_for_children_access): New. (c_describe_child): Use the above. (enum accessibility): New. (match_accessibility): New function. (cplus_describe_child): New function. (cplus_name_of_child, cplus_value_of_child) (cplus_type_of_child): Reimplement in terms of cplus_describe_child.