int *handle_len) override;
#endif
+ thread_info *thread_pending_parent (thread_info *thread) override;
+
bool supports_catch_syscall () override;
/* Return the information to access registers. This has public
this->waitstatus.kind = TARGET_WAITKIND_IGNORE;
}
+ /* If this LWP is a fork child that wasn't reported to GDB yet, return
+ its parent, else nullptr. */
+ lwp_info *pending_parent () const
+ {
+ if (this->fork_relative == nullptr)
+ return nullptr;
+
+ gdb_assert (this->fork_relative->fork_relative == this);
+
+ /* In a fork parent/child relationship, the parent has a status pending and
+ the child does not, and a thread can only be in one such relationship
+ at most. So we can recognize who is the parent based on which one has
+ a pending status. */
+ gdb_assert (!!this->status_pending_p
+ != !!this->fork_relative->status_pending_p);
+
+ if (!this->fork_relative->status_pending_p)
+ return nullptr;
+
+ const target_waitstatus &ws
+ = this->fork_relative->waitstatus;
+ gdb_assert (ws.kind == TARGET_WAITKIND_FORKED
+ || ws.kind == TARGET_WAITKIND_VFORKED);
+
+ return this->fork_relative;
+ }
+
/* Backlink to the parent object. */
struct thread_info *thread = nullptr;