There were two places where varobjs are printed, which makes it hard to add new fields, or new commands that create varobjs. This patch create new function. No regressions. It slightly changed the behaviour -- if we create a varobj with -var-create and it has no type, the old code would print type="" and the new code does not print "type" field at all. That's no a problem, however -- if there's no type for a top-level variable, you'll have lots of asserts fire before even going to printing. OK? - Volodya * mi/mi-cmd-var.c (print_varobj): New function. (mi_cmd_var_create): Use the above. (mi_cmd_var_list_children): Likewise.