diff options
author | Tom Tromey <tom@tromey.com> | 2017-09-09 09:16:49 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2017-09-09 13:46:04 -0600 |
commit | dc9fe180a4437b437015a8b835d05e32d64dff3d (patch) | |
tree | 10445ce96625632b46c715fdc7bcb55906b119c4 /gdb/darwin-nat-info.c | |
parent | f8cc3da6e4548529eabb1ff4e9693261aae1cfee (diff) | |
download | fsf-binutils-gdb-dc9fe180a4437b437015a8b835d05e32d64dff3d.zip fsf-binutils-gdb-dc9fe180a4437b437015a8b835d05e32d64dff3d.tar.gz fsf-binutils-gdb-dc9fe180a4437b437015a8b835d05e32d64dff3d.tar.bz2 |
Remove make_cleanup_ui_out_table_begin_end
This changes the few remaining uses of
make_cleanup_ui_out_table_begin_end to use ui_out_emit_table instead,
and then removes the cleanup.
ChangeLog
2017-09-09 Tom Tromey <tom@tromey.com>
* ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
(class ui_out_emit_table): Update comment.
* ui-out.c (do_cleanup_table_end)
(make_cleanup_ui_out_table_begin_end): Remove.
* spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
(info_spu_dma_cmdlist): Likewise.
* probe.c (info_probes_for_ops): Use ui_out_emit_table.
* darwin-nat-info.c (darwin_debug_regions_recurse): Use
ui_out_emit_table.
Diffstat (limited to 'gdb/darwin-nat-info.c')
-rw-r--r-- | gdb/darwin-nat-info.c | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c index c15c2fd..fc9aeaa 100644 --- a/gdb/darwin-nat-info.c +++ b/gdb/darwin-nat-info.c @@ -617,10 +617,9 @@ darwin_debug_regions_recurse (task_t task) vm_region_submap_short_info_data_64_t r_info; kern_return_t kret; int ret; - struct cleanup *table_chain; struct ui_out *uiout = current_uiout; - table_chain = make_cleanup_ui_out_table_begin_end (uiout, 9, -1, "regions"); + ui_out_emit_table table_emitter (uiout, 9, -1, "regions"); if (gdbarch_addr_bit (target_gdbarch ()) <= 32) { @@ -647,7 +646,6 @@ darwin_debug_regions_recurse (task_t task) while (1) { const char *tag; - struct cleanup *row_chain; r_info_size = VM_REGION_SUBMAP_SHORT_INFO_COUNT_64; r_size = -1; @@ -656,28 +654,29 @@ darwin_debug_regions_recurse (task_t task) &r_info_size); if (kret != KERN_SUCCESS) break; - row_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "regions-row"); - - uiout->field_core_addr ("start", target_gdbarch (), r_start); - uiout->field_core_addr ("end", target_gdbarch (), r_start + r_size); - uiout->field_string ("min-prot", - unparse_protection (r_info.protection)); - uiout->field_string ("max-prot", - unparse_protection (r_info.max_protection)); - uiout->field_string ("inheritence", - unparse_inheritance (r_info.inheritance)); - uiout->field_string ("share-mode", - unparse_share_mode (r_info.share_mode)); - uiout->field_int ("depth", r_depth); - uiout->field_string ("submap", - r_info.is_submap ? _("sm ") : _("obj")); - tag = unparse_user_tag (r_info.user_tag); - if (tag) - uiout->field_string ("tag", tag); - else - uiout->field_int ("tag", r_info.user_tag); - do_cleanups (row_chain); + { + ui_out_emit_tuple tuple_emitter (uiout, "regions-row"); + + uiout->field_core_addr ("start", target_gdbarch (), r_start); + uiout->field_core_addr ("end", target_gdbarch (), r_start + r_size); + uiout->field_string ("min-prot", + unparse_protection (r_info.protection)); + uiout->field_string ("max-prot", + unparse_protection (r_info.max_protection)); + uiout->field_string ("inheritence", + unparse_inheritance (r_info.inheritance)); + uiout->field_string ("share-mode", + unparse_share_mode (r_info.share_mode)); + uiout->field_int ("depth", r_depth); + uiout->field_string ("submap", + r_info.is_submap ? _("sm ") : _("obj")); + tag = unparse_user_tag (r_info.user_tag); + if (tag) + uiout->field_string ("tag", tag); + else + uiout->field_int ("tag", r_info.user_tag); + } if (!uiout->is_mi_like_p ()) uiout->text ("\n"); @@ -687,8 +686,6 @@ darwin_debug_regions_recurse (task_t task) else r_start += r_size; } - do_cleanups (table_chain); - } |