From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9531 invoked by alias); 13 Jun 2012 11:57:48 -0000 Received: (qmail 9471 invoked by uid 22791); 13 Jun 2012 11:57:46 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 11:57:33 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 13 Jun 2012 12:57:30 +0100 Received: from shawin053 ([10.1.255.212]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 13 Jun 2012 12:58:01 +0100 From: "Terry Guo" To: "'Jonathan Larmour'" , "Ulrich Weigand" Cc: "Yao Qi" , , , "Richard Earnshaw" , "'Pedro Alves'" , "Joey Ye" References: <201206121256.q5CCua79003559@d06av02.portsmouth.uk.ibm.com> <4FD76D1D.6080603@eCosCentric.com> In-Reply-To: <4FD76D1D.6080603@eCosCentric.com> Subject: RE: [RFC] Enable GDB handle compressed target.xml returned by GDB stub Date: Wed, 13 Jun 2012 11:57:00 -0000 Message-ID: <000101cd495b$c996fea0$5cc4fbe0$@guo@arm.com> MIME-Version: 1.0 X-MC-Unique: 112061312573009801 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-06/txt/msg00394.txt.bz2 > -----Original Message----- > From: Jonathan Larmour [mailto:jifl@ecoscentric.com] > Sent: Wednesday, June 13, 2012 12:24 AM > To: Ulrich Weigand > Cc: Yao Qi; Terry Guo; gdb-patches@sourceware.org; tromey@redhat.com; > Richard Earnshaw; 'Pedro Alves'; Joey Ye > Subject: Re: [RFC] Enable GDB handle compressed target.xml returned by > GDB stub >=20 > On 12/06/12 13:56, Ulrich Weigand wrote: > > Yao Qi wrote: > >> I'd like GDB keeps using qXfer:features:read:target.xml to fetch the > xml > >> file, even it is compressed. We need some changes on qSupported in > both > >> sides, > > > > That still makes the result of qXfer:features:read:target.xml > dependent > > on global state ... Why not simply support compressed files by > having > > the stub respond to > > qXfer:features:read:target.xml.gz > > (etc) if it has a compressed file image? > > > > Optionally we might still add a qSupported feature as you describe; > > otherwise GDB might just probe whether the stub knows .gz files. >=20 > For what it's worth, that sounds appealing to me. Strictly Terry's > proposal wasn't a .true gz file but a gzipped stream. But that's easy > to > avoid if we just choose to use the name convention target.xmlz or > suchlike. >=20 > Jifl 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? BR, Terry