summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Process.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-07-26 19:47:45 +0000
committerJim Ingham <jingham@apple.com>2016-07-26 19:47:45 +0000
commit0f5f765fb052f155965aceef7b228db5dc0e1cd9 (patch)
treeb2af0df9041f1adbcf46daa1ee18a10a1b71ea0f /lldb/source/Target/Process.cpp
parentf7791bb9c6d458437d4e8abe72f846bb3bf8527f (diff)
downloadbcm5719-llvm-0f5f765fb052f155965aceef7b228db5dc0e1cd9.tar.gz
bcm5719-llvm-0f5f765fb052f155965aceef7b228db5dc0e1cd9.zip
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> llvm-svn: 276795
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r--lldb/source/Target/Process.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp
index 3d1065450e8..b5a37941768 100644
--- a/lldb/source/Target/Process.cpp
+++ b/lldb/source/Target/Process.cpp
@@ -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)
OpenPOWER on IntegriCloud