+2007-08-31 Vladimir Prus <vladimir@codesourcery.com>
+
+ * mi/mi-cmd-var.c (print_varobj): If a varobj
+ type is NULL, don't try to print it.
+
2007-08-30 Alan Modra <amodra@bigpond.net.au>
* ppc-linux-nat.c (right_fill_reg): Delete.
print_varobj (struct varobj *var, enum print_values print_values,
int print_expression)
{
+ struct type *gdb_type;
char *type;
ui_out_field_string (uiout, "name", varobj_get_objname (var));
ui_out_field_string (uiout, "exp", varobj_get_expression (var));
ui_out_field_int (uiout, "numchild", varobj_get_num_children (var));
- if (mi_print_value_p (varobj_get_gdb_type (var), print_values))
+ gdb_type = varobj_get_gdb_type (var);
+ if (gdb_type && mi_print_value_p (gdb_type, print_values))
ui_out_field_string (uiout, "value", varobj_get_value (var));
type = varobj_get_type (var);