summaryrefslogtreecommitdiff
path: root/lldb/test/API/functionalities/plugins/python_os_plugin
diff options
context:
space:
mode:
authorFelipe de Azevedo Piovezan <fpiovezan@apple.com>2025-01-16 15:05:46 -0800
committerGitHub <noreply@github.com>2025-01-16 15:05:46 -0800
commitcb82771c96d7055d89ca67f383e6fb3c9aced178 (patch)
tree26a08cfcd5b6d1201c4db933d1491b8185bfad8a /lldb/test/API/functionalities/plugins/python_os_plugin
parentbb6e94a05d15d289e3685c5599f0eb905dc46925 (diff)
[lldb] Add OS plugin property for reporting all threads (#123145)
Currently, an LLDB target option controls whether plugins report all threads. However, it seems natural for this knowledge could come from the plugin itself. To support this, this commits adds a virtual method to the plugin base class, making the Python OS query the target option to preserve existing behavior.
Diffstat (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin')
-rw-r--r--lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py5
-rw-r--r--lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py3
2 files changed, 3 insertions, 5 deletions
diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
index 47d6f5d68bbe..0d06a9da6535 100644
--- a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
+++ b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/TestOSPluginStepping.py
@@ -40,11 +40,6 @@ class TestOSPluginStepping(TestBase):
def run_python_os_step_missing_thread(self, do_prune):
"""Test that the Python operating system plugin works correctly"""
- # Our OS plugin does NOT report all threads:
- result = self.dbg.HandleCommand(
- "settings set process.experimental.os-plugin-reports-all-threads false"
- )
-
python_os_plugin_path = os.path.join(self.getSourceDir(), "operating_system.py")
(target, self.process, thread, thread_bkpt) = lldbutil.run_to_source_breakpoint(
self, "first stop in thread - do a step out", self.main_file
diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py
index eb02ff534f21..855cdbaf7cdc 100644
--- a/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py
+++ b/lldb/test/API/functionalities/plugins/python_os_plugin/stepping_plugin_threads/operating_system.py
@@ -34,6 +34,9 @@ class OperatingSystemPlugIn(object):
if not self.g_value.IsValid():
print("Could not find g_value")
+ def does_plugin_report_all_threads(self):
+ return False
+
def create_thread(self, tid, context):
print("Called create thread with tid: ", tid)
return None