Author: jingham Date: Tue Jul 26 14:47:45 2016 New Revision: 276795 URL: http://llvm.org/viewvc/llvm-project?rev=276795&view=rev Log: Check both private & public states to decide if you need to halt before killing.
We were just checking the public state, but that meant if you were hung in a long running hand-called function, we wouldn't know to interrupt the process, and we would not succeed in killing it. <rdar://problem/24805082> Modified: lldb/trunk/source/Target/Process.cpp Modified: lldb/trunk/source/Target/Process.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=276795&r1=276794&r2=276795&view=diff ============================================================================== --- lldb/trunk/source/Target/Process.cpp (original) +++ lldb/trunk/source/Target/Process.cpp Tue Jul 26 14:47:45 2016 @@ -3634,7 +3634,10 @@ Error Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp) { Error error; - if (m_public_state.GetValue() == eStateRunning) + + // Check both the public & private states here. If we're hung evaluating an expression, for instance, then + // the public state will be stopped, but we still need to interrupt. + if (m_public_state.GetValue() == eStateRunning || m_private_state.GetValue() == eStateRunning) { Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_PROCESS)); if (log) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits