aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.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/stack.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/stack.c')
-rw-r--r--gdb/stack.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index 8dca5e0..07bea73 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -580,15 +580,20 @@ print_frame (struct frame_info *fi,
if (args)
{
struct print_args_args args;
+#ifdef UI_OUT
+ struct cleanup *args_list_chain;
+#endif
args.fi = fi;
args.func = func;
args.stream = gdb_stdout;
#ifdef UI_OUT
ui_out_list_begin (uiout, "args");
+ args_list_chain = make_cleanup_ui_out_list_end (uiout);
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
/* FIXME: args must be a list. If one argument is a string it will
have " that will not be properly escaped. */
- ui_out_list_end (uiout);
+ /* Invoke ui_out_list_end. */
+ do_cleanups (args_list_chain);
#else
catch_errors (print_args_stub, &args, "", RETURN_MASK_ALL);
#endif