summaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index f36def1f279..2c70ee5f955 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -261,11 +261,12 @@ do_captured_list_thread_ids (struct ui_out *uiout,
{
struct thread_info *tp;
int num = 0;
+ struct cleanup *cleanup_chain;
prune_threads ();
target_find_new_threads ();
- ui_out_tuple_begin (uiout, "thread-ids");
+ cleanup_chain = make_cleanup_ui_out_tuple_begin_end (uiout, "thread-ids");
for (tp = thread_list; tp; tp = tp->next)
{
@@ -273,7 +274,7 @@ do_captured_list_thread_ids (struct ui_out *uiout,
ui_out_field_int (uiout, "thread-id", tp->num);
}
- ui_out_tuple_end (uiout);
+ do_cleanups (cleanup_chain);
ui_out_field_int (uiout, "number-of-threads", num);
return GDB_RC_OK;
}