I have used 4 spaces for tabs in ChangeLog, sorry. Fixed. Thanks, Anton gdb/ChangeLog: 2011-12-02 Anton Gorenkov PR mi/13393 * gdb/valops.c (value_rtti_target_type): Replaced with value_rtti_indirect_type. (value_rtti_indirect_type): New function. The same as value_rtti_target_type, but return a reference or pointer type (because every caller do it after call that leads to code duplication). * gdb/c-valprint.c (c_value_print): Use value_rtti_indirect_type instead of value_rtti_target_type. * gdb/eval.c (evaluate_subexp_standard): Use value_rtti_indirect_type instead of value_rtti_target_type. * gdb/typeprint.c: Use value_rtti_indirect_type instead of value_rtti_target_type. * gdb/value.c (value_actual_type): New function. (value_rtti_indirect_type): New function. (coerce_ref): Support for enclosing type setting for references with readjust_value_type. * gdb/value.h (value_actual_type): Add prototype. (readjust_value_type): Add prototype. * gdb/valops.c (value_ind): Extract value type and enclosing type setting to a separate function readjust_value_type. * gdb/varobj.c (varobj_create): Call value_actual_type if necessary. (create_child_with_value): Call value_actual_type. (value_of_root): Support for type change if the value changed and RTTI is used to determine type. (adjust_value_for_child_access): Extended with a new parameter and cast given value to enclosing type is necessary. (c_number_of_children): Updated for extended adjust_value_for_child_access. (cplus_number_of_children): Send a value as parameter if RTTI should be used to determine type. (cplus_describe_child): Determine whether RTTI type should be used. gdb/testsuite/ChangeLog: 2011-12-02 Anton Gorenkov PR mi/13393 * gdb.mi/mi-var-rtti.cc: New file. * gdb.mi/mi-var-rtti.exp: New file.