diff options
| author | Med Ismail Bennani <ismail@bennani.ma> | 2024-05-09 10:39:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-09 10:39:05 -0700 |
| commit | b3a835e129ed8a67cf393f9ee26989b36a3eff1c (patch) | |
| tree | 5559960f9c1f125081d3f331e2a95a901141b9f0 /lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | |
| parent | 7c1b2898302c9f84fa43952f746d79817e1ead40 (diff) | |
[lldb] Verify target stop-hooks support with scripted process (#91107)
This patch makes sure that scripted process are compatible with target
stop-hooks. This wasn't tested in the past, but it turned out to be
working out of the box.
rdar://124396534
Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
Diffstat (limited to 'lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py')
| -rw-r--r-- | lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py index 5aaf68575623..9519c576689d 100644 --- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py +++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py @@ -187,6 +187,10 @@ class ScriptedProcesTestCase(TestBase): + os.path.join(self.getSourceDir(), scripted_process_example_relpath) ) + self.runCmd( + "target stop-hook add -k first -v 1 -k second -v 2 -P dummy_scripted_process.DummyStopHook" + ) + launch_info = lldb.SBLaunchInfo(None) launch_info.SetProcessPluginName("ScriptedProcess") launch_info.SetScriptedProcessClassName( @@ -207,6 +211,9 @@ class ScriptedProcesTestCase(TestBase): self.assertTrue(hasattr(py_impl, "my_super_secret_member")) self.assertEqual(py_impl.my_super_secret_method(), 42) + self.assertTrue(hasattr(py_impl, "handled_stop")) + self.assertTrue(py_impl.handled_stop) + # Try reading from target #0 process ... addr = 0x500000000 message = "Hello, target 0" |
