From: Jonathan Larmour <jifl@eCosCentric.com>
To: Pedro Alves <palves@redhat.com>
Cc: Ulrich Weigand <uweigand@de.ibm.com>,
Terry Guo <terry.guo@arm.com>, Yao Qi <yao@codesourcery.com>,
gdb-patches@sourceware.org, tromey@redhat.com,
Richard Earnshaw <Richard.Earnshaw@arm.com>,
Joey Ye <Joey.Ye@arm.com>
Subject: Re: [RFC] Enable GDB handle compressed target.xml returned by GDB stub
Date: Thu, 14 Jun 2012 15:38:00 -0000 [thread overview]
Message-ID: <4FDA0543.9030100@eCosCentric.com> (raw)
In-Reply-To: <4FD9B96C.9020908@redhat.com>
On 14/06/12 11:14, Pedro Alves wrote:
>
> That sounds fine. It makes gdb roundtrip to the target twice as
> much for tdescs in the limit, but maybe that doesn't matter in
> practice.
We could still add the qSupported compressedXML+ aspect so that GDB won't
even try if the stub doesn't say it's going to do it.
> But note this scheme only works because we're fetching named xml files.
> What of other xml objects that aren't filename based? I guess it's
> plausible that we'll find other situations where compressing xml
> data would be useful.
Although it's meant to be a stream not a file as such - think of it more
like a protocol issue than a file transfer. And so far we've only been
talking about qXfer:features:read which is specific to target descriptions
(according to documented behaviour anyway). But hopefully this is
irrelevant.....
> In that perspective, something like the
> 'try qXfer:features:zread:target.xml first, then
> qXfer:features:read:target.xml, etc.' alternative sounded attractive.
> Or should we not bother?
I have a fresh variant proposal derived from the existing suggestions
which I think can accommodate all the concerns:
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.
3) GDB will attempt to do the read with the ",Z". If the stub returns a
NUL character (the standard approach for unsupported packets in the remote
protocol), then GDB retries with just the normal request for plaintext:
qXfer:features:read:ANNEX:OFFSET,LENGTH
This can in fact then be applied to all qXfer:*:read primitives if
desired, although I doubt it's useful for many at present. But since every
qXfer request goes through remote_read_qxfer() if anything it's easier to
support them all, than not to.
Anyone got a better proposal?
Presumably, by analogy, the equivalent should be put in place for
qXfer:*:write and remote_write_qxfer() I guess.
And just in response to a mail by Terry:
> How about just the .z, like
> "qXfer:features:read:target.xml.z" which means the host gdb is trying to
> request something compressed by zlib?
If the above proposal isn't supported and instead we do use an extension
to do this, then I suggest avoiding .z as that is too similar to the .Z
standard unix compress format extension, especially when you consider
people being used to case-insensitive filenames on certain OS's.
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
next prev parent reply other threads:[~2012-06-14 15:38 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-11 7:31 Terry Guo
2012-06-11 14:43 ` Jonathan Larmour
2012-06-12 9:37 ` Terry Guo
2012-06-12 12:44 ` Yao Qi
2012-06-12 12:57 ` Ulrich Weigand
2012-06-12 16:24 ` Jonathan Larmour
2012-06-13 1:58 ` Terry Guo
2012-06-13 13:42 ` Jonathan Larmour
2012-06-14 0:53 ` Terry Guo
2012-06-13 11:57 ` Terry Guo
2012-06-13 12:26 ` Pedro Alves
2012-06-13 12:51 ` Terry Guo
2012-06-13 13:12 ` Ulrich Weigand
2012-06-13 13:47 ` Jonathan Larmour
2012-06-14 1:11 ` Terry Guo
2012-06-14 10:14 ` Pedro Alves
2012-06-14 13:54 ` Joel Brobecker
2012-06-14 14:58 ` Ulrich Weigand
2012-06-14 15:38 ` Jonathan Larmour [this message]
2012-06-19 7:40 ` Terry Guo
2012-06-22 17:19 ` Jonathan Larmour
2012-06-26 2:39 ` Terry Guo
2012-06-26 3:24 ` Terry Guo
2012-06-26 11:58 ` Jonathan Larmour
2012-06-27 3:42 ` Terry Guo
2012-06-27 21:25 ` Jonathan Larmour
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FDA0543.9030100@eCosCentric.com \
--to=jifl@ecoscentric.com \
--cc=Joey.Ye@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
--cc=terry.guo@arm.com \
--cc=tromey@redhat.com \
--cc=uweigand@de.ibm.com \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox