Fix PR 19461: strange "info thread" behavior in non-stop
[deliverable/binutils-gdb.git] / gdb / infrun.c
index 33981d27bb66d78564d5609f196ccafd916f564b..15210c9e3e1a236270d954d03ec65f3b79c8a4d5 100644 (file)
@@ -5198,6 +5198,17 @@ Cannot fill $_exitsignal with the correct signal number.\n"));
          parent = ecs->ptid;
          child = ecs->ws.value.related_pid;
 
+         /* At this point, the parent is marked running, and the
+            child is marked stopped.  */
+
+         /* If not resuming the parent, mark it stopped.  */
+         if (follow_child && !detach_fork && !non_stop && !sched_multi)
+           set_running (parent, 0);
+
+         /* If resuming the child, mark it running.  */
+         if (follow_child || (!detach_fork && (non_stop || sched_multi)))
+           set_running (child, 1);
+
          /* In non-stop mode, also resume the other branch.  */
          if (!detach_fork && (non_stop
                               || (sched_multi && target_is_non_stop_p ())))
This page took 0.023725 seconds and 4 git commands to generate.