- if (mi_version (uiout) > 1)
- cleanup = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
- ui_out_field_string (uiout, "name", varobj_get_objname (*cc));
- if (mi_print_value_p (varobj_get_gdb_type (*cc), print_values))
- ui_out_field_string (uiout, "value", varobj_get_value (*cc));
- ui_out_field_string (uiout, "in_scope", "true");
- ui_out_field_string (uiout, "type_changed", "false");
- if (mi_version (uiout) > 1)
- do_cleanups (cleanup);
- cc++;
+ if (r->type_changed)
+ ui_out_field_string (uiout, "type_changed", "true");
+ else
+ ui_out_field_string (uiout, "type_changed", "false");
+ }
+
+ if (r->type_changed)
+ ui_out_field_string (uiout, "new_type", varobj_get_type (r->varobj));
+
+ if (r->type_changed || r->children_changed)
+ ui_out_field_int (uiout, "new_num_children",
+ varobj_get_num_children (r->varobj));
+
+ display_hint = varobj_get_display_hint (var);
+ if (display_hint)
+ {
+ ui_out_field_string (uiout, "displayhint", display_hint);
+ xfree (display_hint);
+ }
+
+ if (varobj_pretty_printed_p (var))
+ ui_out_field_int (uiout, "dynamic", 1);
+
+ varobj_get_child_range (r->varobj, &from, &to);
+ ui_out_field_int (uiout, "has_more",
+ varobj_has_more (r->varobj, to));
+
+ if (r->new)
+ {
+ int j;
+ varobj_p child;
+ struct cleanup *cleanup;
+
+ cleanup = make_cleanup_ui_out_list_begin_end (uiout, "new_children");
+ for (j = 0; VEC_iterate (varobj_p, r->new, j, child); ++j)
+ {
+ struct cleanup *cleanup_child;
+
+ cleanup_child
+ = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ print_varobj (child, print_values, 1 /* print_expression */);
+ do_cleanups (cleanup_child);
+ }
+
+ do_cleanups (cleanup);
+ VEC_free (varobj_p, r->new);
+ r->new = NULL; /* Paranoia. */