Op 18-4-2013 02:42, Greg Clayton schreef:
Date: Wed Apr 17 19:42:25 2013
New Revision: 179738
just realized i sent this to the wrong list. afaik this is still relevant after Thirumurthi, Ashok changes.
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.
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Wed Apr 17 19:42:25 2013
@@ -2955,6 +2955,7 @@ Process::Attach (ProcessAttachInfo &atta
Process::Attach doesn't get called for GDB remote, so this doesn't get
called for that.
adding this in Process::ConnectRemote makes it work:
if (state == eStateStopped || state == eStateCrashed)
+ if (m_public_run_lock.WriteTryLock())
// If we attached and actually have a process on
the other end, then
// this ended up being the equivalent of an attach.
// This delays passing the stopped event to
// CompleteAttach gets a chance to complete...
if (PrivateStateThreadIsValid ())