<div dir="ltr">Oh right, good point.<div><br></div><div>All the remote sides I worked with essentially have a default incoming packet rule that says "if I don't know what this is, respond with $#00", so no need to add that explicitly if your remote side already does that, Matthew.</div>
<div><br></div><div>-Todd</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 9, 2014 at 9:27 AM,  <span dir="ltr"><<a href="mailto:jingham@apple.com" target="_blank">jingham@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Note also as a general rule, you never need to add support for a query packet unless you support the thing it is querying for, since whoever is sending it is supposed to take the "unrecognized packet" error to mean not supported.<br>

<span class="HOEnZb"><font color="#888888"><br>
Jim<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On May 9, 2014, at 9:26 AM, <a href="mailto:jingham@apple.com">jingham@apple.com</a> wrote:<br>
<br>
> My bad, there are actually a bunch of vAttach variant packets we added to support attaching by process name, and "wait for a process to show up and then attach to it" and the like.<br>
><br>
> I added documentation for them.<br>
><br>
> Jim<br>
><br>
> On May 9, 2014, at 8:57 AM, Todd Fiala <<a href="mailto:todd.fiala@gmail.com">todd.fiala@gmail.com</a>> wrote:<br>
><br>
>> Hey Matthew,<br>
>><br>
>> Essentially you'll want to return a string like this:<br>
>> $OK#9a<br>
>><br>
>> if your gdb remote debug monitor can handle that (undocumented) element, or return this:<br>
>> $#00<br>
>><br>
>> if you do not support the packet.<br>
>><br>
>> I've been digging into the protocol lately since I'm adding tests for gdb remote protocol-layer activity, so that I can verify lldb-gdbserver (llgs) on Linux is acting identically to debugserver on MacOSX (and to make it easier for us to transition from debugserver to llgs).<br>

>><br>
>> I had noted that packet wasn't documented a while back.  When I get to testing that one, I'll update the doc text file on it.<br>
>><br>
>><br>
>> On Fri, May 9, 2014 at 6:40 AM, Abid, Hafiz <<a href="mailto:Hafiz_Abid@mentor.com">Hafiz_Abid@mentor.com</a>> wrote:<br>
>> I have not read the documentation for this packet. But looking at the code,<br>
>> It seems that you will return OK if your stub supports this packet. Otherwise an empty reply can<br>
>> Indicate that packet is not supported.<br>
>><br>
>> Please look at the following link for more details about query packets.<br>
>> <a href="https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets" target="_blank">https://sourceware.org/gdb/onlinedocs/gdb/General-Query-Packets.html#General-Query-Packets</a><br>

>><br>
>> Thanks,<br>
>> Abid<br>
>><br>
>>> -----Original Message-----<br>
>>> From: Matthew Gardiner [mailto:<a href="mailto:mg11@csr.com">mg11@csr.com</a>]<br>
>>> Sent: 09 May 2014 13:24<br>
>>> To: Abid, Hafiz; <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
>>> Subject: Re: [lldb-dev] GDB RSP qVAttachOrWaitSupported<br>
>>><br>
>>> Abid, Hafiz wrote:<br>
>>>> RNBRemote::HandlePacket_qVAttachOrWaitSupported has the following<br>
>>> comments which may give you some idea.<br>
>>>>     // We support attachOrWait meaning attach if the process exists,<br>
>>> otherwise wait to attach.<br>
>>> Ok, thanks.<br>
>>><br>
>>> So this whole entity "VAttachOrWaitSupported" is a concept which the stub<br>
>>> does or not support, correct?<br>
>>><br>
>>> If so, does the stub write back "1", if it does support it, otherwise "0"?<br>
>>><br>
>>> Presumably if the stub does support this feature, are there any other<br>
>>> messages which the stub should then support?<br>
>>><br>
>>> I'm still not really clear what's happening here....<br>
>>><br>
>>> Matt<br>
>>><br>
>>><br>
>>><br>
>>> Member of the CSR plc group of companies. CSR plc registered in England<br>
>>> and Wales, registered number 4187346, registered office Churchill House,<br>
>>> Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United<br>
>>> Kingdom More information can be found at <a href="http://www.csr.com" target="_blank">www.csr.com</a>. Keep up to date<br>
>>> with CSR on our technical blog, <a href="http://www.csr.com/blog" target="_blank">www.csr.com/blog</a>, CSR people blog,<br>
>>> <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,<br>
>>> <a href="http://www.facebook.com/pages/CSR/191038434253534" target="_blank">www.facebook.com/pages/CSR/191038434253534</a>, or follow us on Twitter at<br>
>>> <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<br>
>>> aptX at <a href="http://www.aptx.com" target="_blank">www.aptx.com</a>.<br>
>><br>
>> _______________________________________________<br>
>> lldb-dev mailing list<br>
>> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> -Todd<br>
>> _______________________________________________<br>
>> lldb-dev mailing list<br>
>> <a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
><br>
<br>
_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</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>