As the first patch was approved (not checked in though cause my account hasn't been created yet) here is the second part of the changes. Note, that this patch relies on changes from the previous one. Thanks, Anton 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. gdb/ChangeLog: 2011-12-02 Anton Gorenkov PR mi/13393 * value.c (value_actual_type): New function. * value.h (value_actual_type): New declaration. * varobj.c (varobj_create): Call value_actual_type instead of value_type. (create_child_with_value): Call value_actual_type instead of value_type. (value_of_root): Support for type change if the value changed and RTTI is used to determine the type. (adjust_value_for_child_access): Extended with a new parameter and cast given value to enclosing type if it is set. (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.