This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Fake VFORK_DONE events when following only the parent after a vfork.


*** TEST RESULTS FOR COMMIT 2c5c2a3321706c28cbf1b85a970a2e32912eb0c8 ***

Author: John Baldwin <jhb@FreeBSD.org>
Branch: master
Commit: 2c5c2a3321706c28cbf1b85a970a2e32912eb0c8

Fake VFORK_DONE events when following only the parent after a vfork.

FreeBSD does not currently report a ptrace event for a parent process
after it resumes due to the child exiting the shared memory region after
a vfork.  Take the same approach used in linux-nat.c in this case of
sleeping for a while and then reporting a fake VFORK_DONE event.

gdb/ChangeLog:

	* fbsd-nat.c (struct fbsd_fork_child_info): Rename to ...
	(struct fbsd_fork_info): ... this.
	(struct fbsd_fork_info) <child>: Rename to ...
	(struct fbsd_fork_info) <ptid>: ... this.
	(fbsd_pending_children): Update type.
	(fbsd_remember_child): Update type and field name.
	(fbsd_is_child_pending): Likewise.
	(fbsd_pending_vfork_done): New variable.
	(fbsd_is_vfork_done_pending): New function.
	(fbsd_next_vfork_done): New function.
	(fbsd_resume): Don't resume processes with a pending vfork done
	event.
	(fbsd_wait): Report pending vfork done events.
	(fbsd_follow_fork): Delay and record a pending vfork done event
	for a vfork parent when detaching the child.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]