aboutsummaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-04-08 17:55:13 +0000
committerKevin Buettner <kevinb@redhat.com>2001-04-08 17:55:13 +0000
commitd493eb331e42b99fd3a9cea536f4dda6d5e8e961 (patch)
tree6a931538c77cbb8a4f6e9bf16af7af7c9e56f112 /gdb/printcmd.c
parentfdec3cfc8342fc200faf001c8d5c83f324e2a08a (diff)
downloadgdb-d493eb331e42b99fd3a9cea536f4dda6d5e8e961.zip
gdb-d493eb331e42b99fd3a9cea536f4dda6d5e8e961.tar.gz
gdb-d493eb331e42b99fd3a9cea536f4dda6d5e8e961.tar.bz2
Use cleanup machinery to invoke ui_out_list_end().
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 92e06ef..c49f51b 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1790,7 +1790,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num,
/* Number of ints of arguments that we have printed so far. */
int args_printed = 0;
#ifdef UI_OUT
- struct cleanup *old_chain;
+ struct cleanup *old_chain, *list_chain;
struct ui_stream *stb;
stb = ui_out_stream_new (uiout);
@@ -1909,6 +1909,7 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num,
annotate_arg_begin ();
ui_out_list_begin (uiout, NULL);
+ list_chain = make_cleanup_ui_out_list_end (uiout);
fprintf_symbol_filtered (stb->stream, SYMBOL_SOURCE_NAME (sym),
SYMBOL_LANGUAGE (sym), DMGL_PARAMS | DMGL_ANSI);
ui_out_field_stream (uiout, "name", stb);
@@ -1951,7 +1952,8 @@ print_frame_args (struct symbol *func, struct frame_info *fi, int num,
else
ui_out_text (uiout, "???");
- ui_out_list_end (uiout);
+ /* Invoke ui_out_list_end. */
+ do_cleanups (list_chain);
#else
val_print (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
VALUE_ADDRESS (val),