Reland "[lldb] [Process] Watch for fork/vfork notifications" for FreeBSD
authorMichał Górny <mgorny@moritz.systems>
Tue, 13 Apr 2021 10:21:24 +0000 (12:21 +0200)
committerMichał Górny <mgorny@moritz.systems>
Tue, 13 Apr 2021 11:19:42 +0000 (13:19 +0200)
commit63d75641054afb0fe43928e9430a2bb92f09e121
treed32168e30a3380980a72f81249009b883e025216
parent808a5a2534cd1f9471e247bde7aef240e488078d
Reland "[lldb] [Process] Watch for fork/vfork notifications" for FreeBSD

The original commit was reverted because of the problems it introduced
on Linux.  However, FreeBSD should not be affected, so restore that part
and we will address Linux separately.

While at it, remove the dbreg hack as the underlying issue has been
fixed in the FreeBSD kernel and the problem is unlikely to happen
in real life use anyway.

Differential Revision: https://reviews.llvm.org/D98822
lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.cpp
lldb/source/Plugins/Process/FreeBSD/NativeProcessFreeBSD.h
lldb/test/Shell/Subprocess/Inputs/fork.cpp [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-parent-wp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-parent.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/lit.local.cfg [new file with mode: 0644]
lldb/test/Shell/Subprocess/vfork-follow-parent-wp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/vfork-follow-parent.test [new file with mode: 0644]