print_script (struct loaded_script *script)
{
struct ui_out *uiout = current_uiout;
- struct cleanup *chain;
- chain = make_cleanup_ui_out_tuple_begin_end (uiout, NULL);
+ ui_out_emit_tuple tuple_emitter (uiout, NULL);
uiout->field_string ("loaded", script->loaded ? "Yes" : "No");
uiout->field_string ("script", script->name);
uiout->field_string ("full_path", script->full_path);
uiout->text ("\n");
}
-
- do_cleanups (chain);
}
/* Helper for info_auto_load_scripts to sort the scripts by name. */
struct cleanup *infolist_chain;
struct ui_out *uiout = current_uiout;
- infolist_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "infolist");
+ ui_out_emit_tuple tuple_emitter (uiout, "infolist");
for (list = *auto_load_info_cmdlist_get (); list != NULL; list = list->next)
{
- struct cleanup *option_chain
- = make_cleanup_ui_out_tuple_begin_end (uiout, "option");
+ ui_out_emit_tuple option_emitter (uiout, "option");
gdb_assert (!list->prefixlist);
gdb_assert (list->type == not_set_cmd);
uiout->field_string ("name", list->name);
uiout->text (": ");
cmd_func (list, auto_load_info_scripts_pattern_nl, from_tty);
-
- /* Close the tuple. */
- do_cleanups (option_chain);
}
-
- /* Close the tuple. */
- do_cleanups (infolist_chain);
}
/* Initialize "info auto-load " commands prefix and return it. */