Hi,
I am working on a custom debugger on Linux and I am using LLDB C++ API for 
that. So far, from the functionality point of view the life is good, but I am 
running into severe performance issue.
The problem is that the target application has literally hundreds of threads, 
and when the target process stops, I need to identify all the threads that have 
non-trivial stop reason. So, I am doing something like that:
    // Loop over threads    int numThreads = m_Process.GetNumThreads();    for 
(int threadIndex = 0; threadIndex < numThreads; ++threadIndex)    {        // 
Inspect the thread state        sbThread = 
m_Process.GetThreadAtIndex(threadIndex);        stopReason = 
sbThread.GetStopReason();...

Well, this loop turns out to be a bottleneck. 
So, is there any way to find all the stopped threads without iterating over the 
whole world?
Thanks,Eugene

                                          
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to