* linux-low.c (linux_stabilize_threads): Wrap debug output in a
[deliverable/binutils-gdb.git] / gdb / gdbserver / linux-low.c
index 0f6c543fbbadeb59c18757605f056e76d0c30057..cbcb84024c9b1cf648b3e0d08e690e5f1ebf696a 100644 (file)
@@ -1884,8 +1884,9 @@ linux_stabilize_threads (void)
                                         stuck_in_jump_pad_callback, NULL);
   if (lwp_stuck != NULL)
     {
-      fprintf (stderr, "can't stabilize, LWP %ld is stuck in jump pad\n",
-              lwpid_of (lwp_stuck));
+      if (debug_threads)
+       fprintf (stderr, "can't stabilize, LWP %ld is stuck in jump pad\n",
+                lwpid_of (lwp_stuck));
       return;
     }
 
@@ -1931,12 +1932,12 @@ linux_stabilize_threads (void)
 
   current_inferior = save_inferior;
 
-  lwp_stuck
-    = (struct lwp_info *) find_inferior (&all_lwps,
-                                        stuck_in_jump_pad_callback, NULL);
-  if (lwp_stuck != NULL)
+  if (debug_threads)
     {
-      if (debug_threads)
+      lwp_stuck
+       = (struct lwp_info *) find_inferior (&all_lwps,
+                                        stuck_in_jump_pad_callback, NULL);
+      if (lwp_stuck != NULL)
        fprintf (stderr, "couldn't stabilize, LWP %ld got stuck in jump pad\n",
                 lwpid_of (lwp_stuck));
     }
This page took 0.039489 seconds and 4 git commands to generate.