aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/linux-low.c16
2 files changed, 17 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 089ca32..6c23574 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-03 Yao Qi <yao.qi@linaro.org>
+
+ PR server/19736
+ * linux-low.c (handle_extended_wait): Set child suspended
+ if event_lwp->bp_reinsert isn't zero.
+
2016-03-02 Yao Qi <yao.qi@linaro.org>
* linux-low.c (linux_resume_one_lwp_throw): Replace code with
diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c
index 22bf915..6b07c90 100644
--- a/gdb/gdbserver/linux-low.c
+++ b/gdb/gdbserver/linux-low.c
@@ -529,8 +529,11 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
child_thr->last_status.kind = TARGET_WAITKIND_STOPPED;
/* If we're suspending all threads, leave this one suspended
- too. */
- if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS)
+ too. If the fork/clone parent is stepping over a breakpoint,
+ all other threads have been suspended already. Leave the
+ child suspended too. */
+ if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS
+ || event_lwp->bp_reinsert != 0)
{
if (debug_threads)
debug_printf ("HEW: leaving child suspended\n");
@@ -583,9 +586,12 @@ handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
before calling linux_resume_one_lwp. */
new_lwp->stopped = 1;
- /* If we're suspending all threads, leave this one suspended
- too. */
- if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS)
+ /* If we're suspending all threads, leave this one suspended
+ too. If the fork/clone parent is stepping over a breakpoint,
+ all other threads have been suspended already. Leave the
+ child suspended too. */
+ if (stopping_threads == STOPPING_AND_SUSPENDING_THREADS
+ || event_lwp->bp_reinsert != 0)
new_lwp->suspended = 1;
/* Normally we will get the pending SIGSTOP. But in some cases