This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Enable GDB handle compressed target.xml returned by GDB stub


On 19/06/12 08:40, Terry Guo wrote:
> Jifl wrote:
>> 1) Remote stub can return compressedXML+ in qSupported response
>> 
>> 2) The current syntax of qXfer:features:read is: 
>> qXfer:features:read:ANNEX:OFFSET,LENGTH I suggest instead: 
>> qXfer:features:read:ANNEX:OFFSET,LENGTH[,Z] where the ,Z is only
>> attempted if the stub supports the compressedXML remote protocol
>> feature.
> 
> I don't think it will work after I looked into some open source GDB
> servers like STLINk, OpenOCD. After they confirm that the packet is
> qXfer:features:read, they just extract information of ANNEX, OFFSET and
> LENGTH. Whether there is a "Z" doesn't impact their response behavior.

Then they wouldn't have sent compressedXML+ in their qSupported response.
So they'll continue to work fine.

> But the new "zread" can work because those existing gdb servers do
> check whether the op is "read". So for "zread", that check will fail
> and an error code will be returned to host gdb, thus host gdb knows the
> compressed xml file isn't supported. While for the new stub that knows
> "zread", the compressed xml file will be returned.

Sure, but with my suggestion we save having to implement a new command on
the remote side, as well as avoiding a round trip of attempting the zread,
failing, and fallback to read every time.

Jifl
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]