diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-08-23 22:40:00 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-08-23 22:40:00 +0000 |
commit | 53a5351d907ef4eacd463a48a86d35b2b70b9f60 (patch) | |
tree | 22c35199ec70962e33c63d2111f333bfdcce02e1 /gdb/thread.c | |
parent | 093505ad6138b9e165876765ecd667c90fc921ae (diff) | |
download | gdb-53a5351d907ef4eacd463a48a86d35b2b70b9f60.zip gdb-53a5351d907ef4eacd463a48a86d35b2b70b9f60.tar.gz gdb-53a5351d907ef4eacd463a48a86d35b2b70b9f60.tar.bz2 |
import gdb-1999-08-23 snapshot
Diffstat (limited to 'gdb/thread.c')
-rw-r--r-- | gdb/thread.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/gdb/thread.c b/gdb/thread.c index 4be1a74..4a2070b 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -160,6 +160,11 @@ delete_thread (pid) else thread_list = tp->next; + /* NOTE: this will take care of any left-over step_resume breakpoints, + but not any user-specified thread-specific breakpoints. */ + if (tp->step_resume_breakpoint) + delete_breakpoint (tp->step_resume_breakpoint); + free (tp); return; @@ -350,20 +355,11 @@ prune_threads () { struct thread_info *tp, *tpprev, *next; - tpprev = 0; for (tp = thread_list; tp; tp = next) { next = tp->next; if (!thread_alive (tp)) - { - if (tpprev) - tpprev->next = next; - else - thread_list = next; - free (tp); - } - else - tpprev = tp; + delete_thread (tp->pid); } } |