aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-04-12 16:30:21 -0600
committerTom Tromey <tom@tromey.com>2017-04-22 09:47:01 -0600
commit10f489e57677e670bf980e93896762594e9ad908 (patch)
treebaaeb8059b91d5eac4e0b633f65d6b64f220d114 /gdb/breakpoint.c
parent0092b74da6d86185c4d0c0fa0f540b97647bf44a (diff)
downloadgdb-10f489e57677e670bf980e93896762594e9ad908.zip
gdb-10f489e57677e670bf980e93896762594e9ad908.tar.gz
gdb-10f489e57677e670bf980e93896762594e9ad908.tar.bz2
Use ui_out_emit_list
This changes some spots to use ui_out_emit_list. This only touches "easy" cases, where the cleanup was used in a block-structured way. There's also one more use of ui_out_emit_tuple in here. ChangeLog 2017-04-22 Tom Tromey <tom@tromey.com> * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use ui_out_emit_list. * stack.c (print_frame): Use ui_out_emit_list. * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use ui_out_emit_list. * mi/mi-main.c (print_one_inferior) (mi_cmd_data_list_register_names) (mi_cmd_data_list_register_values, mi_cmd_list_features) (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use ui_out_emit_list. * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list. (mi_output_solib_attribs): Use ui_out_emit_list, ui_out_emit_tuple. * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list. * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames) (mi_cmd_stack_list_args, list_args_or_locals): Use ui_out_emit_list. * disasm.c (do_assembly_only): Use ui_out_emit_list. * breakpoint.c (print_solib_event, output_thread_groups): Use ui_out_emit_list.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 269cddd..b0f7cb5 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -4885,13 +4885,11 @@ print_solib_event (int is_catchpoint)
if (any_deleted)
{
- struct cleanup *cleanup;
char *name;
int ix;
current_uiout->text (_(" Inferior unloaded "));
- cleanup = make_cleanup_ui_out_list_begin_end (current_uiout,
- "removed");
+ ui_out_emit_list list_emitter (current_uiout, "removed");
for (ix = 0;
VEC_iterate (char_ptr, current_program_space->deleted_solibs,
ix, name);
@@ -4902,19 +4900,15 @@ print_solib_event (int is_catchpoint)
current_uiout->field_string ("library", name);
current_uiout->text ("\n");
}
-
- do_cleanups (cleanup);
}
if (any_added)
{
struct so_list *iter;
int ix;
- struct cleanup *cleanup;
current_uiout->text (_(" Inferior loaded "));
- cleanup = make_cleanup_ui_out_list_begin_end (current_uiout,
- "added");
+ ui_out_emit_list list_emitter (current_uiout, "added");
for (ix = 0;
VEC_iterate (so_list_ptr, current_program_space->added_solibs,
ix, iter);
@@ -4925,8 +4919,6 @@ print_solib_event (int is_catchpoint)
current_uiout->field_string ("library", iter->so_name);
current_uiout->text ("\n");
}
-
- do_cleanups (cleanup);
}
}
@@ -6271,7 +6263,6 @@ output_thread_groups (struct ui_out *uiout,
VEC(int) *inf_num,
int mi_only)
{
- struct cleanup *back_to;
int is_mi = uiout->is_mi_like_p ();
int inf;
int i;
@@ -6281,7 +6272,7 @@ output_thread_groups (struct ui_out *uiout,
if (!is_mi && mi_only)
return;
- back_to = make_cleanup_ui_out_list_begin_end (uiout, field_name);
+ ui_out_emit_list list_emitter (uiout, field_name);
for (i = 0; VEC_iterate (int, inf_num, i, inf); ++i)
{
@@ -6302,8 +6293,6 @@ output_thread_groups (struct ui_out *uiout,
uiout->text (plongest (inf));
}
}
-
- do_cleanups (back_to);
}
/* Print B to gdb_stdout. */