<div dir="ltr">> <span style="font-family:arial,sans-serif;font-size:13px">but I work in a sync so that the exe doesn't exec until after llgs attaches</span><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">That's a bit misleading - what I mean is I have to add a separate fork/sync/exec launch mechanism to emulate what Darwin provides in a non-standard posix launch extension not available on Linux.  In both cases, at the point where llgs/debugserver attach, the inferior is stopped (or made to stop) prior to beginning of execution, ready to go.</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 4, 2014 at 8:34 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.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">Yep - see my comments here that came in about 30 minutes before you posted your patch:<div><br></div><div>
<a href="https://github.com/tfiala/lldb/issues/57" target="_blank">https://github.com/tfiala/lldb/issues/57</a><br></div>
<div><br></div><div>For using llgs (lldb-gdbserver) for local Linux debugging (i.e. using it all the time, instead of ProcessLinux and ProcessMonitor), I follow Apple's approach to launching the exe from the lldb side, but I work in a sync so that the exe doesn't exec until after llgs attaches.  So, even though we're "attaching" on the llgs side, it definitely is hitting the case where the rendezvous isn't set up right.  You're working right in the code that I am modifying as well.</div>

<div><br></div><div>There's one more check I think I'll need to add to what you're doing.  In my scenario, the rendezvous partially resolves but the memory isn't set yet, so the resolve step isn't sufficient for a check.  I'm going to ferret that out hopefully tonight.</div>

<div><br></div><div>Thanks for digging into this!</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>-Todd</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Sep 4, 2014 at 3:44 PM, Stephane Sezer <span dir="ltr"><<a href="mailto:sas@fb.com" target="_blank">sas@fb.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No problem. Thanks :)<br>
<br>
This is basically a bug I found when working on remote debugging; it happens when the remote debugger starts the inferior itself. The inferior is blocked before hitting the entry point (before the rendezvous structure has been setup), which means we can’t load any shared object yet. AFAICT, this can only happen during remote debugging, as attaching to a live process with lldb directly would necessarily attach after the entry point.<br>


<div><div><br>
On Sep 4, 2014, at 3:32 PM, Todd Fiala <<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>> wrote:<br>
<br>
> (I've also added a ton of logging on the 'enable log lldb dyld' flag).<br>
><br>
> I'm heading out now but will look at this tonight since I'm all in that code too.<br>
><br>
><br>
> On Thu, Sep 4, 2014 at 3:28 PM, Todd Fiala <<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>> wrote:<br>
> That's bizarre - I'm actually working on this exact code right now...<br>
><br>
><br>
> On Thu, Sep 4, 2014 at 3:24 PM, Stephane Sezer <<a href="mailto:sas@fb.com" target="_blank">sas@fb.com</a>> wrote:<br>
><br>
> _______________________________________________<br>
> lldb-commits mailing list<br>
> <a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Todd Fiala |   Software Engineer |     <a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a> |     <a href="tel:650-943-3180" value="+16509433180" target="_blank">650-943-3180</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Todd Fiala |   Software Engineer |     <a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a> |     <a href="tel:650-943-3180" value="+16509433180" target="_blank">650-943-3180</a><br>
><br>
<br>
</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>
</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>