Perform thread lookup after RefreshStateAfterStop()

This fixes a crash on FreeBSD

llvm-svn: 189607
This commit is contained in:
Ed Maste
2013-08-29 20:40:11 +00:00
parent a21f4b8ddd
commit 685fea93ca

View File

@@ -499,8 +499,6 @@ ProcessPOSIX::RefreshStateAfterStop()
lldb::tid_t tid = message.GetTID();
if (log)
log->Printf ("ProcessPOSIX::%s(), message_queue size = %d, pid = %" PRIi64, __FUNCTION__, (int)m_message_queue.size(), tid);
POSIXThread *thread = static_cast<POSIXThread*>(
GetThreadList().FindThreadByID(tid, false).get());
if (message.GetKind() == ProcessMessage::eNewThreadMessage)
{
@@ -517,6 +515,8 @@ ProcessPOSIX::RefreshStateAfterStop()
m_thread_list.RefreshStateAfterStop();
POSIXThread *thread = static_cast<POSIXThread*>(
GetThreadList().FindThreadByID(tid, false).get());
if (thread)
thread->Notify(message);