File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
source/Plugins/Process/Utility
test/API/functionalities/plugins/python_os_plugin Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -33,23 +33,23 @@ class ThreadMemory : public lldb_private::Thread {
3333
3434 const char *GetInfo () override {
3535 if (m_backing_thread_sp)
36- m_backing_thread_sp->GetInfo ();
36+ return m_backing_thread_sp->GetInfo ();
3737 return nullptr ;
3838 }
3939
4040 const char *GetName () override {
4141 if (!m_name.empty ())
4242 return m_name.c_str ();
4343 if (m_backing_thread_sp)
44- m_backing_thread_sp->GetName ();
44+ return m_backing_thread_sp->GetName ();
4545 return nullptr ;
4646 }
4747
4848 const char *GetQueueName () override {
4949 if (!m_queue.empty ())
5050 return m_queue.c_str ();
5151 if (m_backing_thread_sp)
52- m_backing_thread_sp->GetQueueName ();
52+ return m_backing_thread_sp->GetQueueName ();
5353 return nullptr ;
5454 }
5555
Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ def run_python_os_step(self):
160160 )
161161 self .assertTrue (process , PROCESS_IS_VALID )
162162
163+ core_thread_zero = process .GetThreadAtIndex (0 )
164+
163165 # Make sure there are no OS plug-in created thread when we first stop
164166 # at our breakpoint in main
165167 thread = process .GetThreadByID (0x111111111 )
@@ -183,6 +185,10 @@ def run_python_os_step(self):
183185 thread .IsValid (),
184186 "Make sure there is a thread 0x111111111 after we load the python OS plug-in" ,
185187 )
188+ # This OS plugin does not set thread names / queue names, so it should
189+ # inherit the core thread's name.
190+ self .assertEqual (core_thread_zero .GetName (), thread .GetName ())
191+ self .assertEqual (core_thread_zero .GetQueueName (), thread .GetQueueName ())
186192
187193 frame = thread .GetFrameAtIndex (0 )
188194 self .assertTrue (
You can’t perform that action at this time.
0 commit comments