gdbserver: don't pick a random thread if the current thread dies
[binutils-gdb.git] / gdb / gdbserver / linux-low.c
index c37c6d2f3d533cdf27dffcb7f550650d292bc289..2bc91c276d6c4fd4ba7b4c60847357f000a0e79f 100644 (file)
@@ -3617,18 +3617,10 @@ wait_for_sigstop (void)
       if (debug_threads)
        debug_printf ("Previously current thread died.\n");
 
-      if (non_stop)
-       {
-         /* We can't change the current inferior behind GDB's back,
-            otherwise, a subsequent command may apply to the wrong
-            process.  */
-         current_thread = NULL;
-       }
-      else
-       {
-         /* Set a valid thread as current.  */
-         set_desired_thread (0);
-       }
+      /* We can't change the current inferior behind GDB's back,
+        otherwise, a subsequent command may apply to the wrong
+        process.  */
+      current_thread = NULL;
     }
 }