[Lldb-commits] [PATCH] Improvement for lldb-gdb-remote.txt qHostInfo documentation

Matthew Gardiner mg11 at csr.com
Thu Jul 24 22:22:44 PDT 2014


Hi Jason,

Having the triple hex encoded did confuse me for a while in getting my 
architecture's stub up and working properly, when the previous 
documentation suggested a plain textual representation.

The comment in GDBRemoteCommunicationClient .cpp "// The triple comes as 
ASCII hex bytes since it contains '-' chars" got me thinking, and I 
discovered that '-' is used as the *first* byte in a packet to specify a 
NACK (in section E.11 Packet Acknowledgement of the GDB documentation).

I agree that the need to escape the '-' is probably unfounded since in 
the case of qHostInfo the '-' is wedged between $ and # characters anyway.

I'm happy to proceed with either presentation - so long as the 
documentation is correct.

Matt


Jason Molenda wrote:
> The change to make the documentation match the implementation is fine.
>
> But I don't see why the triple is sent hex encoded.  The comment & hex encoding was added in r128193 from March 23 2011 by Greg Clayton.  AFAIK '-' is not special in gdb-remote protocol.  Characters that can be a problem are $, #, *, }.
>
> Greg?
>
> J
>
>
>> On Jul 23, 2014, at 6:23 AM, Matthew Gardiner <mg11 at csr.com> wrote:
>>
>> Folks,
>>
>> When I first implemented the qHostInfo for the kalimba gdbserver stub, I sent the triple string as kalimba-csr-unknown. However the receiving code (GDBRemoteCommunicationClient) expects the string to be encoded as hex bytes, since '-' are a reserved GDB-RSP control character.
>>
>> The documentation for qHostInfo in lldb-gdb-remote.txt does not allude to this at all. So I'm sending this patch which I think improves this state of affairs.
>>
>> Could someone please apply this patch?
>>
>> thanks Matt
>>
>>
>> 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
>> More information can be found at www.csr.com. Keep up to date with CSR on our technical blog, www.csr.com/blog, CSR people blog, www.csr.com/people, YouTube, www.youtube.com/user/CSRplc, Facebook, www.facebook.com/pages/CSR/191038434253534, or follow us on Twitter at www.twitter.com/CSR_plc.
>> New for 2014, you can now access the wide range of products powered by aptX at www.aptx.com.
>> <lldb-gdb-remote.patch>_______________________________________________
>> lldb-commits mailing list
>> lldb-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
>
>   To report this email as spam click https://www.mailcontrol.com/sr/k!++gfQa3yzGX2PQPOmvUtVTDJsKpCsgiT6Sr2CBa5VmIDKRAkOMY8LPYX0hRhQfFVYH2!a+sDSMQcgptJ50Pg== .




More information about the lldb-commits mailing list