File tree 2 files changed +9
-3
lines changed
source/Plugins/Process/Utility
test/API/functionalities/plugins/python_os_plugin 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 {
33
33
34
34
const char *GetInfo () override {
35
35
if (m_backing_thread_sp)
36
- m_backing_thread_sp->GetInfo ();
36
+ return m_backing_thread_sp->GetInfo ();
37
37
return nullptr ;
38
38
}
39
39
40
40
const char *GetName () override {
41
41
if (!m_name.empty ())
42
42
return m_name.c_str ();
43
43
if (m_backing_thread_sp)
44
- m_backing_thread_sp->GetName ();
44
+ return m_backing_thread_sp->GetName ();
45
45
return nullptr ;
46
46
}
47
47
48
48
const char *GetQueueName () override {
49
49
if (!m_queue.empty ())
50
50
return m_queue.c_str ();
51
51
if (m_backing_thread_sp)
52
- m_backing_thread_sp->GetQueueName ();
52
+ return m_backing_thread_sp->GetQueueName ();
53
53
return nullptr ;
54
54
}
55
55
Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ def run_python_os_step(self):
160
160
)
161
161
self .assertTrue (process , PROCESS_IS_VALID )
162
162
163
+ core_thread_zero = process .GetThreadAtIndex (0 )
164
+
163
165
# Make sure there are no OS plug-in created thread when we first stop
164
166
# at our breakpoint in main
165
167
thread = process .GetThreadByID (0x111111111 )
@@ -183,6 +185,10 @@ def run_python_os_step(self):
183
185
thread .IsValid (),
184
186
"Make sure there is a thread 0x111111111 after we load the python OS plug-in" ,
185
187
)
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 ())
186
192
187
193
frame = thread .GetFrameAtIndex (0 )
188
194
self .assertTrue (
You can’t perform that action at this time.
0 commit comments