Don't run personality syscall at configure time; don't check it at all
[deliverable/binutils-gdb.git] / gdb / linux-nat.c
index 42dcd77ac450e43f7de2c1e55045089f2942693c..e595c71c3d33028e5a5c7dc2b8d5bc3ac6d51017 100644 (file)
@@ -446,7 +446,7 @@ typedef std::unique_ptr<struct lwp_info, lwp_deleter> lwp_info_up;
    ptid of the followed inferior.  At return, inferior_ptid will be
    unchanged.  */
 
-bool
+void
 linux_nat_target::follow_fork (bool follow_child, bool detach_fork)
 {
   if (!follow_child)
@@ -611,8 +611,6 @@ linux_nat_target::follow_fork (bool follow_child, bool detach_fork)
       /* Let the thread_db layer learn about this new process.  */
       check_for_thread_db ();
     }
-
-  return false;
 }
 
 \f
@@ -2822,9 +2820,10 @@ resumed_callback (struct lwp_info *lp)
 }
 
 /* Check if we should go on and pass this event to common code.
-   Return the affected lwp if we should, or NULL otherwise.  */
 
-static struct lwp_info *
+   If so, save the status to the lwp_info structure associated to LWPID.  */
+
+static void
 linux_nat_filter_event (int lwpid, int status)
 {
   struct lwp_info *lp;
@@ -2862,7 +2861,7 @@ linux_nat_filter_event (int lwpid, int status)
       linux_nat_debug_printf ("saving LWP %ld status %s in stopped_pids list",
                              (long) lwpid, status_to_str (status));
       add_to_pid_list (&stopped_pids, lwpid, status);
-      return NULL;
+      return;
     }
 
   /* Make sure we don't report an event for the exit of an LWP not in
@@ -2870,7 +2869,7 @@ linux_nat_filter_event (int lwpid, int status)
      if we detach from a program we originally forked and then it
      exits.  */
   if (!WIFSTOPPED (status) && !lp)
-    return NULL;
+    return;
 
   /* This LWP is stopped now.  (And if dead, this prevents it from
      ever being continued.)  */
@@ -2894,7 +2893,7 @@ linux_nat_filter_event (int lwpid, int status)
         on.  */
       status = W_STOPCODE (SIGTRAP);
       if (linux_handle_syscall_trap (lp, 0))
-       return NULL;
+       return;
     }
   else
     {
@@ -2910,7 +2909,7 @@ linux_nat_filter_event (int lwpid, int status)
       linux_nat_debug_printf ("Handling extended status 0x%06x", status);
 
       if (linux_handle_extended_wait (lp, status))
-       return NULL;
+       return;
     }
 
   /* Check if the thread has exited.  */
@@ -2926,7 +2925,7 @@ linux_nat_filter_event (int lwpid, int status)
             was not the end of the debugged application and should be
             ignored.  */
          exit_lwp (lp);
-         return NULL;
+         return;
        }
 
       /* Note that even if the leader was ptrace-stopped, it can still
@@ -2942,7 +2941,7 @@ linux_nat_filter_event (int lwpid, int status)
       /* Store the pending event in the waitstatus, because
         W_EXITCODE(0,0) == 0.  */
       store_waitstatus (&lp->waitstatus, status);
-      return lp;
+      return;
     }
 
   /* Make sure we don't report a SIGSTOP that we sent ourselves in
@@ -2968,7 +2967,7 @@ linux_nat_filter_event (int lwpid, int status)
 
          linux_resume_one_lwp (lp, lp->step, GDB_SIGNAL_0);
          gdb_assert (lp->resumed);
-         return NULL;
+         return;
        }
     }
 
@@ -2990,7 +2989,7 @@ linux_nat_filter_event (int lwpid, int status)
       gdb_assert (lp->resumed);
 
       /* Discard the event.  */
-      return NULL;
+      return;
     }
 
   /* Don't report signals that GDB isn't interested in, such as
@@ -3039,7 +3038,7 @@ linux_nat_filter_event (int lwpid, int status)
             target_pid_to_str (lp->ptid).c_str (),
             (signo != GDB_SIGNAL_0
              ? strsignal (gdb_signal_to_host (signo)) : "0"));
-         return NULL;
+         return;
        }
     }
 
@@ -3047,7 +3046,6 @@ linux_nat_filter_event (int lwpid, int status)
   gdb_assert (lp);
   lp->status = status;
   save_stop_reason (lp);
-  return lp;
 }
 
 /* Detect zombie thread group leaders, and "exit" them.  We can't reap
@@ -4024,11 +4022,7 @@ linux_nat_target::supports_multi_process ()
 bool
 linux_nat_target::supports_disable_randomization ()
 {
-#ifdef HAVE_PERSONALITY
   return true;
-#else
-  return false;
-#endif
 }
 
 /* SIGCHLD handler that serves two purposes: In non-stop/async mode,
This page took 0.031565 seconds and 4 git commands to generate.