Change signature of linux_target_ops.new_thread
[deliverable/binutils-gdb.git] / gdb / linux-nat.c
index 8eb73d9fb014ebf0244ff9a99bb03eef12b1b123..283a12bc7125d327a8c2295aae4f3f0ccf273ef7 100644 (file)
@@ -281,6 +281,33 @@ static int check_stopped_by_breakpoint (struct lwp_info *lp);
 static int sigtrap_is_event (int status);
 static int (*linux_nat_status_is_event) (int status) = sigtrap_is_event;
 
+\f
+/* LWP accessors.  */
+
+/* See nat/linux-nat.h.  */
+
+ptid_t
+ptid_of_lwp (struct lwp_info *lwp)
+{
+  return lwp->ptid;
+}
+
+/* See nat/linux-nat.h.  */
+
+int
+lwp_is_stopped (struct lwp_info *lwp)
+{
+  return lwp->stopped;
+}
+
+/* See nat/linux-nat.h.  */
+
+enum target_stop_reason
+lwp_stop_reason (struct lwp_info *lwp)
+{
+  return lwp->stop_reason;
+}
+
 \f
 /* Trivial list manipulation functions to keep track of a list of
    new stopped processes.  */
@@ -834,14 +861,11 @@ find_lwp_pid (ptid_t ptid)
   return NULL;
 }
 
-/* Call CALLBACK with its second argument set to DATA for every LWP in
-   the list.  If CALLBACK returns 1 for a particular LWP, return a
-   pointer to the structure describing that LWP immediately.
-   Otherwise return NULL.  */
+/* See nat/linux-nat.h.  */
 
 struct lwp_info *
 iterate_over_lwps (ptid_t filter,
-                  int (*callback) (struct lwp_info *, void *),
+                  iterate_over_lwps_ftype callback,
                   void *data)
 {
   struct lwp_info *lp, *lpnext;
@@ -852,7 +876,7 @@ iterate_over_lwps (ptid_t filter,
 
       if (ptid_match (lp->ptid, filter))
        {
-         if ((*callback) (lp, data))
+         if ((*callback) (lp, data) != 0)
            return lp;
        }
     }
This page took 0.053948 seconds and 4 git commands to generate.