From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25798 invoked by alias); 27 Jun 2012 03:42:06 -0000 Received: (qmail 25788 invoked by uid 22791); 27 Jun 2012 03:42:05 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MSGID_MULTIPLE_AT,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_NO 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, 27 Jun 2012 03:41:52 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 27 Jun 2012 04:41:50 +0100 Received: from shawin053 ([10.164.2.89]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 27 Jun 2012 04:42:36 +0100 From: "Terry Guo" To: "'Jonathan Larmour'" Cc: References: <201206131312.q5DDCUfK028160@d06av02.portsmouth.uk.ibm.com> <4FD9B96C.9020908@redhat.com> <4FDA0543.9030100@eCosCentric.com> <000101cd4dee$db02a030$9107e090$@guo@arm.com> <4FE4A91E.4040300@eCosCentric.com> <000301cd534b$3dd1e1b0$b975a510$@guo@arm.com> <4FE9A3DA.30504@eCosCentric.com> In-Reply-To: <4FE9A3DA.30504@eCosCentric.com> Subject: RE: [RFC] Enable GDB handle compressed target.xml returned by GDB stub Date: Wed, 27 Jun 2012 03:42:00 -0000 Message-ID: <000601cd5416$e4c21230$ae463690$@guo@arm.com> MIME-Version: 1.0 X-MC-Unique: 112062704415000701 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/msg00824.txt.bz2 Hi Jonathan, In terms of transferring the compressed xml file from stub to gdb, I find t= here are two methods: 1). Use the original binary format and escape special characters like "$", = "#" and "}". 2). Convert the original binary format into ASCII format, such as the binar= y format(in hex) "01020304" will be converted into string of bytes "0102030= 4"(in ASCII format). The size of binary format is 32 bits while the size of= string format will be 64 bits (without the NULL terminator). The problem i= s that the binary format is much smaller than the original xml file, but af= ter convert, we need to use bigger runtime buffer to store the string of by= tes. So which method will you prefer? I think the method 1) is better. BR, Terry > -----Original Message----- > From: Jonathan Larmour [mailto:jifl@ecoscentric.com] > Sent: Tuesday, June 26, 2012 7:58 PM > To: Terry Guo > Cc: 'Pedro Alves'; 'Ulrich Weigand'; 'Yao Qi'; gdb- > patches@sourceware.org; tromey@redhat.com; Richard Earnshaw; Joey Ye; > Matthew Gretton-Dann > Subject: Re: [RFC] Enable GDB handle compressed target.xml returned by > GDB stub >=20 > Terry Guo wrote: > > Hi Jonathan, > > > > I read your email again and think your solution is: > > > > If stub doesn't return compressedXML+ then > > We go with plain read > > Else we go with compressed read > > If we get NUL reply > > Then we fall back to plain read > > > > If this time my understanding on your solution is correct, I think it > > does save effort on round trip by not always round trip. >=20 > Yes, that's what I was proposing. >=20 > By the way, there are a lot of people on CC for this thread, and I > don't > know if they ought to be. Send me and Terry a direct note if you want > off > CC - I've just been preserving the CCs. >=20 > 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=3D=3Dmine