From b8002933e92f89600521be420376ec111ad367f1 Mon Sep 17 00:00:00 2001 From: Felipe de Azevedo Piovezan Date: Thu, 6 Feb 2025 15:59:43 -0800 Subject: [lldb] Add missing return statements in ThreadMemory (#126128) These prevented ThreadMemory from correctly returning the Name/Queue/Info of the backing thread. Note about testing: this test only finds regressions if the system sets a name or queue for the backing thread. While this may not be true everywhere, it still provides coverage in some systems, e.g. in Apple platforms. --- .../functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin') diff --git a/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py b/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py index 3ad7539018d5..fe78edd98f4d 100644 --- a/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py +++ b/lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py @@ -160,6 +160,8 @@ class PluginPythonOSPlugin(TestBase): ) self.assertTrue(process, PROCESS_IS_VALID) + core_thread_zero = process.GetThreadAtIndex(0) + # Make sure there are no OS plug-in created thread when we first stop # at our breakpoint in main thread = process.GetThreadByID(0x111111111) @@ -183,6 +185,10 @@ class PluginPythonOSPlugin(TestBase): thread.IsValid(), "Make sure there is a thread 0x111111111 after we load the python OS plug-in", ) + # This OS plugin does not set thread names / queue names, so it should + # inherit the core thread's name. + self.assertEqual(core_thread_zero.GetName(), thread.GetName()) + self.assertEqual(core_thread_zero.GetQueueName(), thread.GetQueueName()) frame = thread.GetFrameAtIndex(0) self.assertTrue( -- cgit v1.2.3