aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-02-03 01:18:37 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2003-02-03 01:18:37 +0000
commit3b31d625f3b05256b22c245c144e7e228e20f079 (patch)
tree7ef7e2358a674252f8bbf5fa71ab1e031837d057 /gdb/thread.c
parent70a296bc46ba0532f6160caf76355c7e601a1060 (diff)
downloadgdb-3b31d625f3b05256b22c245c144e7e228e20f079.zip
gdb-3b31d625f3b05256b22c245c144e7e228e20f079.tar.gz
gdb-3b31d625f3b05256b22c245c144e7e228e20f079.tar.bz2
2003-02-02 Elena Zannoni <ezannoni@redhat.com>
Fix PR gdb/742 gdb/743 * disasm.c (dump_insns): Use make_cleanup_ui_out_tuple_begin_end. (do_mixed_source_and_assembly): Use make_cleanup_ui_out_tuple_begin_end and make_cleanup_ui_out_tuple_begin_end. (do_mixed_source_and_assembly): Ditto. * thread.c (do_captured_list_thread_ids): Ditto. * ui-out.h (ui_out_table_begin, ui_out_list_begin, ui_out_tuple_begin, ui_out_table_end, ui_out_list_end, ui_out_tuple_end): Delete prototypes. * ui-out.c (ui_out_list_begin, ui_out_tuple_begin, ui_out_list_end, ui_out_tuple_end): Delete. From Kevin Buettner <kevinb@redhat.com>: * ui-out.h (make_cleanup_ui_out_table_begin_end): New function. * ui-out.c (make_cleanup_ui_out_table_begin_end) (do_cleanup_table_end): New functions. * breakpoint.c (print_it_typical, print_one_breakpoint, mention): Use cleanups to invoke_ui_out_tuple_end(). (breakpoint_1): Use cleanup to invoke ui_out_table_end(). * cli/cli-setshow.c (cmd_show_list): Use make_cleanup_ui_out_tuple_begin_end.
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 f36def1..2c70ee5 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;
}