summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
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 4fffa53260d..cb51a5559f5 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;
}