Hello! At the moment, MI's variable objects are too eager. For example, if you create a variable object corresponding to a structure, gdb will read the entire structure from the memory, even though it never does anything with that value directly. Structure values are not compared, and you can't access them other than by creating children variable objects. For example, if you have a huge structure containing two structure fields, gdb will read all the outer structure even though you never open one of the children structures. Worse, the code for fetching the values is scattered over a number of places. This patch cleans up all this: - There's just one function that decides if we must fetch the value - The decision is consistent with the way gdb uses variable objects No regressions on gdb.mi testsuite on x86. OK? - Volodya * varobj.c (struct varobj): Clarify comment. (my_value_equal): Remove. (install_new_value): New. (type_of_child): Remove. (varobj_create): Use install_new_value. (varobj_set_value): Use value_contents_equal, not my_value_equal. (varobj_update): Use install_new_value. (create_child): Likewise. Inline type_of_child here. (value_of_child): Don't fetch the value. (c_value_of_root): Likewise. (c_value_of_variable): Likewise.