Fixed an issue with the pthread_setspecific() where we weren't NULL-ing out
the thread specific data and were destroying the thread specfic data more
than once.
Also added the ability to ask a lldb::StateType if it is stopped with an
additional paramter of "must_exist" which means that the state must be a
stopped state for a process that still exists. This means that eStateExited
and eStateUnloaded will no longer return true if "must_exist" is set to true.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@144875 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Commands/CommandObjectProcess.cpp b/source/Commands/CommandObjectProcess.cpp
index e048182..d618c04 100644
--- a/source/Commands/CommandObjectProcess.cpp
+++ b/source/Commands/CommandObjectProcess.cpp
@@ -284,7 +284,8 @@
if (synchronous_execution)
{
state = process->WaitForProcessToStop (NULL);
- if (!StateIsStoppedState(state))
+ const bool must_be_alive = true;
+ if (!StateIsStoppedState(state, must_be_alive))
{
result.AppendErrorWithFormat ("process isn't stopped: %s", StateAsCString(state));
}