From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20964 invoked by alias); 13 Jun 2012 12:26:22 -0000 Received: (qmail 20855 invoked by uid 22791); 13 Jun 2012 12:26:19 -0000 X-SWARE-Spam-Status: No, hits=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jun 2012 12:26:03 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5DCPrhG014871 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 13 Jun 2012 08:25:53 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q5DCPoqj001767; Wed, 13 Jun 2012 08:25:51 -0400 Message-ID: <4FD886CE.70303@redhat.com> Date: Wed, 13 Jun 2012 12:26:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Terry Guo CC: "'Jonathan Larmour'" , Ulrich Weigand , 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 References: <201206121256.q5CCua79003559@d06av02.portsmouth.uk.ibm.com> <4FD76D1D.6080603@eCosCentric.com> <000101cd495b$c996fea0$5cc4fbe0$@guo@arm.com> In-Reply-To: <000101cd495b$c996fea0$5cc4fbe0$@guo@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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/msg00397.txt.bz2 On 06/13/2012 12:57 PM, Terry Guo wrote: > >> -----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 >> >> 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. >> >> 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. >> >> 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? Please don't consider only target.xml in the design, but also the xi:includes. -- Pedro Alves