diff options
author | Tom Tromey <tom@tromey.com> | 2017-04-23 10:21:50 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-08-03 07:58:51 -0600 |
commit | 4a2b031d5452226cf7894f313b3aac603f7ec5fb (patch) | |
tree | 8230279453a3136b5d29f238fec14112e1ae80cb /gdb/ada-tasks.c | |
parent | fd9770d81fba7ad860e8bcfbc13c77f21041f1f3 (diff) | |
download | gdb-4a2b031d5452226cf7894f313b3aac603f7ec5fb.zip gdb-4a2b031d5452226cf7894f313b3aac603f7ec5fb.tar.gz gdb-4a2b031d5452226cf7894f313b3aac603f7ec5fb.tar.bz2 |
Introduce and use ui_out_emit_table
This introduces ui_out_emit_table, similar to the other existing
ui_out RAII classes, and then uses it in a number of places. This
replaces some cleanups.
ChangeLog
2017-08-03 Tom Tromey <tom@tromey.com>
* tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
(info_static_tracepoint_markers_command): Likewise.
* solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
* skip.c (skip_info): Use ui_out_emit_table.
* progspace.c (print_program_space): Use ui_out_emit_table.
* osdata.c (info_osdata): Use ui_out_emit_table.
* mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
ui_out_emit_table.
* linux-thread-db.c (info_auto_load_libthread_db): Use
ui_out_emit_table.
* inferior.c (print_inferior): Use ui_out_emit_table.
* gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
* breakpoint.c (breakpoint_1): Use ui_out_emit_table.
* auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
* ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
* ui-out.h (class ui_out_emit_table): New.
Diffstat (limited to 'gdb/ada-tasks.c')
-rw-r--r-- | gdb/ada-tasks.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c index ae43da5..cf43f0e 100644 --- a/gdb/ada-tasks.c +++ b/gdb/ada-tasks.c @@ -1008,7 +1008,6 @@ print_ada_task_info (struct ui_out *uiout, struct ada_tasks_inferior_data *data; int taskno, nb_tasks; int taskno_arg = 0; - struct cleanup *old_chain; int nb_columns; if (ada_build_task_list () == 0) @@ -1047,8 +1046,7 @@ print_ada_task_info (struct ui_out *uiout, nb_tasks = VEC_length (ada_task_info_s, data->task_list); nb_columns = uiout->is_mi_like_p () ? 8 : 7; - old_chain = make_cleanup_ui_out_table_begin_end (uiout, nb_columns, - nb_tasks, "tasks"); + ui_out_emit_table table_emitter (uiout, nb_columns, nb_tasks, "tasks"); uiout->table_header (1, ui_left, "current", ""); uiout->table_header (3, ui_right, "id", "ID"); uiout->table_header (9, ui_right, "task-id", "TID"); @@ -1143,8 +1141,6 @@ print_ada_task_info (struct ui_out *uiout, uiout->text ("\n"); } - - do_cleanups (old_chain); } /* Print a detailed description of the Ada task whose ID is TASKNO_STR |