This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [RFC] Enable GDB handle compressed target.xml returned by GDB stub
- From: "Terry Guo" <terry dot guo at arm dot com>
- To: "'Pedro Alves'" <palves at redhat dot com>
- Cc: "'Jonathan Larmour'" <jifl at ecoscentric dot com>, "Ulrich Weigand" <uweigand at de dot ibm dot com>, "Yao Qi" <yao at codesourcery dot com>, <gdb-patches at sourceware dot org>, <tromey at redhat dot com>, "Richard Earnshaw" <Richard dot Earnshaw at arm dot com>, "Joey Ye" <Joey dot Ye at arm dot com>
- Date: Wed, 13 Jun 2012 20:51:52 +0800
- Subject: RE: [RFC] Enable GDB handle compressed target.xml returned by GDB stub
- References: <201206121256.q5CCua79003559@d06av02.portsmouth.uk.ibm.com> <4FD76D1D.6080603@eCosCentric.com> <000101cd495b$c996fea0$5cc4fbe0$@guo@arm.com> <4FD886CE.70303@redhat.com>
> >
> > So the whole process can be simplified to:
> >
> > Step 1: GDB just sends "qXfer:features:read:target.xml.gz" to stub to
> try to
> > get a compressed xml file.
> > Step 2: If stub supports compressed xml, then it sends it to GDB.
> Otherwise
> > nothing get replied.
> > Step 3: If GDB gets something, then it proceeds to decompress the xml
> file
> > and go ahead. If get nothing, GDB sends "
> qXfer:features:read:target.xml" to
> > try to request the plain xml file.
> >
> > For GDB that doesn't support compressed xml file, the
> > "qXfer:features:read:target.xml.gz" will never be used.
> >
> > How about the above model?
>
>
> Please don't consider only target.xml in the design, but also the
> xi:includes.
>
Yes, we need to consider xi:includes which means we have to involve a global state. A refine to Yao's solution:
1. If host GDB support compressed xml file, then it sends "$qSupported:multiprocess+;qRelocInsn;compressedXML+" to stub. Here is a new feature compressedXML+.
2. If stub supports compressed xml file and will reply with compressed xml file, then it replies with ";compressedXML+" to GDB.
3. We still use "$qXfer:features:read:target.xml" to request xml file as usual, including the file in "xi:includes". For stub that returns ";compressedXML+", the gdb will assume all the returned xml file are compressed.
4. Otherwise the returned data are not compressed.
BR,
Terry