diff options
author | Greg Clayton <gclayton@apple.com> | 2013-04-18 00:42:25 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2013-04-18 00:42:25 +0000 |
commit | 10c6943ac5dd0d764cd68282f4ecf03c27c87e2b (patch) | |
tree | 2a4fa41d878f942b5fdc3635f445bd12ad324d52 /lldb/source/Target/Process.cpp | |
parent | d0bd642464d248956cf7ce2a151236d17f463532 (diff) | |
download | bcm5719-llvm-10c6943ac5dd0d764cd68282f4ecf03c27c87e2b.tar.gz bcm5719-llvm-10c6943ac5dd0d764cd68282f4ecf03c27c87e2b.zip |
Fixed a few m_private_run_lock issues when attaching and also fixed the process to not try to restart the process if the process is exited, crashed or detached. Partial patch from Carlo Kok.
llvm-svn: 179738
Diffstat (limited to 'lldb/source/Target/Process.cpp')
-rw-r--r-- | lldb/source/Target/Process.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 6a394420a00..c973a50ad0b 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -2955,6 +2955,7 @@ Process::Attach (ProcessAttachInfo &attach_info) { if (m_public_run_lock.WriteTryLock()) { + m_private_run_lock.WriteLock(); m_should_detach = true; SetPublicState (eStateAttaching); // Now attach using these arguments. @@ -3032,6 +3033,7 @@ Process::Attach (ProcessAttachInfo &attach_info) if (m_public_run_lock.WriteTryLock()) { + m_private_run_lock.WriteLock(); // Now attach using these arguments. m_should_detach = true; SetPublicState (eStateAttaching); @@ -4086,8 +4088,11 @@ Process::ProcessEventData::DoOnRemoval (Event *event_ptr) } } - - if (m_process_sp->GetPrivateState() != eStateRunning) + const lldb::StateType state = m_process_sp->GetPrivateState(); + if (state != eStateRunning && + state != eStateCrashed && + state != eStateDetached && + state != eStateExited) { if (!still_should_stop) { |