+2001-04-08 Kevin Buettner <kevinb@redhat.com>
+
+ * printcmd.c (print_frame_args): Use a cleanup to invoke
+ ui_out_list_end() so that the list count nesting flag will
+ be decremented properly when an error occurs.
+ * stack.c (print_frame): Likewise.
+
2001-04-06 J.T. Conklin <jtc@redback.com>
* dcache.c (dcache_write_line): Fixed bugs where cache line was
/* 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);
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);
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),
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