diff options
author | Vladimir Prus <vladimir@codesourcery.com> | 2008-06-28 09:42:15 +0000 |
---|---|---|
committer | Vladimir Prus <vladimir@codesourcery.com> | 2008-06-28 09:42:15 +0000 |
commit | 802b983480609a1e3c6bd01cf505fc1b856fae58 (patch) | |
tree | e663fefed176c49b1fac8a4856a5ae336a8548ee /gdb/thread.c | |
parent | d4f0ecf6eba15bbd0f130006e3f225e530025dab (diff) | |
download | gdb-802b983480609a1e3c6bd01cf505fc1b856fae58.tar.gz |
* 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.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 80d745dc306..5b1b563fa14 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; |