gdb, gdbserver: detach fork child when detaching from fork parent
[binutils-gdb.git] / gdbserver / linux-low.cc
index 34991df449bfb859b1d753fee334ce684d7b4ede..87888044c1f8e48a9dd06ff92860d69f48b54a90 100644 (file)
@@ -7130,6 +7130,17 @@ linux_process_target::thread_pending_parent (thread_info *thread)
   return get_lwp_thread (parent);
 }
 
+thread_info *
+linux_process_target::thread_pending_child (thread_info *thread)
+{
+  lwp_info *child = get_thread_lwp (thread)->pending_child ();
+
+  if (child == nullptr)
+    return nullptr;
+
+  return get_lwp_thread (child);
+}
+
 /* Default implementation of linux_target_ops method "set_pc" for
    32-bit pc register which is literally named "pc".  */