gdb/testsuite/ChangeLog: 2012-03-18 Anton Gorenkov PR mi/13393 * gdb.mi/mi-var-rtti.cc: New file. * gdb.mi/mi-var-rtti.exp: New file. * lib/mi-support.exp (mi_varobj_update_with_child_type_change): New function. (mi_varobj_update_with_type_change): updated to avoid code duplication. gdb/ChangeLog: 2012-03-18 Anton Gorenkov PR mi/13393 * value.c (value_actual_type): New function. * value.h (value_actual_type): New declaration. * varobj.c (update_type_if_necessary): New function. (varobj_create): Call value_actual_type instead of value_type. (install_dynamic_child): distinct changed and type changed MI variable objects. (update_dynamic_varobj_children): Updated for install_dynamic_child change. (varobj_get_num_children): Likewise. (varobj_list_children): Likewise. (varobj_update): Support for MI variable object type change if the value changed and RTTI is used to determine the type. (create_child_with_value): Call value_actual_type instead of value_type. (adjust_value_for_child_access): Extended with a new parameter which specify whether the given value should be casted to enclosing type. (c_number_of_children): Updated for extended adjust_value_for_child_access. (c_describe_child): Updated for extended adjust_value_for_child_access. (cplus_number_of_children): Updated for extended adjust_value_for_child_access. (cplus_describe_child): Updated for extended adjust_value_for_child_access.