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

Terry Guo
2012-06-14T01:11:52Z

> -----Original Message-----
> From: Jonathan Larmour [mailto:jifl@ecoscentric.com]
> Sent: Wednesday, June 13, 2012 9:47 PM
> To: Ulrich Weigand
> Cc: Terry Guo; 'Pedro Alves'; Yao Qi; gdb-patches@sourceware.org;
> tromey@redhat.com; Richard Earnshaw; Joey Ye
> Subject: Re: [RFC] Enable GDB handle compressed target.xml returned by
> GDB stub
>
> On 13/06/12 14:12, Ulrich Weigand wrote:
> > Terry Guo wrote:
> >
> >> Yes, we need to consider xi:includes which means we have to involve
> a
> >> global state.
> >
> > Not necessarily; the way I had intended my suggestion to work was
> that
> > GDB always adds ".gz" (or some other suffix if we actually are not
> > compatible with the .gz file format) to *every* file it fetches, not
> > just to the initial target.xml, but also to other files fetched via
> > xi:include statements ...
> >
> > If the compressed version of the file is not available, GDB would
> > then fall back to the original file name (on a file-by-file basis).
>
> I agree.
>
> This also means that the target can choose whether to return any file
> as
> compressed or not, rather than having to have everything compressed
> from
> then on, even if some XML files might take up more space compressed
> than
> uncompressed, or might need to be generated - but not all files. It's
> getting a bit hypothetical at this point, it's true, but not
> unreasonably so.
>

Thanks Ulrich and Jonathan, I think I get your points. Now the only
remaining question is about the suffix. 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?

BR,
Terry