[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.
This commit is contained in:
Felipe de Azevedo Piovezan authored and GitHub committed 2025-02-06 15:59:43 -08:00
1 parent a0d86b23c0
commit b8002933e9
2 files changed
+9 -3

No files matched your search

@@ -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(