gdbserver: Hide and don't detach pending clone children
[binutils-gdb.git] / gdbserver / target.h
index 8893e0a6a8ba9d5f897943ee0bd9ff149e5425ca..0f1fd5906fbf198c4be778d0eea5ed46c8c0a0cc 100644 (file)
@@ -478,13 +478,15 @@ public:
   virtual bool thread_handle (ptid_t ptid, gdb_byte **handle,
                              int *handle_len);
 
-  /* If THREAD is a fork child that was not reported to GDB, return its parent
-     else nullptr.  */
+  /* If THREAD is a fork/vfork/clone child that was not reported to
+     GDB, return its parent else nullptr.  */
   virtual thread_info *thread_pending_parent (thread_info *thread);
 
-  /* If THREAD is the parent of a fork child that was not reported to GDB,
-     return this child, else nullptr.  */
-  virtual thread_info *thread_pending_child (thread_info *thread);
+  /* If THREAD is the parent of a fork/vfork/clone child that was not
+     reported to GDB, return this child and fill in KIND with the
+     matching waitkind, otherwise nullptr.  */
+  virtual thread_info *thread_pending_child (thread_info *thread,
+                                            target_waitkind *kind);
 
   /* Returns true if the target can software single step.  */
   virtual bool supports_software_single_step ();
@@ -700,9 +702,9 @@ target_thread_pending_parent (thread_info *thread)
 }
 
 static inline thread_info *
-target_thread_pending_child (thread_info *thread)
+target_thread_pending_child (thread_info *thread, target_waitkind *kind)
 {
-  return the_target->thread_pending_child (thread);
+  return the_target->thread_pending_child (thread, kind);
 }
 
 /* Read LEN bytes from MEMADDR in the buffer MYADDR.  Return 0 if the read