<div dir="ltr">I just finished clearing out some Linux test errors (I'm now all green on Linux x86_64). I'll add this to a queue I've got with some changes from Piotr, Ed and you in it now.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Tue, Mar 25, 2014 at 12:08 PM, Andrew MacPherson <span dir="ltr"><<a href="mailto:andrew.macp@gmail.com" target="_blank">andrew.macp@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Just pinging this again in case anyone has a chance to review the small Linux detach patch here. Thanks!<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Mar 22, 2014 at 11:05 AM, Andrew MacPherson <span dir="ltr"><<a href="mailto:andrew.macp@gmail.com" target="_blank">andrew.macp@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div>I'm attaching a patch here that resolves the issue of a signal being delivered to the inferior on detach, let me know if I should start a new thread for this but since it's related to what we were discussing I'm attaching it here. To reproduce the issue just launch a process, then in a new terminal:<br>
<br></div>sudo lldb -p <pid><br></div>c<br></div>q<br><br></div>When quitting the inferior receives a SIGSTOP because the process is already running when the PTRACE_DETACH is sent. I can't find a clear answer on what's supposed to happen here (PTRACE_DETACH sent to running thread) but this is the behaviour I'm seeing. The docs do indicate that PRACE_DETACH is like PTRACE_CONT and should only be sent to a stopped thread.<br>
<br></div>I also tried to add a unit test for this and the previous patch, however I hit <a href="http://llvm.org/pr16172" target="_blank">http://llvm.org/pr16172</a>. The tests these two patches require are similar to the one mentioned in that case and I get the same errors in my sample test as when running that one:<br>
<br></div>attach -p <pid> (ok)<br></div>c (ok)<br></div>detach (error: Detach failed: No such process)<br><br></div>And:<br><br>attach -p <pid> (ok)<br>c (ok)<br></div>process interrupt (ok)<br>c (error: Failed to resume process: Resume request failed - process still running..)<br>
</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Mar 21, 2014 at 8:37 PM, Ed Maste <span dir="ltr"><<a href="mailto:emaste@freebsd.org" target="_blank">emaste@freebsd.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On 21 March 2014 15:14, <<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>> wrote:<br>
> I'm pretty sure we have some test cases that test attach. If we don't, then it would be great to add one. If we do, then it would be interesting to see why they didn't fail. For instance, maybe they just didn't bother to try "continue" after the attach. Just adding that would be good too.<br>
<br>
</div>We definitely have some, because they used to fail early on in the<br>
FreeBSD porting effort. I suspect that your suggestion is correct and<br>
they just don't do anything but attach and then quit.<br>
<br>
On a related note, I'm pretty sure we don't have tests for detach.<br>
I'll see about extending tests to include that at some point.<br>
<span><font color="#888888"><br>
-Ed<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>