diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2007-08-31 18:41:50 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2007-08-31 18:41:50 +0000 |
commit | bccc275a135787a5ea86a6492f387dbbe4dd2080 (patch) | |
tree | eb1455ebacbe9a6ab2e9238984cf138385f38852 /gdb/mi | |
parent | f469d32bb9cb3e0bf4033c0c25a3701a303e7e14 (diff) | |
download | gdb-bccc275a135787a5ea86a6492f387dbbe4dd2080.zip gdb-bccc275a135787a5ea86a6492f387dbbe4dd2080.tar.gz gdb-bccc275a135787a5ea86a6492f387dbbe4dd2080.tar.bz2 |
* mi/mi-cmd-var.c (print_varobj): If a varobj
type is NULL, don't try to print it.
Diffstat (limited to 'gdb/mi')
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 38213e6..05fe7a9 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -47,6 +47,7 @@ static void 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)); @@ -54,7 +55,8 @@ print_varobj (struct varobj *var, enum print_values print_values, 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); |