From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5896 invoked by alias); 8 Mar 2005 13:37:10 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 5836 invoked from network); 8 Mar 2005 13:37:05 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 8 Mar 2005 13:37:05 -0000 Received: from drow by nevyn.them.org with local (Exim 4.44 #1 (Debian)) id 1D8etQ-0001yY-BO; Tue, 08 Mar 2005 08:37:00 -0500 Date: Tue, 08 Mar 2005 13:37:00 -0000 From: Daniel Jacobowitz To: Nathan Sidwell Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] remote protocol cleanups Message-ID: <20050308133700.GB7417@nevyn.them.org> Mail-Followup-To: Nathan Sidwell , gdb-patches@sources.redhat.com References: <4209F9CE.4030405@codesourcery.com> <20050307224517.GB28725@nevyn.them.org> <422D87F3.9040804@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <422D87F3.9040804@codesourcery.com> User-Agent: Mutt/1.5.6+20040907i X-SW-Source: 2005-03/txt/msg00120.txt.bz2 On Tue, Mar 08, 2005 at 11:09:39AM +0000, Nathan Sidwell wrote: > Daniel Jacobowitz wrote: > >On Wed, Feb 09, 2005 at 11:53:50AM +0000, Nathan Sidwell wrote: > > >>2) remote_write_bytes attempts to honour get_memory_write_packet_size's > >>limit, but fails in two ways when that is a very small number. a) it can > >>end up with a negative byte count. b) it deducts the number of chars in > >>the *maximal* length count, not the number of chars in the actual length > >>count. This can result in packets sending 1 or 2 bytes fewer than they > >>are limited to. > > > > >Mostly OK, but one question. I don't get the "max (todo, 1)". If no > >bytes fit, aren't we hosed? It seems like an error condition; we > >shouldn't be violating the size limit. > > It appears the minimum size setting is somewhat arbitrary, and incorrect. > /* NOTE: 16 is just chosen at random. */ > #ifndef MIN_REMOTE_PACKET_SIZE > #define MIN_REMOTE_PACKET_SIZE 16 > #endif > > the minumum packet size is actually > 7 - strlen ("$M,:#NN") > 8 - hexnumlen (memaddr) (32 bit host) > 1 - hexnumlen (len) > 2 - data > = 18 characters > > This patch fixes that size calculation. ok? Yes, this is OK. -- Daniel Jacobowitz CodeSourcery, LLC