================
@@ -0,0 +1,57 @@
+"""
+Make sure that we stop on fork and follow mode works.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test.decorators import *
+
+
+class TestStopOnForkAndVFork(TestBase):
+ NO_DEBUG_INFO_TESTCASE = True
+
+ def do_test(self, mode, fork):
+ self.build()
+
+ args = [fork]
+ launch_info = lldb.SBLaunchInfo(args)
+ launch_info.SetWorkingDirectory(self.getBuildDir())
+
+ (_, process, _, _) = lldbutil.run_to_source_breakpoint(
+ self, "// break here", lldb.SBFileSpec("main.c"), launch_info
+ )
+ self.runCmd(f"settings set target.process.stop-on-{fork} true")
+ self.runCmd(f"settings set target.process.follow-fork-mode {mode}")
----------------
jimingham wrote:
Depending on the `mode` plus the answer to the question above about when this
stop-on actually stops, you know whether you expect this stop to be in the
parent or the child. Be good to test for that explicitly.
https://github.com/llvm/llvm-project/pull/188710
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits