Index: source/Plugins/Process/Linux/NativeProcessLinux.cpp =================================================================== --- source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -2133,13 +2133,16 @@ { // We can now resume the newly created thread since it is fully created. NotifyThreadCreateStopped (tid); - m_coordinator_up->RequestThreadResume (tid, - [=](lldb::tid_t tid_to_resume, bool supress_signal) - { - std::static_pointer_cast (new_thread_sp)->SetRunning (); - return Resume (tid_to_resume, LLDB_INVALID_SIGNAL_NUMBER); - }, - CoordinatorErrorHandler); + if (!m_coordinator_up->IsPendingThreadStop()) + { + m_coordinator_up->RequestThreadResume( + tid, [=](lldb::tid_t tid_to_resume, bool supress_signal) + { + std::static_pointer_cast (new_thread_sp)->SetRunning (); + return Resume (tid_to_resume, LLDB_INVALID_SIGNAL_NUMBER); + }, + CoordinatorErrorHandler); + } } else { @@ -2484,13 +2487,16 @@ { // We can now resume the newly created thread since it is fully created. NotifyThreadCreateStopped (pid); - m_coordinator_up->RequestThreadResume (pid, - [=](lldb::tid_t tid_to_resume, bool supress_signal) - { - std::static_pointer_cast (thread_sp)->SetRunning (); - return Resume (tid_to_resume, LLDB_INVALID_SIGNAL_NUMBER); - }, - CoordinatorErrorHandler); + if (!m_coordinator_up->IsPendingThreadStop()) + { + m_coordinator_up->RequestThreadResume ( + pid, [=](lldb::tid_t tid_to_resume, bool supress_signal) + { + std::static_pointer_cast (thread_sp)->SetRunning (); + return Resume (tid_to_resume, LLDB_INVALID_SIGNAL_NUMBER); + }, + CoordinatorErrorHandler); + } } else { Index: source/Plugins/Process/Linux/ThreadStateCoordinator.h =================================================================== --- source/Plugins/Process/Linux/ThreadStateCoordinator.h +++ source/Plugins/Process/Linux/ThreadStateCoordinator.h @@ -148,6 +148,10 @@ void LogEnableEventProcessing (bool enabled); + bool + IsPendingThreadStop() { + return GetPendingThreadStopNotification(); + } private: // Typedefs.