From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26191 invoked by alias); 13 Jun 2012 12:51:54 -0000 Received: (qmail 26123 invoked by uid 22791); 13 Jun 2012 12:51:52 -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 12:51: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 13:51:31 +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 13:52:03 +0100 From: "Terry Guo" To: "'Pedro Alves'" Cc: "'Jonathan Larmour'" , "Ulrich Weigand" , "Yao Qi" , , , "Richard Earnshaw" , "Joey Ye" References: <201206121256.q5CCua79003559@d06av02.portsmouth.uk.ibm.com> <4FD76D1D.6080603@eCosCentric.com> <000101cd495b$c996fea0$5cc4fbe0$@guo@arm.com> <4FD886CE.70303@redhat.com> In-Reply-To: <4FD886CE.70303@redhat.com> Subject: RE: [RFC] Enable GDB handle compressed target.xml returned by GDB stub Date: Wed, 13 Jun 2012 12:51:00 -0000 Message-ID: <000201cd4963$5522daf0$ff6890d0$@guo@arm.com> MIME-Version: 1.0 X-MC-Unique: 112061313513101801 Content-Type: text/plain; charset=UTF-8 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/msg00399.txt.bz2 > > > > 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? >=20 >=20 > Please don't consider only target.xml in the design, but also the > xi:includes. >=20 Yes, we need to consider xi:includes which means we have to involve a globa= l state. A refine to Yao's solution: 1. If host GDB support compressed xml file, then it sends "$qSupported:mult= iprocess+;qRelocInsn;compressedXML+" to stub. Here is a new feature compres= sedXML+. 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 us= ual, including the file in "xi:includes". For stub that returns ";compresse= dXML+", the gdb will assume all the returned xml file are compressed. 4. Otherwise the returned data are not compressed. BR, Terry