aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorVladimir Prus <vladimir@codesourcery.com>2008-06-28 09:42:15 +0000
committerVladimir Prus <vladimir@codesourcery.com>2008-06-28 09:42:15 +0000
commit20874c92f88d70f91bbc166ccb8d2f78f09d90a4 (patch)
tree4e7e123ebc40feaf8a12d48b36a7b4a6dfd19e9d /gdb/thread.c
parent2a9bd7a88c03fc8e9fea49f9e4c09df819b4ec23 (diff)
downloadbinutils-20874c92f88d70f91bbc166ccb8d2f78f09d90a4.zip
binutils-20874c92f88d70f91bbc166ccb8d2f78f09d90a4.tar.gz
binutils-20874c92f88d70f91bbc166ccb8d2f78f09d90a4.tar.bz2
* 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.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c12
1 files changed, 12 insertions, 0 deletions
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;