Now that all thread events are processed synchronously, there is no need to have separate records
of whether a thread is running. This changes the (ever-dwindling) remains of the TSC to use
NativeThreadLinux as the authoritative source of the state of threads. The rest of the
ThreadContext we need has been moved to a member of NTL.
Details
Diff Detail
Event Timeline
Please see my comments.
source/Plugins/Process/Linux/NativeProcessLinux.cpp | ||
---|---|---|
2450 | Could you add check for thread_sp != nullptr? | |
4414 | Potentially, we may add NativeThreadProtocol::RequestStop() to implement this logic as a part of NativeThreadLinux. | |
4495 | Previous version of code requested stop if thread's running (state == ThreadState::Running) - s/StateIsStoppedState/StateIsRunningState ? | |
4587 | Do we still need this lock? |
source/Plugins/Process/Linux/NativeProcessLinux.cpp | ||
---|---|---|
2450 | I added a break two lines above. The fact that thread_sp is null is logged at the start if the function. | |
4414 | I would add this signature to the base class only if/when we have a need to call it from the base NativeProcessProtocol. Right now this looks to me like a detail of this specific implementation of Native(Process/Thread)Protocol. A different implementation of these may wish to (or will need to) do this completely differently. How about I put this to NTL::RequestStop? At some point I would like to get rid of all these NTL casts (perhaps by reimplementing NPL::GetThreadByID to cast in a single place), so this will become cleaner as well. | |
4495 | You are right of course. I am puzzled at how this wasn't caught by the test suite though... | |
4587 | No, but I'm saving that for another change. I will submit that shortly. | |
source/Plugins/Process/Linux/NativeThreadLinux.h | ||
101 | I was under the impression m_ is used for private members, or at least members of real classes (not just structs). I can put it back if you wish. |
Could you add check for thread_sp != nullptr?