stop_pc = get_pc (lwp);
- if (WSTOPSIG (lwp->last_status) == SIGTRAP && !lwp->stepping)
+ if (WSTOPSIG (lwp->last_status) == SIGTRAP
+ && !lwp->stepping
+ && !lwp->stopped_by_watchpoint
+ && lwp->last_status >> 16 == 0)
stop_pc -= the_low_target.decr_pc_after_break;
if (debug_threads)
if (!supports_breakpoints ())
return 0;
- if (lwp->stepping)
- {
- if (debug_threads)
- fprintf (stderr,
- "CB: [%s] is stepping\n",
- target_pid_to_str (lwp->head.id));
- return 0;
- }
-
regcache = get_thread_regcache (get_lwp_thread (lwp), 1);
/* breakpoint_at reads from current inferior. */
&& lp->status_pending_p
&& WIFSTOPPED (lp->status_pending)
&& WSTOPSIG (lp->status_pending) == SIGTRAP
+ && !lp->stepping
+ && !lp->stopped_by_watchpoint
&& cancel_breakpoint (lp))
/* Throw away the SIGTRAP. */
lp->status_pending_p = 0;