[Lldb-commits] [PATCH] Make CommandObjectProcess check process state before calling WaitForProcessToStop
Malea, Daniel
daniel.malea at intel.com
Thu Oct 3 15:34:23 PDT 2013
Hi all,
I noticed a race condition where a process is launched and hits a breakpoint while CommandObjectProcessLaunch is still in DoExecute. The effect I'm seeing is that if Process::WaitForProcessToStop() is called on a stopped process, LLDB hangs.
This patch fixes the issue by checking the process state before calling WaitForProcessToStop from CommandObjectProcessLaunch. I think there might still be a race condition in between getting the state and checking if StateIsStoppedState, but I'm not sure what process mutex to acquire in the command object while checking the state, or if that approach is any better..
Comments welcome!
Thanks,
Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: command_object_process_check_state.patch
Type: application/octet-stream
Size: 763 bytes
Desc: command_object_process_check_state.patch
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20131003/fd94f24d/attachment.obj>
More information about the lldb-commits
mailing list