diff options
Diffstat (limited to 'lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp')
| -rw-r--r-- | lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index 84031bdd555..38c25d2f03b 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -194,7 +194,7 @@ MachThreadList::Clear() } uint32_t -MachThreadList::UpdateThreadList(MachProcess *process, bool update) +MachThreadList::UpdateThreadList(MachProcess *process, bool update, MachThreadList::collection *new_threads) { // locker will keep a mutex locked until it goes out of scope DNBLogThreadedIf (LOG_THREAD, "MachThreadList::UpdateThreadList (pid = %4.4x, update = %u) process stop count = %u", process->ProcessID(), update, process->StopCount()); @@ -250,6 +250,11 @@ MachThreadList::UpdateThreadList(MachProcess *process, bool update) { // We don't have this thread, lets add it. thread_sp.reset(new MachThread(process, tid)); + + // Add the new thread regardless of its is user ready state... + if (new_threads) + new_threads->push_back(thread_sp); + // Make sure the thread is ready to be displayed and shown to users // before we add this thread to our list... if (thread_sp->IsUserReady()) @@ -320,6 +325,24 @@ MachThreadList::ProcessWillResume(MachProcess *process, const DNBThreadResumeAct assert (thread_action); thread->ThreadWillResume (thread_action); } + + if (DNBLogCheckLogBit(LOG_THREAD)) + { + MachThreadList::collection new_threads; + UpdateThreadList(process, true, &new_threads); + if (new_threads.size()) + { + + for (uint32_t idx = 0, num_new_threads = new_threads.size(); idx < num_new_threads; ++idx) + { + DNBLogThreadedIf (LOG_THREAD, "MachThreadList::ProcessWillResume (pid = %4.4x) stop-id=%u, newly discovered thread: 0x%4.4x, thread-is-user-ready=%i)", + process->ProcessID(), + process->StopCount(), + new_threads[idx]->ThreadID(), + new_threads[idx]->IsUserReady()); + } + } + } } uint32_t |

