diff options
Diffstat (limited to 'gdb/linux-nat.c')
-rw-r--r-- | gdb/linux-nat.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 0e18034994b..f8de481a694 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -1820,20 +1820,26 @@ resume_callback (struct lwp_info *lp, void *data) } else if (lp->stopped && lp->status == 0) { + struct thread_info *tp = find_thread_ptid (lp->ptid); + /* lp->step may already contain a stale value. */ + int step = tp ? currently_stepping (tp) : 0; + if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, - "RC: PTRACE_CONT %s, 0, 0 (resuming sibling)\n", + "RC: %s %s, 0, 0 (resuming sibling)\n", + step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT", target_pid_to_str (lp->ptid)); linux_ops->to_resume (linux_ops, pid_to_ptid (GET_LWP (lp->ptid)), - 0, TARGET_SIGNAL_0); + step, TARGET_SIGNAL_0); if (debug_linux_nat) fprintf_unfiltered (gdb_stdlog, - "RC: PTRACE_CONT %s, 0, 0 (resume sibling)\n", + "RC: %s %s, 0, 0 (resume sibling)\n", + step ? "PTRACE_SINGLESTEP" : "PTRACE_CONT", target_pid_to_str (lp->ptid)); lp->stopped = 0; - lp->step = 0; + lp->step = step; memset (&lp->siginfo, 0, sizeof (lp->siginfo)); lp->stopped_by_watchpoint = 0; } |