aboutsummaryrefslogtreecommitdiff
path: root/gdb/thread.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2001-06-02 00:36:20 +0000
committerMichael Snyder <msnyder@vmware.com>2001-06-02 00:36:20 +0000
commit8601f500c85902a5ea5134cd9de8adf8bcd27c6b (patch)
treea209fbc25af500fb811ff25618eae29b1e789f51 /gdb/thread.c
parentc6ad9598d052bb904008464632ecb3f81b1c3094 (diff)
downloadgdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.zip
gdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.tar.gz
gdb-8601f500c85902a5ea5134cd9de8adf8bcd27c6b.tar.bz2
2001-06-01 Michael Snyder <msnyder@redhat.com>
* thread.c (delete_step_resume_breakpoint): New function. Maintain internal consistency of the thread list while deleting a step_resume_breakpoint. * gdbthread.h (delete_step_resume_breakpoint): Export. * breakpoint.c (bpstat_find_step_resume_breakpoint): Make thread-aware: don't return a step_resume_breakpoint for the wrong thread. * infrun.c (wait_for_inferior): Call delete_step_resume_breakpoint instead of delete_breakpoint_current_contents. (fetch_inferior_event): Ditto. (handle_inferior_event): Call delete_step_resume_breakpoint instead of delete_breakpoint.
Diffstat (limited to 'gdb/thread.c')
-rw-r--r--gdb/thread.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/thread.c b/gdb/thread.c
index 70dcb370..7a94276 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -65,6 +65,23 @@ static void restore_current_thread (ptid_t);
static void switch_to_thread (ptid_t ptid);
static void prune_threads (void);
+void
+delete_step_resume_breakpoint (void *arg)
+{
+ struct breakpoint **breakpointp = (struct breakpoint **) arg;
+ struct thread_info *tp;
+
+ if (*breakpointp != NULL)
+ {
+ delete_breakpoint (*breakpointp);
+ for (tp = thread_list; tp; tp = tp->next)
+ if (tp->step_resume_breakpoint == *breakpointp)
+ tp->step_resume_breakpoint = NULL;
+
+ *breakpointp = NULL;
+ }
+}
+
static void
free_thread (struct thread_info *tp)
{