[lldb] [client] Implement follow-fork-mode
authorMichał Górny <mgorny@moritz.systems>
Mon, 12 Apr 2021 22:15:51 +0000 (00:15 +0200)
committerMichał Górny <mgorny@moritz.systems>
Thu, 2 Sep 2021 10:16:58 +0000 (12:16 +0200)
commit4a2a947317bf702178bf1af34dffd0d280d49970
tree7e27a0be2dcebaf8db7e7a8cd5feffd5bf9da5bf
parent3153bdd547c393b6b58e7cfaa5a40b246bf4218e
[lldb] [client] Implement follow-fork-mode

Implement a new target.process.follow-fork-mode setting to control
LLDB's behavior on fork.  If set to 'parent', the forked child is
detached and parent continues being traced.  If set to 'child',
the parent is detached and child becomes traced instead.

Differential Revision: https://reviews.llvm.org/D100503
16 files changed:
lldb/include/lldb/Target/Process.h
lldb/include/lldb/lldb-private-enumerations.h
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
lldb/source/Target/Process.cpp
lldb/source/Target/TargetProperties.td
lldb/test/Shell/Subprocess/clone-follow-child-softbp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/clone-follow-child-wp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/clone-follow-child.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-child-softbp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-child-wp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-child.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/fork-follow-parent-softbp.test
lldb/test/Shell/Subprocess/vfork-follow-child-softbp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/vfork-follow-child-wp.test [new file with mode: 0644]
lldb/test/Shell/Subprocess/vfork-follow-child.test [new file with mode: 0644]