Vladimir Prus wrote: > > I've noticed that the -var-show-references returns 'attr=noneditable' for > structures, but 'attr=editable' for references to structures, which makes > no sense. I've also noticed that while for structures, we don't compare old and new values, and never report varobj corresponding to structure as changed, we do all that for references to structures. This patch fixes both problems, OK? - Volodya Fix the 'editable' attribute computation for references. testsuite/ * lib/mi-support.exp (mi_delete_varobj): New. * gdb.mi/mi-var-cp.exp: Run the reference_to_struct testcase. * gdb.mi/mi-var-cp.cc (reference_to_struct): New function. (main): Call the above. (reference_update_test, base_in_reference_test) (reference_to_pointer): Delete the created varobjs. gdb/ * varobj.c (get_value_type): New function. (c_variable_editable): Use get_value_type. (varobj_value_is_changeable): Likewise.