From 20874c92f88d70f91bbc166ccb8d2f78f09d90a4 Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Sat, 28 Jun 2008 09:42:15 +0000 Subject: * breakpoint.c (moribund_locations): New. (bpstat_stop_status): Process moribund locations. (update_global_location_list): Add removed locations to moribund_locations. (breakpoint_retire_moribund): New. * breakpoint.h (struct bp_location): New field events_till_retirement. (breakpoint_retire_moribund): Declare. * thread.c (thread_count): New. * infrun.c (handle_inferior_event): Call breakpoint_retire_moribund. * gdbthread.h (thread_count): Declare. --- gdb/thread.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/thread.c') diff --git a/gdb/thread.c b/gdb/thread.c index 80d745d..5b1b563 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -230,6 +230,18 @@ iterate_over_threads (int (*callback) (struct thread_info *, void *), } int +thread_count (void) +{ + int result = 0; + struct thread_info *tp; + + for (tp = thread_list; tp; tp = tp->next) + ++result; + + return result; +} + +int valid_thread_id (int num) { struct thread_info *tp; -- cgit v1.1