aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.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/breakpoint.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/breakpoint.c')
-rw-r--r--gdb/breakpoint.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 4fffa53..cb51a55 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -1719,13 +1719,19 @@ bpstat_find_breakpoint (bpstat bsp, struct breakpoint *breakpoint)
struct breakpoint *
bpstat_find_step_resume_breakpoint (bpstat bsp)
{
+ int current_thread;
+
if (bsp == NULL)
error ("Internal error (bpstat_find_step_resume_breakpoint)");
+ current_thread = pid_to_thread_id (inferior_ptid);
+
for (; bsp != NULL; bsp = bsp->next)
{
if ((bsp->breakpoint_at != NULL) &&
- (bsp->breakpoint_at->type == bp_step_resume))
+ (bsp->breakpoint_at->type == bp_step_resume) &&
+ (bsp->breakpoint_at->thread == current_thread ||
+ bsp->breakpoint_at->thread == -1))
return bsp->breakpoint_at;
}