diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2002-10-23 21:17:51 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2002-10-23 21:17:51 +0000 |
commit | 6ad4a2cfb3c7a64bff8df4750c03f796b9a431c4 (patch) | |
tree | 9570a81c1e2081478b67e99d11fff0fdd0c1c6fd /gdb/mi/mi-cmd-var.c | |
parent | 475c2a7e6528e2f03957b5c2689f5fe4da8c53ce (diff) | |
download | gdb-6ad4a2cfb3c7a64bff8df4750c03f796b9a431c4.zip gdb-6ad4a2cfb3c7a64bff8df4750c03f796b9a431c4.tar.gz gdb-6ad4a2cfb3c7a64bff8df4750c03f796b9a431c4.tar.bz2 |
2002-10-23 Jeff Johnston <jjohnstn@redhat.com>
* mi-cmd-var.c: Change all remaining occurrences of ui_out_tuple_begin
to make_cleanup_ui_out_tuple_begin_end. Change all remaining
occurrences of ui_out_list_begin to make_cleanup_ui_out_list_begin_end. Use do_cleanups instead of ui_out_list_end or ui_out_tuple_end. This
is a fix for PR gdb/680.
* mi-cmd-stack.c: Ditto.
* mi-main.c: Ditto.
Diffstat (limited to 'gdb/mi/mi-cmd-var.c')
-rw-r--r-- | gdb/mi/mi-cmd-var.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index 1149066..ee65deb 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -254,6 +254,7 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) struct varobj *var; struct varobj **childlist; struct varobj **cc; + struct cleanup *cleanup_children; int numchild; char *type; @@ -271,11 +272,12 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) if (numchild <= 0) return MI_CMD_DONE; - ui_out_tuple_begin (uiout, "children"); + cleanup_children = make_cleanup_ui_out_tuple_begin_end (uiout, "children"); cc = childlist; while (*cc != NULL) { - ui_out_tuple_begin (uiout, "child"); + struct cleanup *cleanup_child; + cleanup_child = make_cleanup_ui_out_tuple_begin_end (uiout, "child"); ui_out_field_string (uiout, "name", varobj_get_objname (*cc)); ui_out_field_string (uiout, "exp", varobj_get_expression (*cc)); ui_out_field_int (uiout, "numchild", varobj_get_num_children (*cc)); @@ -283,10 +285,10 @@ mi_cmd_var_list_children (char *command, char **argv, int argc) /* C++ pseudo-variables (public, private, protected) do not have a type */ if (type) ui_out_field_string (uiout, "type", varobj_get_type (*cc)); - ui_out_tuple_end (uiout); + do_cleanups (cleanup_child); cc++; } - ui_out_tuple_end (uiout); + do_cleanups (cleanup_children); xfree (childlist); return MI_CMD_DONE; } |