<div dir="ltr">It's not clear in the gdb protocol docs, but the stub does launch a new inferior process with the $A command.  (From the gdb remote docs, it looks to me like it's just supposed to set the args, but it really is supposed to launch it too).  That's how lldb launches an exe when talking to a debugserver (and lldb-gdbserver).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 11, 2014 at 10:34 PM, Matthew Gardiner <span dir="ltr"><<a href="mailto:mg11@csr.com" target="_blank">mg11@csr.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks for providing the documentation, Jim.<br>
<br>
So in the case of vAttachOrWait, if the process is not already there, what entity is responsible for the launching of it? Would that be the stub itself, or is this where lldb-platform steps in?<br>
<br>
thanks<br>
Matt<br>
<br>
<br>
Jim Ingham wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Author: jingham<br>
Date: Fri May  9 11:17:24 2014<br>
New Revision: 208423<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=208423&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=208423&view=rev</a><br>
Log:<br>
Documented our "attach" extension packets.<br>
<br>
Modified:<br>
     lldb/trunk/docs/lldb-gdb-<u></u>remote.txt<br>
<br>
Modified: lldb/trunk/docs/lldb-gdb-<u></u>remote.txt<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/docs/lldb-gdb-remote.txt?rev=208423&r1=208422&r2=208423&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lldb/trunk/docs/lldb-<u></u>gdb-remote.txt?rev=208423&r1=<u></u>208422&r2=208423&view=diff</a><br>

==============================<u></u>==============================<u></u>==================<br>
--- lldb/trunk/docs/lldb-gdb-<u></u>remote.txt (original)<br>
+++ lldb/trunk/docs/lldb-gdb-<u></u>remote.txt Fri May  9 11:17:24 2014<br>
@@ -1195,3 +1195,58 @@ for this region.<br>
  // send packet: $qProcessInfoPID:60050#00<br>
  // read packet: $pid:60050;ppid:59948;uid:<u></u>7746;gid:11;euid:7746;egid:11;<u></u>name:6c6c6462;triple:<u></u>7838365f36342d6170706c652d6d61<u></u>636f7378;#00<br>
  //----------------------------<u></u>------------------------------<u></u>------------<br>
+<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+// "vAttachName"<br>
+//<br>
+// BRIEF<br>
+//  Same as vAttach, except instead of a "pid" you send a process name.<br>
+//<br>
+// PRIORITY TO IMPLEMENT<br>
+//  Low. Only needed for "process attach -n".  If the packet isn't supported<br>
+//  then "process attach -n" will fail gracefully.  So you need only to support<br>
+//  it if attaching to a process by name makes sense for your environment.<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+// "vAttachWait"<br>
+//<br>
+// BRIEF<br>
+//  Same as vAttachName, except that the stub should wait for the next instance<br>
+//  of a process by that name to be launched and attach to that.<br>
+//<br>
+// PRIORITY TO IMPLEMENT<br>
+//  Low. Only needed to support "process attach -w -n" which will fail<br>
+//  gracefully if the packet is not supported.<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+// "qAttachOrWaitSupported"<br>
+//<br>
+// BRIEF<br>
+//  This is a binary "is it supported" query.  Return OK if you support<br>
+//  vAttachOrWait<br>
+//<br>
+// PRIORITY TO IMPLEMENT<br>
+//  Low. This is required if you support vAttachOrWait, otherwise no support<br>
+//  is needed since the standard "I don't recognize this packet" response<br>
+//  will do the right thing.<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
+// "vAttachOrWait"<br>
+//<br>
+// BRIEF<br>
+//  Same as vAttachWait, except that the stub will attach to a process<br>
+//  by name if it exists, and if it does not, it will wait for a process<br>
+//  of that name to appear and attach to it.<br>
+//<br>
+// PRIORITY TO IMPLEMENT<br>
+//  Low. Only needed to implement "process attach -w -i false -n".  If<br>
+//  you don't implement it but do implement -n AND lldb can somehow get<br>
+//  a process list from your device, it will fall back on scanning the<br>
+//  process list, and sending vAttach or vAttachWait depending on<br>
+//  whether the requested process exists already.  This is racy,<br>
+//  however, so if you want to support this behavior it is better to<br>
+//  support this packet.<br>
+//---------------------------<u></u>------------------------------<u></u>-------------<br>
<br>
<br>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/lldb-commits</a><br>
<br>
<br></div></div>
  To report this email as spam click <a href="https://www.mailcontrol.com/sr/MZbqvYs5QwJvpeaetUwhCQ==" target="_blank">https://www.mailcontrol.com/<u></u>sr/MZbqvYs5QwJvpeaetUwhCQ==</a> .<br>
</blockquote>
<br>
<br>
<br>
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom<br>

More information can be found at <a href="http://www.csr.com" target="_blank">www.csr.com</a>. Keep up to date with CSR on our technical blog, <a href="http://www.csr.com/blog" target="_blank">www.csr.com/blog</a>, CSR people blog, <a href="http://www.csr.com/people" target="_blank">www.csr.com/people</a>, YouTube, <a href="http://www.youtube.com/user/CSRplc" target="_blank">www.youtube.com/user/CSRplc</a>, Facebook, <a href="http://www.facebook.com/pages/CSR/191038434253534" target="_blank">www.facebook.com/pages/CSR/<u></u>191038434253534</a>, or follow us on Twitter at <a href="http://www.twitter.com/CSR_plc" target="_blank">www.twitter.com/CSR_plc</a>.<br>

New for 2014, you can now access the wide range of products powered by aptX at <a href="http://www.aptx.com" target="_blank">www.aptx.com</a>.<div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/lldb-commits</a><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>