From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3356 invoked by alias); 13 Jun 2012 01:58:15 -0000 Received: (qmail 3213 invoked by uid 22791); 13 Jun 2012 01:58:13 -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 01:57:59 +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 02:57:53 +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 02:57:32 +0100 From: "Terry Guo" To: "'Jonathan Larmour'" Cc: "Yao Qi" , , , "Richard Earnshaw" , "'Pedro Alves'" , "Joey Ye" , "Ulrich Weigand" 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 01:58:00 -0000 Message-ID: <000001cd4907$fd86a1b0$f893e510$@guo@arm.com> MIME-Version: 1.0 X-MC-Unique: 112061302575300501 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/msg00376.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 I am kind of lost on "gz file". Do you mean there is a real gz file and the stub will do following things to response host gdb request? 1. stub open the real gz file and read it into buffer. 2. stub transmit the buffer to host gdb. 3. stub close the file I looked into some open source gdb servers like openocd and stlink. I found they just use a string to store the content of xml file, they don't have a real xml file. I think this way consumes less flash space because it doesn't need store big gz file header. BR, Terry