[lldb-dev] Stop IDs for individual thread

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Fri Jun 3 08:42:06 PDT 2016


> On Jun 3, 2016, at 2:22 AM, Abhishek Aggarwal via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> 
> Hi everyone
> 
> While debugging an inferior with LLDB, for every stop event a new StopID is generated and this ID can be extracted from SBProcess::GetStopID() API. This ID indicates change in the state of the process between two stop events.
> 
> As per my knowledge, in case of a multithreaded process this stop ID can't be used to exactly pin point the thread(s) of the process that suffered change in their states between two stop events. Is there a way to find out this information?

That's not something the debugger tracks actively - when the process is running we try to interfere with it as little as possible.  But on systems that have a way of getting per thread activity accounting, you could keep track of that information each time we stop and use that information to figure this out.

debugserver on OS X does some reporting of CPU activity, but I don't think that is per thread.  You can fetch that with Process::GetAsyncProfileData(), but at present that's just a pass-through (used by Xcode), lldb itself doesn't do anything with this information.

Jim  

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



More information about the lldb-dev mailing list