fbsd-nat: Add a low_new_fork virtual method.

This method can be overridden by architecture-specific targets to
perform additional work when a new child process is forked.
This commit is contained in:
John Baldwin
2022-03-22 12:05:43 -07:00
parent a49ce729c8
commit c77282d8ba
2 changed files with 8 additions and 0 deletions

View File

@ -1380,6 +1380,8 @@ fbsd_nat_target::wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus,
warning (_("Failed to fetch process information"));
#endif
low_new_fork (wptid, child);
if (is_vfork)
ourstatus->set_vforked (child_ptid);
else

View File

@ -109,6 +109,12 @@ public:
bool supports_disable_randomization () override;
/* Methods meant to be overridden by arch-specific target
classes. */
virtual void low_new_fork (ptid_t parent, pid_t child)
{}
protected:
void post_startup_inferior (ptid_t) override;