gdb/
[deliverable/binutils-gdb.git] / gdb / linux-nat.h
index 6175f3a1dc2e901c44241f954022c73bd542746c..33727d64fa4e2a4f551253048e95d8ff13280ffc 100644 (file)
@@ -22,6 +22,8 @@
 
 #include <signal.h>
 
+struct arch_lwp_info;
+
 /* Ways to "resume" a thread.  */
 
 enum resume_kind
@@ -109,6 +111,9 @@ struct lwp_info
   /* The processor core this LWP was last seen on.  */
   int core;
 
+  /* Arch-specific additions.  */
+  struct arch_lwp_info *arch_private;
+
   /* Next LWP in list.  */
   struct lwp_info *next;
 };
@@ -118,12 +123,11 @@ struct lwp_info
    native target is active.  */
 extern struct lwp_info *lwp_list;
 
-/* Iterate over the PTID each active thread (light-weight process).  There
-   must be at least one.  */
-#define ALL_LWPS(LP, PTID)                                             \
-  for ((LP) = lwp_list, (PTID) = (LP)->ptid;                           \
+/* Iterate over each active thread (light-weight process).  */
+#define ALL_LWPS(LP)                                                   \
+  for ((LP) = lwp_list;                                                        \
        (LP) != NULL;                                                   \
-       (LP) = (LP)->next, (PTID) = (LP) ? (LP)->ptid : (PTID))
+       (LP) = (LP)->next)
 
 #define GET_LWP(ptid)          ptid_get_lwp (ptid)
 #define GET_PID(ptid)          ptid_get_pid (ptid)
@@ -147,6 +151,8 @@ extern void linux_enable_event_reporting (ptid_t ptid);
 
 extern int lin_lwp_attach_lwp (ptid_t ptid);
 
+extern void linux_stop_lwp (struct lwp_info *lwp);
+
 /* Iterator function for lin-lwp's lwp list.  */
 struct lwp_info *iterate_over_lwps (ptid_t filter,
                                    int (*callback) (struct lwp_info *,
@@ -167,7 +173,7 @@ linux_trad_target (CORE_ADDR (*register_u_offset)(struct gdbarch *, int, int));
 void linux_nat_add_target (struct target_ops *);
 
 /* Register a method to call whenever a new thread is attached.  */
-void linux_nat_set_new_thread (struct target_ops *, void (*) (ptid_t));
+void linux_nat_set_new_thread (struct target_ops *, void (*) (struct lwp_info *));
 
 /* Register a method that converts a siginfo object between the layout
    that ptrace returns, and the layout in the architecture of the
@@ -177,6 +183,11 @@ void linux_nat_set_siginfo_fixup (struct target_ops *,
                                           gdb_byte *,
                                           int));
 
+/* Register a method to call prior to resuming a thread.  */
+
+void linux_nat_set_prepare_to_resume (struct target_ops *,
+                                     void (*) (struct lwp_info *));
+
 /* Update linux-nat internal state when changing from one fork
    to another.  */
 void linux_nat_switch_fork (ptid_t new_ptid);
This page took 0.02519 seconds and 4 git commands to generate.