From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26203 invoked by alias); 22 Jun 2012 17:19:49 -0000 Received: (qmail 26187 invoked by uid 22791); 22 Jun 2012 17:19:47 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jun 2012 17:19:33 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id B5B622F78006; Fri, 22 Jun 2012 18:19:31 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iKXBjRsCHHok; Fri, 22 Jun 2012 18:19:27 +0100 (BST) Message-ID: <4FE4A91E.4040300@eCosCentric.com> Date: Fri, 22 Jun 2012 17:19:00 -0000 From: Jonathan Larmour User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16 MIME-Version: 1.0 To: Terry Guo CC: Pedro Alves , 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: <201206131312.q5DDCUfK028160@d06av02.portsmouth.uk.ibm.com> <4FD9B96C.9020908@redhat.com> <4FDA0543.9030100@eCosCentric.com> <000101cd4dee$db02a030$9107e090$@guo@arm.com> In-Reply-To: <000101cd4dee$db02a030$9107e090$@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/msg00721.txt.bz2 On 19/06/12 08:40, Terry Guo wrote: > Jifl wrote: >> 1) Remote stub can return compressedXML+ in qSupported response >> >> 2) The current syntax of qXfer:features:read is: >> qXfer:features:read:ANNEX:OFFSET,LENGTH I suggest instead: >> qXfer:features:read:ANNEX:OFFSET,LENGTH[,Z] where the ,Z is only >> attempted if the stub supports the compressedXML remote protocol >> feature. > > I don't think it will work after I looked into some open source GDB > servers like STLINk, OpenOCD. After they confirm that the packet is > qXfer:features:read, they just extract information of ANNEX, OFFSET and > LENGTH. Whether there is a "Z" doesn't impact their response behavior. Then they wouldn't have sent compressedXML+ in their qSupported response. So they'll continue to work fine. > But the new "zread" can work because those existing gdb servers do > check whether the op is "read". So for "zread", that check will fail > and an error code will be returned to host gdb, thus host gdb knows the > compressed xml file isn't supported. While for the new stub that knows > "zread", the compressed xml file will be returned. Sure, but with my suggestion we save having to implement a new command on the remote side, as well as avoiding a round trip of attempting the zread, failing, and fallback to read every time. Jifl -- eCosCentric Limited http://www.eCosCentric.com/ The eCos experts Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571 Registered in England and Wales: Reg No 4422071. ------["Si fractum non sit, noli id reficere"]------ Opinions==mine