From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21099 invoked by alias); 27 Jun 2012 21:25:14 -0000 Received: (qmail 21085 invoked by uid 22791); 27 Jun 2012 21:25:13 -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; Wed, 27 Jun 2012 21:25:00 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id A514E2F78006; Wed, 27 Jun 2012 22:24:57 +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 elFnJw7TzLep; Wed, 27 Jun 2012 22:24:56 +0100 (BST) Message-ID: <4FEB7A27.1030502@eCosCentric.com> Date: Wed, 27 Jun 2012 21:25: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: gdb-patches@sourceware.org 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> <4FE4A91E.4040300@eCosCentric.com> <000301cd534b$3dd1e1b0$b975a510$@guo@arm.com> <4FE9A3DA.30504@eCosCentric.com> <000601cd5416$e4c21230$ae463690$@guo@arm.com> In-Reply-To: <000601cd5416$e4c21230$ae463690$@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/msg00841.txt.bz2 On 27/06/12 04:42, Terry Guo wrote: > Hi Jonathan, > > In terms of transferring the compressed xml file from stub to gdb, I > find there 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 > binary format(in hex) "01020304" will be converted into string of bytes > "01020304"(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 is that the binary format is much smaller than the original > xml file, but after convert, we need to use bigger runtime buffer to store > the string of bytes. > So which method will you prefer? I think the method 1) is better. remote_read_qxfer()/remote_write_qxfer() already do (1) so I don't see any reason we'd want to allow (2). 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