Use a real vfork done event on FreeBSD when available.
authorJohn Baldwin <jhb@FreeBSD.org>
Sat, 16 Jul 2016 17:14:08 +0000 (10:14 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Wed, 20 Jul 2016 18:02:25 +0000 (11:02 -0700)
commitdbaed3853474e7bd824a25bc454a8f2fdd71d2b3
treef087b3ed53a1ac0a7ff68096bfef5747ee6f4ea4
parent5fa14c6b9789bad6f91dd21889f7b1a0eb75c6d0
Use a real vfork done event on FreeBSD when available.

FreeBSD 12 recently added a new ptrace event to indicate when the vfork
parent resumes after the child process stops sharing the address space.
Use this event to report a proper TARGET_WAITKIND_VFORK_DONE rather than
faking a vfork done event after a delay.

gdb/ChangeLog:

* fbsd-nat.c (fbsd_enable_proc_events): Enable "PTRACE_VFORK"
events.
(fbsd_pending_vfork_done): Only define if "PTRACE_VFORK" is not
defined.
(fbsd_add_vfork_done): Likewise.
(fbsd_is_vfork_done_pending): Likewise.
(fbsd_next_vfork_done): Likewise.
(fbsd_resume): Only ignore pending vfork done events if
"PTRACE_VFORK" is not defined.
(fbsd_wait): Only look for pending vfork done events if
"PTRACE_VFORK" is not defined.
[PTRACE_VFORK]: Handle "PL_FLAG_VFORKED" and "PL_FLAG_VFORK_DONE"
events.
(fbsd_follow_fork): Only fake a vfork done event if "PTRACE_VFORK"
is not defined.
gdb/ChangeLog
gdb/fbsd-nat.c
This page took 0.031038 seconds and 4 git commands to generate.